Ejegg has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/381918 )
Change subject: Fix missing order status
......................................................................
Fix missing order status
When GlobalCollect's processResponse message encounters an error,
it bails out before unstaging things, so getData..('gateway_status')
returns null.
Restores the old logic for the GlobalCollect adapter but still uses
the unstaged stuff for the Ingenico child adapter.
Bug: T176355
Change-Id: I2321827d6b8d7240f3a4f804dbd48f24b80c2b63
---
M globalcollect_gateway/globalcollect.adapter.php
M ingenico_gateway/ingenico.adapter.php
2 files changed, 12 insertions(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/18/381918/1
diff --git a/globalcollect_gateway/globalcollect.adapter.php
b/globalcollect_gateway/globalcollect.adapter.php
index a117d60..7059d6e 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -668,7 +668,7 @@
$order_status_results = false;
if ( !$cancelflag && !$problemflag ) {
- $statusCode = $this->getData_Unstaged_Escaped(
'gateway_status' );
+ $statusCode = $this->getStatusCode(
$this->getTransactionData() );
if ( $statusCode ) {
if ( is_null( $original_status_code ) )
{
$original_status_code =
$statusCode;
@@ -1790,4 +1790,11 @@
protected function approvePayment() {
return $this->do_transaction( 'SET_PAYMENT' );
}
+
+ protected function getStatusCode( $txnData ) {
+ if ( isset( $txnData['STATUSID'] ) ) {
+ return $txnData['STATUSID'];
+ }
+ return null;
+ }
}
diff --git a/ingenico_gateway/ingenico.adapter.php
b/ingenico_gateway/ingenico.adapter.php
index f582548..ac1f792 100644
--- a/ingenico_gateway/ingenico.adapter.php
+++ b/ingenico_gateway/ingenico.adapter.php
@@ -268,4 +268,8 @@
protected function approvePayment() {
return $this->do_transaction( 'approvePayment' );
}
+
+ protected function getStatusCode( $txnData ) {
+ return $this->getData_Unstaged_Escaped( 'gateway_status' );
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/381918
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2321827d6b8d7240f3a4f804dbd48f24b80c2b63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits