Uncaught Error: Expected an order id to be passed

satish8
Contributor
Contributor

I am getting this error -> Uncaught Error: Expected an order id to be passed at https://www.sandbox.paypal.com/smart/buttons.... Please help, Paypal javascript SDK (PHP) on Joomla Virtuemart cart page.

 

I am adding PayPal and pay later buttons but facing the above error from last month.

If someone knows about the error please help me 

 

Login to Me Too
1 REPLY 1

Kavyar
Moderator
Moderator

Good day, @satish8 

 

Thank you for posting to the PayPal community.

 

It seems there's an issue with a third-party plugin/module that is not properly sending valid API calls to PayPal.

 

I would like to provide you with some important information regarding the creation and capture of orders. Please keep the following points in mind:

 

  1. Access Token: It is crucial to create an  access token and include it in every request you make.

       2. Authorization: All orders must be authorized before they can be captured.

 

       3. Order Expiry: Please note that orders expire within 3 hours if they are not authorized.

 

If you try to capture an order without including an access token in the authorization header, you will receive an AUTHENTICATION_FAILURE error message.

 

Similarly, if you attempt to capture an order that has not been authorized, you will receive an "ORDER_NOT_APPROVED" error message.

 

Lastly, if you try to capture an order that is over 3 hours old, you will receive a "RESOURCE_NOT_FOUND" error.

 

To ensure a smooth process, please make sure to go through the buyer checkout process when creating your order. You may need to paste the URL into a browser.

 

Once you have approved the order, please capture it while ensuring that you include the access token in the authorization header. This will help avoid any errors related to the order ID.

 

If your still facing issues, please create an MTS ticket via - https://www.paypal-support.com/s/?language=en_US  with the detailed information and error details.

 

Sincerely,

Kavya

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.