From 47f903db9fba6c16cfaf726f9b5fe3505d31979a Mon Sep 17 00:00:00 2001 From: Claudemir Todo Bom Date: Wed, 24 Jul 2024 21:55:53 -0300 Subject: [PATCH] update invoice value based on plan value - fix #63 --- backend/src/services/PaymentGatewayServices/EfiServices.ts | 1 + backend/src/services/PaymentGatewayServices/OwenServices.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/src/services/PaymentGatewayServices/EfiServices.ts b/backend/src/services/PaymentGatewayServices/EfiServices.ts index b246e74c..52867d6a 100644 --- a/backend/src/services/PaymentGatewayServices/EfiServices.ts +++ b/backend/src/services/PaymentGatewayServices/EfiServices.ts @@ -277,6 +277,7 @@ export const efiCreateSubscription = async ( const efiPay = new EfiPay(efiOptions); const pix = await efiPay.pixCreateImmediateCharge([], body); await invoice.update({ + value: price, txId: pix.txid, payGw: "efi", payGwData: JSON.stringify(pix) diff --git a/backend/src/services/PaymentGatewayServices/OwenServices.ts b/backend/src/services/PaymentGatewayServices/OwenServices.ts index 11fd2d35..59b304f6 100644 --- a/backend/src/services/PaymentGatewayServices/OwenServices.ts +++ b/backend/src/services/PaymentGatewayServices/OwenServices.ts @@ -202,6 +202,7 @@ export const owenCreateSubscription = async ( qrData ); invoice.update({ + value: price, txId: qrResult.data.data.qrcodeId, payGw: "owen", payGwData: JSON.stringify(qrResult.data.data)