ArunYogi / paytm-cordova-plugin

DEPRECATED Cordova plugin for Paytm application
6 stars 13 forks source link

Paytm is not defined in latest relaease #26

Closed RobertRajcool closed 5 years ago

RobertRajcool commented 5 years ago

I'm facing the same issue, paytm is not defined,

paytm_error

i have used below like that,

`import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; declare var paytm : any;

@Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage {

constructor(public navCtrl: NavController) {

} suc(response) { console.log(response) } submit(){ var options = { "MID": "VTjjEw61927266833738", "ORDER_ID": "ORDER234545", "CUST_ID": "CUSTOMER2123", "TXN_AMOUNT": "1", "CHANNEL_ID": "WEB", "INDUSTRY_TYPE_ID": "Retail", "CALLBACK_URL": "https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=ORDER234545", "WEBSITE": "WEBSTAGING", "MOBILE_NO": "9790584839", "EMAIL": "doss.cclawrance226@gmail.com", "CHECKSUMHASH": "xVZOdtw179TN0bzKOsTYKFLJPuMiRaeEU/9UZTObUQWbrLeA8ZsnTaT5GZ4ULJ1ZifjgUt3ZYsQD0oyXzjngeb8gxP0qeW00OYKfnFKK8/4=" } paytm.startPayment(options, this.suc, this.suc);

}

}`

Can you help resolve this issue

ArunYogi commented 5 years ago

@RobertRajcool ,

Seems paytm plugin is not installed properly in your project. Do remove the paytm plugin and install it again. During this time, check the success status of plugin installation.

RobertRajcool commented 5 years ago

I got success status of plugin installation, but I still got the same issue

ArunYogi commented 5 years ago

@RobertRajcool , in that case could you give me the adb log when u start your app, so that i can see where its failing..

RobertRajcool commented 5 years ago

@ArunYogi I have resloved this issue, but another issue, i want call another function in sucess or failureCallback callbacks, ` paytm.startPayment(paytmOptions['payment_params'], this.successCallback, this.failureCallback);

successCallback(response) { if (response.STATUS == "TXN_SUCCESS") { this.backto_checkout(); } }

backto_checkout(){ console.log('sucess callback') } `

How i can achieve this.

RobertRajcool commented 5 years ago

resolved this issue