Payment Method : PayPalSmartPaymentButtons

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
HI

I have configured the Payments.PayPalSmartPaymentButtons but when I go for the payment, I am receiving below error, Please guide

Error: Expected an order id to be passed

Thank you
Dev
4 years ago
Are you using the plugin offered by NopCommerce team or the plugin offered by foxnetsoft ? What the error is saying is that the paypal expects an order id as one of the parameter which has not been supplied. It's hard to tell what exactly is wrong with the plugin without more information.
4 years ago
Thank you

We are using the plugin offered by NopCommerce team, We have configured everything right Client ID, Secret and Payment Type Authorize / Capture, we have tried with both.

We understanding the error but order not yet created so how come we will send order id, and I have not seen any configuration for that  

Thank you

Regards
Dev
4 years ago
tdevkumar wrote:
Thank you

We are using the plugin offered by NopCommerce team, We have configured everything right Client ID, Secret and Payment Type Authorize / Capture, we have tried with both.

We understanding the error but order not yet created so how come we will send order id, and I have not seen any configuration for that  

Thank you

Regards
Dev


I have tested the plugin by my paypal sandbox account for nopCommerce4.2. It is working expectedly.  It is not a redirect plugin so "OrderId" should not be needed.  But in the code, there are lines like

            var orderIdKey = _localizationService.GetResource("Plugins.Payments.PayPalSmartPaymentButtons.OrderId");

  if (!processPaymentRequest.CustomValues.TryGetValue(orderIdKey, out var orderId) || string.IsNullOrEmpty(orderId?.ToString()))
                throw new NopException("Failed to get the PayPal order ID");

This is not that typical orderid i.e not order table Id. Rather it is "PayPal order ID". Order has been created at paypal side.
4 years ago
tdevkumar wrote:

I am receiving below error, Please guide
Error: Expected an order id to be passed


Hi.
On checkout at the payment information step purchase details are preliminarily sent to PayPal and the created order id is returned.
In your case apparently the order cannot be created.
We need more information to understand what the error is. Check the system log, browser console to find details.
4 years ago
RomanovM wrote:

...
We need more information to understand what the error is. Check the system log, browser console to find details.

Hi.
I tested the plugin using my sandbox account for nopCom 4.2. And although It is working ... BUT on the page, http://localhost:15536/Admin/PayPalSmartPaymentButtons/Configure  after SAVE ... I got the message ... Webhook was not created, so some functions may not work correctly (see details in the log). Could you clarify where and how should I fix it? ...I didn't find any information about Webhook.
Best Regards.
4 years ago
abch wrote:
I got the message ... Webhook was not created, so some functions may not work correctly (see details in the log). Could you clarify where and how should I fix it?


Hi.
Obviously, you need to see details in the log.
You can find out for example something like this:
4 years ago
Hi, I have the same problem. Where do I set up the webhook?

Thank you
4 years ago
tdevkumar wrote:
HI

I have configured the Payments.PayPalSmartPaymentButtons but when I go for the payment, I am receiving below error, Please guide

Error: Expected an order id to be passed

Thank you
Dev


I have the same problem.

Can someone help me?

Thank you.
4 years ago
Hi,

Just wading into this post to se if anything was resolved or fixed as I am experiencing exactly the same issue with the nopCommerce plugin on v4.2 installation.

Payments.PayPalSmartPaymentButtons error:
One or more errors occurred. ({"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect, or violates schema.","debug_id":"ec93d4777b33a","details":[{"field":"/payer/phone/phone_number/national_number","value":"+4475515999","location":"body","issue":"INVALID_PARAMETER_SYNTAX","description":"The value of a field does not conform to the expected format."}],"links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX","rel":"information_link","encType":"application/json"}]})
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.