From d766813bc019aa81c1d1c0410cfeb6a4f3c22c28 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 12 Feb 2024 14:42:00 -0500 Subject: [PATCH] fix new card call --- src/app/accounts/addcredit/addcredit.page.ts | 24 +++++++++++--------- src/app/services/wrench.service.ts | 4 ++++ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/app/accounts/addcredit/addcredit.page.ts b/src/app/accounts/addcredit/addcredit.page.ts index eae099e..d3a9f6c 100644 --- a/src/app/accounts/addcredit/addcredit.page.ts +++ b/src/app/accounts/addcredit/addcredit.page.ts @@ -399,20 +399,27 @@ export class AddcreditPage implements OnInit { } if (this.processor == 5000) { this.isProcessDisabled = true; - this.payPevCreditData = { + + + this.payNewCreditData = { member_id: this.sessionDataProviderService.member_id, sessionid: this.sessionDataProviderService.session, uid: this.sessionDataProviderService.member_uid, currency: this.currency_code, amount: this.startCreditResult.amount, credit_reference: this.startCreditResult.credit_reference, - card_uid: this.startCreditResult.card_uid, + cardnumber: this.cardnumber, + cvc: this.cvc, + exp_month: this.exp_month, + exp_year: this.exp_year, + paymenttype: '100', + description:'', action: 11056, }; loading.present(); this.wrenchService - .payPrevCard(this.payPevCreditData) + .payNewCard(this.payNewCreditData) .subscribe((creditResult) => { loading.dismiss(); console.log("creditResult TOTAL RETURN->", this.creditResult); @@ -464,25 +471,20 @@ export class AddcreditPage implements OnInit { } if (this.processor == 5000) { this.isProcessDisabled = true; - this.payNewCreditData = { + this.payPevCreditData = { member_id: this.sessionDataProviderService.member_id, sessionid: this.sessionDataProviderService.session, uid: this.sessionDataProviderService.member_uid, currency: this.currency_code, amount: this.startCreditResult.amount, credit_reference: this.startCreditResult.credit_reference, - cardnumber: this.cardnumber, - cvc: this.cvc, - exp_month: this.exp_month, - exp_year: this.exp_year, - paymenttype: '100', - description:'', + card_uid: this.startCreditResult.card_uid, action: 11056, }; loading.present(); this.wrenchService - .payPrevCard(this.payNewCreditData) + .payPrevCard(this.payPevCreditData) .subscribe((creditResult) => { loading.dismiss(); console.log("creditResult TOTAL RETURN->", this.creditResult); diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts index 2b1aff4..3a76aa1 100644 --- a/src/app/services/wrench.service.ts +++ b/src/app/services/wrench.service.ts @@ -349,6 +349,10 @@ export class WrenchService { return this.getPostData("payprevcard", reqData); } + payNewCard(reqData){ + return this.getPostData("paynewcard", reqData); + } + helpData(reqData){ return this.getPostData("helpdata", reqData); }