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.
This commit is contained in:
Holger Hans Peter Freyther 2012-08-19 10:42:06 +02:00
parent 442c8cb365
commit 1e0836b4a9
1 changed files with 2 additions and 1 deletions

View File

@ -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