powercash21
v1.0.3
Published
Powercash21 API NodeJS SDK
Downloads
1
Keywords
Readme
powercash21 Hosted Payment Integration
Example
var Powercash21 = require('powercash21');
var data = {
options: {
baseURL: 'https://sandbox.powercash21.com',
secret: "b185",
debug: true
},
amount: 1.00,
city: "Kobenhavn",
currency: "EUR",
customerid: "98771717-90978787-78787",
customerip: "2.17.3.25",
email: "[email protected]",
firstname: "Muster",
language: "da",
lastname: "Mann",
merchantid: "gateway_test",
orderid: "1234-123456789-4321",
payment_method: "1",
url_return: "https://www.example.com/ipn/powercash21",
zip: "89776"
};
var powercash21HostedPayment = new Powercash21.HostedPayment(data);
powercash21HostedPayment.payPaymentInit().then(console.log);
// { errorcode: '0',
// errorcodes: '',
// errormessage: '',
// sessionid: '1cb91de51b3c2b25c448d75f3bc6821627c9084c',
// transactionid: '303745194',
// user_id: '355818',
// start_url: 'https://sandbox.powercash21.com/iframes/en/1cb91de51b3c2b25c448d75f3bc6821627c9084c/payment_continue/1' }
Check out the documentation for specifics of the implementation