You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
The text was updated successfully, but these errors were encountered:
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.
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>
The text was updated successfully, but these errors were encountered: