Commit eab91c54 authored by Vincent Mrose's avatar Vincent Mrose 💬
Browse files

Fixes #6



Reserve uses paymentInstrumentID even when the payment method doesn't
support it
Signed-off-by: Vincent Mrose's avatarVincent Mrose <v.mrose@crefopay.de>
parent 0912d4f4
......@@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
## [0.9.2-paymentInstrumentId] - 2019-03-26
### Fixed
- Customers can now pay with another payment method after getting rejected by solvency checks (#6)
## [0.9.2] - 2019-03-22
### Fixed
- The module now works with PHP 7.0 as well
......
......@@ -41,6 +41,10 @@ class DataAssignObserver extends AbstractDataAssignObserver
$additionalInformationKey,
$additionalData[$additionalInformationKey]
);
} elseif ($paymentInfo->hasAdditionalInformation($additionalInformationKey)) {
$paymentInfo->unsAdditionalInformation(
$additionalInformationKey
);
}
}
}
......
......@@ -22,4 +22,20 @@
<observer name="crefopay_gateway_data_assign" instance="Trilix\CrefoPay\Observer\DataAssignObserver" />
<observer name="crefopay_customer_update" instance="Trilix\CrefoPay\Observer\UpdateCustomer" />
</event>
<event name="payment_method_assign_data_crefopay_cash_in_advance">
<observer name="crefopay_gateway_data_assign" instance="Trilix\CrefoPay\Observer\DataAssignObserver" />
</event>
<event name="payment_method_assign_data_crefopay_cash_on_delivery">
<observer name="crefopay_gateway_data_assign" instance="Trilix\CrefoPay\Observer\DataAssignObserver" />
</event>
<event name="payment_method_assign_data_crefopay_paypal">
<observer name="crefopay_gateway_data_assign" instance="Trilix\CrefoPay\Observer\DataAssignObserver" />
</event>
<event name="payment_method_assign_data_crefopay_sofort">
<observer name="crefopay_gateway_data_assign" instance="Trilix\CrefoPay\Observer\DataAssignObserver" />
</event>
</config>
......@@ -29,6 +29,15 @@ define(
});
},
getData: function () {
var data = {
'method': this.getCode(),
'additional_data': {}
};
return data;
},
getCrefoPayMethodCode: function () {
return window.checkoutConfig.payment[this.getCode()].crefoPayMethodCode;
}
......
......@@ -29,6 +29,15 @@ define(
});
},
getData: function () {
var data = {
'method': this.getCode(),
'additional_data': {}
};
return data;
},
getCrefoPayMethodCode: function () {
return window.checkoutConfig.payment[this.getCode()].crefoPayMethodCode;
}
......
......@@ -43,6 +43,15 @@ define(
window.location.replace(redirectUrl);
},
getData: function () {
var data = {
'method': this.getCode(),
'additional_data': {}
};
return data;
},
getCrefoPayMethodCode: function () {
return window.checkoutConfig.payment[this.getCode()].crefoPayMethodCode;
}
......
......@@ -43,6 +43,15 @@ define(
window.location.replace(redirectUrl);
},
getData: function () {
var data = {
'method': this.getCode(),
'additional_data': {}
};
return data;
},
getCrefoPayMethodCode: function () {
return window.checkoutConfig.payment[this.getCode()].crefoPayMethodCode;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment