Sylius / PayPalPlugin

Official integration with PayPal Commerce Platform
37 stars 56 forks source link

"Expected an order id to be passed" error #169

Open HVStechnik opened 3 years ago

HVStechnik commented 3 years ago

Dear Sylius team,

This potentially isn't a bug, but I'm reaching out to you for some help. I'm trying to use the PayPal Commerce plugin. Installation and configuration went well. The PayPal Buttons are visible on the page. However, when a user clicks on the PayPal button, the sandbox api responds with an error: "Expected an order id to be passed". I figured out, that the "create-pay-pal-order-from-cart" route does not return an orderID in my case. When the paypal buttons on the cart and payment pages are clicked, the order stays in the "cart" status without attaching the paypal payment entity. Consequently, $payment->getDetails()['paypal_order_id'] (line 78 in CreatePayPalOrderFromCartAction.php) does not provide an OrderID.

Does anyone know, what I might have missed during configuration, which mich explain this issue?

Thanks!

ghost commented 3 years ago

@HVStechnik, we also had the same problem. It seems related to this issue https://github.com/Sylius/PayPalPlugin/issues/165 in which we found a solution.