We are encountering an error similar to this when the request returns successfully:
Call to undefined method Webkul\Checkout\Cart::prepareDataForOrder()
This error is preventing the progression to complete the payment process and create the order.
Preconditions
OS: Windows 10 pro
Browser: Chrome 123.0.6312.122 Release
PHP 8.1
Expected Result
[x] The redirect() method redirects to the Stripe server to initiate the payment process. During this process, information from the shopping cart (billing address, shipping rate, discount amount, total amount) is sent to Stripe, and a payment session is initiated. This session will be redirected to a success or cancel URL after completing the payment process.
[ ] The success() method is called when the payment process is successfully completed. This method creates an order and updates its status to "processing". If possible, it also creates an invoice for the order and deactivates the shopping cart. Finally, it redirects to the success page.
[ ] The failure() method is called when the payment process fails or is canceled. This method redirects to the page with the shopping cart and displays an error message.
[ ] The prepareInvoiceData() method prepares the necessary data for creating an invoice for an order. This is used to determine the invoice amount for each item in the order.
Bug Report
https://github.com/codenteq/stripe-payment-gateway/issues/4#issuecomment-2053985734
Issue Description
We are encountering an error similar to this when the request returns successfully:
Call to undefined method Webkul\Checkout\Cart::prepareDataForOrder()
This error is preventing the progression to complete the payment process and create the order.Preconditions
OS: Windows 10 pro Browser: Chrome 123.0.6312.122 Release PHP 8.1
Expected Result
[x] The
redirect()
method redirects to the Stripe server to initiate the payment process. During this process, information from the shopping cart (billing address, shipping rate, discount amount, total amount) is sent to Stripe, and a payment session is initiated. This session will be redirected to a success or cancel URL after completing the payment process.[ ] The
success()
method is called when the payment process is successfully completed. This method creates an order and updates its status to "processing". If possible, it also creates an invoice for the order and deactivates the shopping cart. Finally, it redirects to the success page.[ ] The
failure()
method is called when the payment process fails or is canceled. This method redirects to the page with the shopping cart and displays an error message.[ ] The
prepareInvoiceData()
method prepares the necessary data for creating an invoice for an order. This is used to determine the invoice amount for each item in the order.