Nelsa Posted August 23, 2017 Report Posted August 23, 2017 Few days ago one of our clients made mistake and add Publishable key insted secret key to stripe module, and few hours latter blesta try to charge from his client credit card, stripe reject charge request as it should with 403 error but blesta has accepted transaction as sucessfull.Now few minutes ago I wanted to replicate same situation and it happen again,while blesta throw error " An error occured when processing the request with the gateway " on payment form, in background it accept payment and tag invoice as succesfully paid,send confirmation email and activate service...Blesta version is 4.0 Stripe response { "error": { "type": "invalid_request_error", "message": "This API call cannot be made with a publishable API key. Please use a secret API key. You can find a list of your API keys at https://dashboard.stripe.com/account/apikeys." } } Here is screenshot from gateway log in Blesta Error on payment form In same time invoice shown as paid and service activated
Jono Posted August 23, 2017 Report Posted August 23, 2017 I have confirmed this as a bug (CORE-2447). If you wanted to fix this yourself, in /components/gateways/merchant/stripe_gateway/strip_gateway.php on lines 336, 534, and 956 change if (!isset($response['error'])) { to if (!isset($response['error']) && empty($errors)) { That should prevent this kind of bug from happening. Beav and Blesta Addons 2
Jono Posted September 5, 2017 Report Posted September 5, 2017 On 9/1/2017 at 4:42 PM, Lucas said: Line 1272 doesn't need to be changed? Fair point. That line will not affect the error message, or cause any transaction to be approved that shouldn't, but it will affect whether the logs correctly mark the response as an error.
Recommended Posts