Ejegg has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/386256 )
Change subject: Revert "Handle payment not initiated"
......................................................................
Revert "Handle payment not initiated"
This reverts commit 2eff18302b1736bef07428ea8e15fac84c7a43ab.
Change-Id: I70a45cbdfc5d3883aeb8502080d9778f646b5650
---
M paypal_gateway/express_checkout/paypal_express.adapter.php
1 file changed, 16 insertions(+), 28 deletions(-)
Approvals:
Ejegg: Verified; Looks good to me, approved
diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php
b/paypal_gateway/express_checkout/paypal_express.adapter.php
index 8796f13..a509b37 100644
--- a/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ b/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -440,16 +440,6 @@
case 'GetExpressCheckoutDetails':
$this->checkResponseAck( $response );
- if ( $response['CHECKOUTSTATUS'] &&
$response['CHECKOUTSTATUS'] === 'PaymentActionNotInitiated' ) {
- $this->finalizeInternalStatus(
FinalStatus::PENDING );
-
$this->transaction_response->setRedirect(
-
$this->account_config['RedirectURL'] .
-
$this->getData_Unstaged_Escaped( 'gateway_session_id' )
- );
- $fatal = false;
- break;
- }
-
// Merge response into our transaction data.
// TODO: Use getFormattedData instead.
// FIXME: We don't want to allow overwriting of
ctid, need a
@@ -565,24 +555,22 @@
ResponseCodes::UNKNOWN );
}
- if ( $this->getFinalStatus() !== FinalStatus::PENDING ) {
- if ( $this->getData_Unstaged_Escaped( 'recurring' ) ) {
- // Set up recurring billing agreement.
- $this->addRequestData( array(
- 'date' => time()
- ) );
- $resultData = $this->do_transaction(
'CreateRecurringPaymentsProfile' );
- if ( !$resultData->getCommunicationStatus() ) {
- throw new ResponseProcessingException(
- 'Failed to create a recurring
profile', ResponseCodes::UNKNOWN );
- }
- } else {
- // One-time payment, or initial payment in a
subscription.
- $resultData = $this->do_transaction(
'DoExpressCheckoutPayment' );
- if ( !$resultData->getCommunicationStatus() ) {
- $this->finalizeInternalStatus(
FinalStatus::FAILED );
- return PaymentResult::newFailure();
- }
+ if ( $this->getData_Unstaged_Escaped( 'recurring' ) ) {
+ // Set up recurring billing agreement.
+ $this->addRequestData( array(
+ 'date' => time()
+ ) );
+ $resultData = $this->do_transaction(
'CreateRecurringPaymentsProfile' );
+ if ( !$resultData->getCommunicationStatus() ) {
+ throw new ResponseProcessingException(
+ 'Failed to create a recurring profile',
ResponseCodes::UNKNOWN );
+ }
+ } else {
+ // One-time payment, or initial payment in a
subscription.
+ $resultData = $this->do_transaction(
'DoExpressCheckoutPayment' );
+ if ( !$resultData->getCommunicationStatus() ) {
+ $this->finalizeInternalStatus(
FinalStatus::FAILED );
+ return PaymentResult::newFailure();
}
}
return PaymentResult::fromResults(
--
To view, visit https://gerrit.wikimedia.org/r/386256
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I70a45cbdfc5d3883aeb8502080d9778f646b5650
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Mepps <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Mepps <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits