Skip to content

Commit

Permalink
Merge pull request #9 from blnce-io/v1.2.3
Browse files Browse the repository at this point in the history
v1.2.3: Added isRegistered param to transactions request
  • Loading branch information
pniel-cohen authored Jun 30, 2021
2 parents 36fd607 + 568c9ca commit e117cae
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
10 changes: 6 additions & 4 deletions Model/Request/Transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,14 @@ protected function getBuyerParams(Quote $quote)
{
$params = [];

if (($billing = $quote->getBillingAddress()) !== null) {
$params = [
'email' => $billing->getEmail() ?: ($quote->getCustomerEmail() ?: $this->getFallbackEmail()),
];
if (($billing = $quote->getBillingAddress()) !== null && $billing->getEmail()) {
$params['email'] = $billing->getEmail();
} else {
$params['email'] = $quote->getCustomerEmail() ?: $this->getFallbackEmail();
}

$params['isRegistered'] = $quote->getCustomerIsGuest() ? false : true;

return $params;
}
}
1 change: 0 additions & 1 deletion Model/Response/Transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @package Balancepay_Balancepay
* @author Developer: Pniel Cohen
* @author Company: Girit-Interactive (https://www.girit-tech.com/)
* @deprecated v1.2.1
*/

namespace Balancepay\Balancepay\Model\Response;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"php": ">=5.6"
},
"type": "magento2-module",
"version": "1.2.1",
"version": "1.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Balancepay_Balancepay" setup_version="1.2.1">
<module name="Balancepay_Balancepay" setup_version="1.2.3">
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Payment"/>
Expand Down

0 comments on commit e117cae

Please sign in to comment.