mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 01:55:41 +00:00
fix: ( payment ) remove /100
This commit is contained in:
@@ -194,7 +194,7 @@ export class DMoneyProvider implements PaymentProvider {
|
|||||||
private buildPreOrderRequest(
|
private buildPreOrderRequest(
|
||||||
input: ProviderInitiationInput,
|
input: ProviderInitiationInput,
|
||||||
): DMoneyPreOrderRequest {
|
): DMoneyPreOrderRequest {
|
||||||
const totalAmount = (input.amountMinor / 100).toFixed(2);
|
const totalAmount = (input.amountMinor).toFixed(2);
|
||||||
const redirectUrl = input.redirectUrl ?? this.returnUrl;
|
const redirectUrl = input.redirectUrl ?? this.returnUrl;
|
||||||
const req = {
|
const req = {
|
||||||
timestamp: createTimestamp(),
|
timestamp: createTimestamp(),
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ export class TelebirrProvider implements PaymentProvider {
|
|||||||
private buildCreateOrderRequest(
|
private buildCreateOrderRequest(
|
||||||
input: ProviderInitiationInput,
|
input: ProviderInitiationInput,
|
||||||
): CreateOrderRequest {
|
): CreateOrderRequest {
|
||||||
const totalAmount = String(input.amountMinor / 100);
|
const totalAmount = String(input.amountMinor);
|
||||||
const req = {
|
const req = {
|
||||||
timestamp: createTimestamp(),
|
timestamp: createTimestamp(),
|
||||||
nonce_str: createNonceStr(),
|
nonce_str: createNonceStr(),
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ export class WaafiProvider implements PaymentProvider {
|
|||||||
|
|
||||||
/** Convert integer minor units to a 2-decimal major amount (truncated, never rounded up). */
|
/** Convert integer minor units to a 2-decimal major amount (truncated, never rounded up). */
|
||||||
private toAmount(amountMinor: number): number {
|
private toAmount(amountMinor: number): number {
|
||||||
return Math.trunc(amountMinor) / 100;
|
return Math.trunc(amountMinor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private timestamp(): string {
|
private timestamp(): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user