feat(all-in-one-sdk): add assist interface (#3717)

* feat(AllInOneSDK): add plugin for Paytm All-in-One SDK

* feat(all-in-one-sdk): add check to restrict app invocation

* feat(assist): Added assist interface

Co-authored-by: Adarsh <adarsh.chaudhary@paytm.com>
Co-authored-by: adarsh-chaudhary <71324632+adarsh-chaudhary@users.noreply.github.com>
This commit is contained in:
rajgoenka 2021-08-21 00:39:06 +05:45 committed by GitHub
parent 9a1b96462d
commit 8ebdc6e563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ export class AllInOneSDK extends IonicNativePlugin {
* @return {Promise<PaytmResponse>} Returns a promise that resolves when a transaction completes(both failed and successful).
*/
@Cordova()
startTransaction(options: PaymentIntentModel): Promise<PaytmResponse> {
startTransaction(options: PaymentIntentModel | PaymentAssistIntentModel): Promise<PaytmResponse> {
return;
}
}
@ -82,3 +82,14 @@ export interface PaymentIntentModel {
callbackUrl: string; // Callback URL
restrictAppInvoke: boolean; // To enable or disable the paytm app invocation
}
export interface PaymentAssistIntentModel {
mid: string; // Merchant ID
orderId: string; // Order ID
txnToken: string; // Transaction Token
amount: string; // Amount
isStaging: boolean; // Environment
callbackUrl: string; // Callback URL
restrictAppInvoke: boolean; // To enable or disable the paytm app invocation
enableAssist: boolean; // To enable or disable the Assist (Otp auto read)
}