Promise based wrapper client for Gcash.
npm i @spbrewery/gcash
The methods return promises which are compatible to be used on async/await functions. The default configuration settings can be overridden on the constructor of BreweryGcash
.
const { BreweryGcash } = require('@spbrewery/gcash');
const breweryGcashClient = new BreweryGcash({
clientId: 'id',
clientSecret: 'secret',
url: 'http://url.com',
});
breweryGcashClient.createOrder({
...restOfParameters,
})
.then((data) => {
console.log(data);
})
.catch(error) => {
console.log(error);
});