Skip to content

Commit

Permalink
NextPay currency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alitnk committed Oct 15, 2021
1 parent dd5f13b commit 4e3f516
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/drivers/nextpay/index.ts
Expand Up @@ -17,12 +17,13 @@ export class NextPay extends Driver<API.Config> {

const response = await axios.post<API.RequestPaymentReq, { data: API.RequestPaymentRes }>(this.getLinks().REQUEST, {
api_key: this.config.apiKey,
amount,
amount: amount * 10,
callback_uri: callbackUrl,
customer_phone: mobile ? +mobile : undefined,
order_id: this.generateUuid(),
custom_json_fields: customFields,
});

const { code, trans_id } = response.data;

if (code.toString() !== '0') {
Expand All @@ -42,7 +43,7 @@ export class NextPay extends Driver<API.Config> {
const response = await axios.post<API.VerifyPaymentReq, { data: API.VerifyPaymentRes }>(
this.getLinks().VERIFICATION,
{
amount: +amount,
amount: +amount * 10,
trans_id,
api_key: this.config.apiKey,
}
Expand Down

0 comments on commit 4e3f516

Please sign in to comment.