Skip to content

Commit

Permalink
Merge pull request #92 from pay-now/release/1.5.2
Browse files Browse the repository at this point in the history
Release/1.5.2
  • Loading branch information
DeveloperMovecloser authored Feb 22, 2024
2 parents fdb0065 + d7313ff commit 1ea924a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
16 changes: 12 additions & 4 deletions Gateway/Request/Payment/AuthorizeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,28 @@ public function build(array $buildSubject)
$request['body'][PaymentField::BUYER_FIELD_NAME][PaymentField::BUYER_EXTERNAL_ID] = $this->helper
->generateBuyerExternalId($this->order->getCustomerId(), $this->order->getStoreId());
}
$isRetry = (
$this->payment->hasAdditionalInformation(PaymentField::IS_PAYMENT_RETRY_FIELD_NAME)
&& $this->payment->getAdditionalInformation(PaymentField::IS_PAYMENT_RETRY_FIELD_NAME) == 1
);

if ($this->payment->hasAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_ID)
&& ! empty($this->payment->getAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_ID))) {
&& ! empty($this->payment->getAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_ID))
&& !$isRetry) {
$request['body'][PaymentField::PAYMENT_METHOD_ID] = $this->payment
->getAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_ID);
}

if ($this->payment->hasAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_TOKEN)
&& ! empty($this->payment->getAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_TOKEN))) {
&& ! empty($this->payment->getAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_TOKEN))
&& !$isRetry) {
$request['body'][PaymentField::PAYMENT_METHOD_TOKEN] = $this->payment
->getAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_TOKEN);
}

if ($this->payment->hasAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_FINGERPRINT)
&& ! empty($this->payment->getAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_FINGERPRINT))) {
&& ! empty($this->payment->getAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_FINGERPRINT))
&& !$isRetry) {
$request['body'][PaymentField::BUYER_FIELD_NAME][PaymentField::BUYER_DEVICE_FINGERPRINT] = $this->payment
->getAdditionalInformation(PaymentDataAssignObserver::PAYMENT_METHOD_FINGERPRINT);
}
Expand All @@ -98,7 +105,8 @@ public function build(array $buildSubject)
}

if ($this->payment->hasAdditionalInformation(PaymentDataAssignObserver::BLIK_CODE)
&& ! empty($this->payment->getAdditionalInformation(PaymentDataAssignObserver::BLIK_CODE))) {
&& ! empty($this->payment->getAdditionalInformation(PaymentDataAssignObserver::BLIK_CODE))
&& !$isRetry) {
$request['body'][PaymentField::AUTHORIZATION_CODE] = $this->payment
->getAdditionalInformation(PaymentDataAssignObserver::BLIK_CODE);
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pay-now/paynow-magento2",
"description": "Module for Paynow payments",
"type": "magento2-module",
"version": "1.5.1",
"version": "1.5.2",
"license": "MIT",
"config": {
"allow-plugins": {
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Paynow_PaymentGateway" setup_version="1.5.1">
<module name="Paynow_PaymentGateway" setup_version="1.5.2">
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Payment"/>
Expand Down

0 comments on commit 1ea924a

Please sign in to comment.