pmclain / module-stripe

Stripe Payments for Magento 2
Open Software License 3.0
47 stars 21 forks source link

When Stripe returns insufficient funds, the payment message is server error #15

Closed FrederikNordahl closed 7 years ago

FrederikNordahl commented 7 years ago

Hey there!

When a person tries to pay with a debit card which doesn't have enough funds, the payment system in Magento returns "An error occurred on the server. Please try to place the order again" as a message.

How can I fix this?

Regards, Frederik

pmclain commented 7 years ago

What magento version are you using?

FrederikNordahl commented 7 years ago

Magento 2.1.8

pmclain commented 7 years ago

Upgrading to Magento 2.1.9 will correct this. All previous versions pass a hard-coded exception message back to checkout.

https://github.com/magento/magento2/blob/34fc8d8b034badc36ac9a91dca30e49538d09284/app/code/Magento/Checkout/Model/PaymentInformationManagement.php#L72 https://github.com/magento/magento2/blob/34fc8d8b034badc36ac9a91dca30e49538d09284/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php#L84

anilthummar commented 6 years ago

Hiii,

i have used text mode api key in stripe for payment in android: getting exception like this , Please help me.

com. W/System.err: com.stripe.exception.InvalidRequestException: You have insufficient funds in your Stripe account. One likely reason you have insufficient funds is that your funds are automatically being paid out; try enabling manual payouts by going to https://dashboard.stripe.com/account/payouts.; code: balance_insufficient; request-id: req_jgFfgdvfsdDvoUJ com. W/System.err: at com.stripe.net.LiveStripeResponseGetter.handleAPIError(LiveStripeResponseGetter.java:693) at com.stripe.net.LiveStripeResponseGetter.staticRequest(LiveStripeResponseGetter.java:533)

Thank you