Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter key or uid is missing (error code 05) #23

Open
webstudiopro opened this issue Mar 18, 2018 · 1 comment
Open

Parameter key or uid is missing (error code 05) #23

webstudiopro opened this issue Mar 18, 2018 · 1 comment

Comments

@webstudiopro
Copy link

Hello,
I have an error:
Parameter key or uid is missing (error code 05)
My widget in my express controller is:

<code> var widget = new Paymentwall.Widget(
user._id, // id of the end-user who's making the payment
'mw1_1', // widget code, e.g. pw; can be picked in the Widgets section of your merchant account
[ // product details for Flexible Widget Call.
// Leave empty if product selection happens on Paymentwall's side
new Paymentwall.Product(
'test sku id', // id of the product in your system
10, // price
'EUR', // currency code
'In the picture', // product name
// if it is a onetime charge product, you don't need to configure time-based part
Paymentwall.Product.TYPE_SUBSCRIPTION, // this is a time-based product
1, // length of product period
Paymentwall.Product.PERIOD_TYPE_MONTH, // type of product period
true // this is a recurring product
)
],
{'email': user.email} // additional parameters. for full list check API docs
);
console.log(widget.getHtmlCode());
return res.send(widget.getHtmlCode()); </code>

@kkhale
Copy link

kkhale commented Sep 28, 2018

This is because you are not initializing paymentwall. Request you to please add below codes

var Paymentwall = require('paymentwall');
Paymentwall.Configure(
Paymentwall.Base.API_GOODS,
'YOUR_APPLICATION_KEY',
'YOUR_SECRET_KEY'
);

Before making a widget call. This will help Paymentwall to understand the source account for the request. It would be really great if you can also make sure you are passing the correct widget code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants