From 1e0836b4a9bde5d8c0d7b21c7f1aae6ddb1c08f6 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 19 Aug 2012 10:42:06 +0200 Subject: [PATCH] payment: Also accept the 'pending-review' state... We may not have the proper IPN notification.. so we will attempt to capture the payment in that state and check if PayPal accepts it. --- app/models/spree/billing_integration/paypal_express_base.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/spree/billing_integration/paypal_express_base.rb b/app/models/spree/billing_integration/paypal_express_base.rb index f326a5a..f3dd0f2 100644 --- a/app/models/spree/billing_integration/paypal_express_base.rb +++ b/app/models/spree/billing_integration/paypal_express_base.rb @@ -43,7 +43,8 @@ class Spree::BillingIntegration::PaypalExpressBase < Spree::BillingIntegration logs = payment.log_entries.all(:order => 'created_at DESC') logs.each do |log| details = YAML.load(log.details) # return the transaction details - if (details.params['payment_status'] == 'Pending' && details.params['pending_reason'] == 'authorization') + if (details.params['payment_status'] == 'Pending' && + (details.params['pending_reason'] == 'authorization' || details.params['pending_reason'] == 'payment-review')) return details end end