https://www.mediawiki.org/wiki/Special:Code/MediaWiki/102186
Revision: 102186
Author: khorn
Date: 2011-11-06 19:55:17 +0000 (Sun, 06 Nov 2011)
Log Message:
-----------
Adds the original transaction response status to the set_payment response, just
prior to the stomp message being constructed so we can see the original status
in stomp.
r102081
Modified Paths:
--------------
trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro.adapter.php
Modified: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
===================================================================
--- trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
2011-11-06 19:15:55 UTC (rev 102185)
+++ trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
2011-11-06 19:55:17 UTC (rev 102186)
@@ -832,7 +832,6 @@
$pulled_data = $this->getResponseData(
$formatted );
$this->setTransactionResult( $pulled_data,
'data' );
- //TODO: Death to the pulled_data parameter!
$this->processResponse( $pulled_data ); //now
we've set all the transaction results...
//well, almost all.
Modified:
trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
===================================================================
---
trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
2011-11-06 19:15:55 UTC (rev 102185)
+++
trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
2011-11-06 19:55:17 UTC (rev 102186)
@@ -799,6 +799,8 @@
if ( !$cancelflag && !$problemflag ) {
$order_status_results =
$this->getTransactionWMFStatus();
+ $txn_data = $this->getTransactionData();
+ $original_status_code = isset( $txn_data['STATUSID']) ?
$txn_data['STATUSID'] : 'NOT SET';
if (!$order_status_results){
$problemflag = true;
$problemmessage = "We don't have a Transaction
WMF Status after doing a GET_ORDERSTATUS.";
@@ -834,7 +836,9 @@
if ( !$cancelflag ){
$final = $this->do_transaction( 'SET_PAYMENT' );
if ( isset( $final['status'] ) &&
$final['status'] === true ) {
- $this->setTransactionWMFStatus(
$order_status_results ); //this had damn well better exist if we got this far.
+ $this->setTransactionWMFStatus(
$order_status_results );
+ //get the old status from the first
txn, and add in the part where we set the payment.
+ $this->setTransactionResult( "Original
Response Status (pre-SET_PAYMENT): " . $original_status_code, 'txn_message' );
$this->runPostProcessHooks(); //stomp
is in here
$this->unsetAllSessionData();
} else {
@@ -844,7 +848,7 @@
} else {
$final = $this->do_transaction(
'CANCEL_PAYMENT' );
if ( isset( $final['status'] ) &&
$final['status'] === true ) {
- $this->setTransactionWMFStatus(
'failed' );
+ $this->setTransactionWMFStatus(
$order_status_results );
$this->unsetAllSessionData();
} else {
$problemflag = true;
Modified:
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro.adapter.php
===================================================================
---
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro.adapter.php
2011-11-06 19:15:55 UTC (rev 102185)
+++
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro.adapter.php
2011-11-06 19:55:17 UTC (rev 102186)
@@ -235,7 +235,9 @@
*/
function processResponse( $response ) {
//set the transaction result message
- $this->setTransactionResult( $response['RESPMSG'],
'txn_message' );
+ if ( isset( $response['RESPMSG'] ) ){
+ $this->setTransactionResult( $response['RESPMSG'],
'txn_message' );
+ }
if ( isset( $response['PNREF'] ) ){
$this->setTransactionResult( $response['PNREF'],
'gateway_txn_id' );
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs