Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2 from heidelpay/master
Browse files Browse the repository at this point in the history
Fix issue in case of guest order
  • Loading branch information
devheidelpay authored Oct 17, 2016
2 parents 6a8d140 + bb160f2 commit 898aed4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions PaymentMethodes/HeidelpayAbstractPaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public function getHeidelpayUrl($quote) {
$user['ADDRESS.COUNTRY'], // Billing address country code
$user['CONTACT.EMAIL'] // Customer mail address
);
$this->_heidelpayPaymentMethod->getRequest()->getCriterion()->set('guest', $user['CRITERION.GUEST']);

$this->_heidelpayPaymentMethod->getRequest()->basketData(
$quote->getId(), // Reference Id of your application
Expand Down Expand Up @@ -295,6 +296,11 @@ public function getUser($order) {
foreach ($billing->getStreet() as $street) {
$billingStreet .= $street.' ';
}
$CustomerId = $order->getCustomerId();
$user['CRITERION.GUEST'] = 'false';
if ( $CustomerId == 0) {
$user['CRITERION.GUEST'] = 'true';
}

$user['NAME.COMPANY'] = ($billing->getCompany() === false) ? NULL : trim($billing->getCompany());
$user['NAME.GIVEN'] = trim($billing->getFirstname());
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
"description" : "heidelpay payment extension for magento 2",
"require" : {
"php" : "~5.5.0|~5.6.0|~7.0.0",
"magento/module-config" : "100.*.*",
"magento/module-store" : "100.*.*",
"magento/module-checkout" : "100.*.*",
"magento/module-sales" : "100.*.*",
"magento/module-quote" : "100.*.*",
"magento/module-customer" : "100.*.*",
"magento/module-payment" : "100.*.*",
"magento/module-backend" : "100.*.*",
"magento/module-config" : "<100.2.0",
"magento/module-store" : "<100.2.0",
"magento/module-checkout" : "<100.2.0",
"magento/module-sales" : "<100.2.0",
"magento/module-quote" : "<100.2.0",
"magento/module-customer" : "<100.2.0",
"magento/module-payment" : "<100.2.0",
"magento/module-backend" : "<100.2.0",
"magento/framework" : "100.*.*",
"heidelpay/php-api" : "dev-master"
},
"suggest" : {
"magento/module-checkout-agreements" : "100.0.*"
"magento/module-checkout-agreements" : "<100.2.0"
},
"repositories" : [{
"type" : "git",
"url" : "https://github.com/heidelpay/php-api.git"
}
],
"type" : "magento2-module",
"version" : "16.10.07",
"version" : "16.10.17",
"license" : "Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.",
"autoload" : {
"files" : [
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Heidelpay_Gateway" schema_version="16.10.7" setup_version="16.10.7">
<module name="Heidelpay_Gateway" schema_version="16.10.17" setup_version="16.10.17">
<sequence>
<module name="Magento_Sales" />
<module name="Magento_Payment" />
Expand Down

0 comments on commit 898aed4

Please sign in to comment.