Adamw has submitted this change and it was merged. Change subject: Adding new payment types to the out-logger. For all the payment types that do not return to the payments cluster, we want to add the final status at the last point in time that we see that donor. ......................................................................
Adding new payment types to the out-logger. For all the payment types that do not return to the payments cluster, we want to add the final status at the last point in time that we see that donor. Change-Id: I08728a9a7a0620d361edf99dc52b3c034e8c1e0a --- M globalcollect_gateway/globalcollect.adapter.php 1 file changed, 15 insertions(+), 2 deletions(-) Approvals: Adamw: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/globalcollect_gateway/globalcollect.adapter.php b/globalcollect_gateway/globalcollect.adapter.php index e380842..334e392 100644 --- a/globalcollect_gateway/globalcollect.adapter.php +++ b/globalcollect_gateway/globalcollect.adapter.php @@ -638,14 +638,17 @@ $this->payment_methods['dd'] = array( 'label' => 'Direct Debit', 'types' => array( 'dd_at', 'dd_be', 'dd_ch', 'dd_de', 'dd_es','dd_fr', 'dd_gb', 'dd_it', 'dd_nl', ), - 'validation' => array( 'creditCard' => false, ) + 'validation' => array( 'creditCard' => false, ), + 'short_circuit_at' => 'first_iop', ); // eWallets $this->payment_methods['ew'] = array( 'label' => 'eWallets', 'types' => array( 'ew_cashu', 'ew_moneybookers', 'ew_paypal', 'ew_webmoney', 'ew_yandex' ), - 'validation' => array( 'address' => false, 'creditCard' => false, ) + 'validation' => array( 'address' => false, 'creditCard' => false, ), + 'short_circuit_at' => 'first_iop', + 'additional_success_status' => array( 20 ), ); // Bank Transfers @@ -660,12 +663,16 @@ $this->payment_methods['rtbt'] = array( 'label' => 'Real time bank transfer', 'types' => array( 'rtbt_ideal', 'rtbt_eps', 'rtbt_sofortuberweisung', 'rtbt_nordea_sweden', 'rtbt_enets', ), + 'short_circuit_at' => 'first_iop', + 'additional_success_status' => array( 20 ), ); // Cash payments $this->payment_methods['cash'] = array( 'label' => 'Cash payments', 'types' => array( 'cash_boleto', ), + 'short_circuit_at' => 'first_iop', + 'additional_success_status' => array( 20 ), ); } @@ -1464,6 +1471,12 @@ //if we're of a type that sends donors off never to return, we should record that here. $payment_info = $this->getPaymentMethodMeta( $this->getPaymentMethod() ); if ( array_key_exists( 'short_circuit_at', $payment_info ) && $payment_info['short_circuit_at'] === 'first_iop' ){ + if ( array_key_exists( 'additional_success_status', $payment_info ) && is_array( $payment_info['additional_success_status'] ) ){ + foreach ( $payment_info['additional_success_status'] as $status ){ + //mangle the definition of success. + $this->addCodeRange( 'GET_ORDERSTATUS', 'STATUSID', 'complete', $status ); + } + } $this->setTransactionWMFStatus( $this->findCodeAction( 'GET_ORDERSTATUS', 'STATUSID', $data['STATUSID'] ) ); } break; -- To view, visit https://gerrit.wikimedia.org/r/51817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08728a9a7a0620d361edf99dc52b3c034e8c1e0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Katie Horn <kh...@wikimedia.org> Gerrit-Reviewer: Adamw <awi...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits