From 6e7d0069c138da760530926ba63bd7522a529565 Mon Sep 17 00:00:00 2001 From: Kishan Kumar Maurya Date: Wed, 17 Apr 2024 14:58:09 +0530 Subject: [PATCH] feat(cashfree-pg): support cordova-plugin-cashfree-pg 1.0.6 (#4737) Co-authored-by: Kishan_maurya --- .../plugins/cashfree-pg/index.ts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/@awesome-cordova-plugins/plugins/cashfree-pg/index.ts b/src/@awesome-cordova-plugins/plugins/cashfree-pg/index.ts index 1aa07569fe..a9af1c4881 100644 --- a/src/@awesome-cordova-plugins/plugins/cashfree-pg/index.ts +++ b/src/@awesome-cordova-plugins/plugins/cashfree-pg/index.ts @@ -219,6 +219,30 @@ export class CFWebCheckoutPayment implements CheckoutPayment { } } +export class CFUPIIntentCheckoutPayment implements CheckoutPayment { + private readonly session: CFSession; + private readonly theme: CFTheme = new CFThemeBuilder().build(); + version: string; + + constructor( + session: CFSession, + theme: CFTheme | null + ) { + this.session = session; + if (theme !== null) { + this.theme = theme; + } + } + + getSession() { + return this.session; + } + + getTheme() { + return this.theme; + } +} + interface CFResult { orderID: string; } @@ -265,6 +289,15 @@ export class CFPaymentGateway extends AwesomeCordovaNativePlugin { return; } + /** + * Initiate UPI Checkout Payment. + * @param {CFUPIIntentCheckoutPayment} [upiCheckoutPayment] webCheckoutPaymentObject information + */ + @Cordova() + doUPIPayment(upiCheckoutPayment: CFUPIIntentCheckoutPayment) { + return; + } + /** * Set Callback. * @param {CFCallback} [cfCallback] callbacks for payment.