Hi everyone,
Over the past couple of weeks I have been getting some anomalies with express checkout and the orders getting set to processing (paid - and/or whatever you have yours set to) when the actual order has not been paid and/or the "payment" may be in authorized mode but not captured (Payment tab has no transaction id and state is Authorization - Operations button is "Capture").
I have just begun debugging this (adding logging for each return and response) and here are my observations so far -
When an order like this comes through (I am getting "good/really paid for" orders, just the ones that meet the criteria above), I get 4 errors in in my log messages -
Message Notice: Undefined index: PAYMENTINFO_0_PAYMENTSTATUS in Drupal\commerce_paypal\Plugin\Commerce\PaymentGateway\ExpressCheckout->onReturn() (line 305
Message Notice: Undefined index: PAYMENTINFO_0_TRANSACTIONID in Drupal\commerce_paypal\Plugin\Commerce\PaymentGateway\ExpressCheckout->onReturn() (line 315
Message Notice: Undefined index: PAYMENTINFO_0_PAYMENTSTATUS in Drupal\commerce_paypal\Plugin\Commerce\PaymentGateway\ExpressCheckout->onReturn() (line 316
Message Notice: Undefined index: PAYMENTINFO_0_PAYMENTSTATUS in Drupal\commerce_paypal\Plugin\Commerce\PaymentGateway\ExpressCheckout->onReturn() (line 322
In the error case the Url its requesting is -
https://www.example.com/checkout/orderId/payment/return?PayerID=BlahBlah&token=EC-MoreBlahBlah
The referrer is -
https://www.paypal.com/webapps/hermes?flow=1-P&ulReturn=true&token=EC-MoreBlahBlah&return=https://www.example.com/checkout/orderId/payment/return&cancel=https://www.example.com/checkout/orderId/payment/cancel&total=someTotal&country.x=US&locale.x=en_US
Im a little concerned about onReturn() function not checking for integral/"set" variables in the array plus the 'PAYERID' and 'payerid' within the code wherein the query string is PayerID, but I havent fully gotten into it.
I am running this in production and am an experienced programmer so if you need any help/testing/etc. with this module let me know.
Any thoughts/insight would be much appreciated (especially on how/where the order gets set to processing when the payment has not completed).
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#7 | drupal.commerce_paypal.handle-paypal-failures.exceeded-card-limit.patch | 1.51 KB | pajor |
Comments
Comment #2
Vision Scaler CreditAttribution: Vision Scaler commentedComment #3
Vision Scaler CreditAttribution: Vision Scaler commentedComment #4
Vision Scaler CreditAttribution: Vision Scaler commentedSorry, trying to get the urls to fully show :).
Comment #5
bojanz CreditAttribution: bojanz at Centarro commentedWe need patches! We only run Braintree on production (since it has a more modern Express Checkout implementation), which has left the PayPal module lingering in beta.
Comment #6
s.messaris CreditAttribution: s.messaris commentedHi, we just tried to add this module on a client side and came upon these errors during testing with a sandbox account. @Vision Scaler did your debugging turn up anything?
Comment #7
pajor CreditAttribution: pajor at Cheppers commentedHi! We also encountered with this issue when the buyer exceeds his/her card limit. After checking out to paypal we were instantly dropped back to drupal with a completed order, however the payment status was 'authorization' and basically it was bought for free. I made a small patch to handle paypal error response.
Comment #8
kala4ekWe faced with this problem on the latest project.
The issue was solved almost the same way as #7.
Do not setting RTBC, because I can not test #7 patch right now, but it looks like the right patch.
Comment #9
mglamanWe are reviewing this at DrupalCon
Comment #10
mglamanWe should document this error code. Link to https://developer.paypal.com/docs/classic/express-checkout/ht_ec_funding..., will do on commit.
Comment #12
mglamanTagging aestigarribia who helped me QA at DrupalCon
Comment #14
mglamanThank you, everyone! Committed! A new beta will be rolled out post DrupalCon