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.