Jump to content
thirty bees forum
  • 0

Stripe Checkout Failure


Kevin13952

Question

I'm getting the following during debug of the Stripe Module V1.7.1 downloaded today (2022.09.06) from the thirtybees marketplace.

 

ThirtyBeesException

You cannot use `line_items.amount`, `line_items.currency`, `line_items.name`, `line_items.description`, or `line_items.images` in this API version. Please use `line_items.price` or `line_items.price_data`. Please see https://stripe.com/docs/payments/checkout/migrating-prices for more information.

in file modules/stripe/classes/GuzzleClient.php at line 237

Source file: modules/stripe/classes/GuzzleClient.php

218:                    $rheaders[$name] = $values;
219:                }
220:            }
221:        } catch (BadResponseException $e) {
222:            $headers = [];
223:            foreach ($e->getResponse()->getHeaders() as $name => $values) {
224:                if (is_array($values)) {
225:                    $headers[$name] = implode(', ', $values);
226:                } elseif (is_string($values)) {
227:                    $headers[$name] = $values;
228:                }
229:            }
230:            $message = 'Could not connect with Stripe';
231:            try {
232:                $json = json_decode((string)$e->getResponse()->getBody(), true);
233:                if (isset($json['error']['message'])) {
234:                    $message = $json['error']['message'];
235:                }
236:            } catch (\Exception $ignored) {}
237:            throw new Error\ApiConnection(
238:                $message,
239:                $e->getResponse()->getStatusCode(),
240:                (string) $e->getResponse()->getBody(),
241:                json_encode((string) $e->getResponse()->getBody()),
242:                $headers
243:            );
244:        } catch (\Exception $e) {
245:            throw new Error\ApiConnection('Could not connect with Stripe: ' . $e);
246:        }
247:

Stack trace

1. modules/stripe/vendor/stripe/stripe-php/lib/ApiRequestor.php:341 source StripeModule\GuzzleClient->request(arguments)
2. modules/stripe/vendor/stripe/stripe-php/lib/ApiRequestor.php:112 source ThirtyBeesStripe\Stripe\ApiRequestor->_requestRaw(arguments)
3. modules/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Request.php:52 source ThirtyBeesStripe\Stripe\ApiRequestor->request(arguments)
4. modules/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Create.php:22 source ThirtyBeesStripe\Stripe\ApiResource::_staticRequest(arguments)
5. modules/stripe/classes/StripeApi.php:102 source ThirtyBeesStripe\Stripe\Checkout\Session::create(arguments)
6. modules/stripe/stripe.php:2776 source StripeModule\StripeApi->createCheckoutSession(arguments)
7. modules/stripe/stripe.php:2250 source Stripe->getCheckoutSession()
8. classes/Hook.php:769 source Stripe->hookDisplayPaymentTop(arguments)
9. classes/Hook.php:471 source HookCore::coreCallHook(arguments)
10. classes/Hook.php:288 source HookCore::execWithoutCache(arguments)
11. controllers/front/OrderOpcController.php:880 source HookCore::exec(arguments)
12. controllers/front/OrderOpcController.php:733 source OrderOpcControllerCore->_assignPayment()
13. classes/controller/Controller.php:210 source OrderOpcControllerCore->initContent()
14. classes/controller/FrontController.php:255 source ControllerCore->run()
15. classes/Dispatcher.php:852 source FrontControllerCore->run()
16. ./index.php:33 source DispatcherCore->dispatch()
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...