'#Region Project Attributes
#ApplicationLabel: Paytm Best
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#BridgeLogger:True
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
Private pMap As Map
End Sub
Sub Globals
Private pservice As Paytm
Private cha As String = "WAP"
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub PaytmEvent_someuierroroccurred(inErrorMessage As String)
Log("B4A: paytm_someuierroroccurred")
End Sub
Sub PaytmEvent_ontransactionresponse(inResponse As Map)
LogColor("B4A: paytm_ontransactionresponse BEGIN",Colors.Blue)
For Each key In inResponse.Keys
Log(key&"="&inResponse.Get(key))
Next
LogColor("B4A: paytm_ontransactionresponse END",Colors.Blue)
End Sub
Sub PaytmEvent_networknotavailable
Log("B4A: paytm_networknotavailable")
End Sub
Sub PaytmEvent_clientauthenticationfailed( inErrorMessage As String)
Log("B4A: paytm_clientauthenticationfailed")
End Sub
Sub PaytmEvent_onerrorloadingwebpage(iniErrorCode As Int , inErrorMessage As String, inFailingUrl As String)
Log("B4A: paytm_onerrorloadingwebpage")
End Sub
Sub PaytmEvent_onbackpressedcanceltransaction
Log("B4A: paytm_onbackpressedcanceltransaction")
End Sub
Sub PaytmEvent_ontransactioncancel( inErrorMessage As String,inResponse As Map )
Log("B4A: paytm_ontransactioncancel")
End Sub
Sub paynow_Click
'checksum_generation_logic--------------------------------
'return checksum
pservice.Initialize("PaytmEvent",True,Null)
pMap.Initialize
pMap.put( "MID" , "xxxxxxxxxxxxxxxxx")
pMap.put( "ORDER_ID" , "342")
pMap.put( "CUST_ID" , "cust1234")
'pMap.put( "MOBILE_NO" , "7777777777")
'pMap.put( "EMAIL" , "[email protected]")
pMap.put( "CHANNEL_ID" , cha)
pMap.put( "TXN_AMOUNT" , "100")
pMap.put( "WEBSITE" , "WEBSTAGING")
' // This Is the staging value. Production value Is available in your dashboard
pMap.put( "INDUSTRY_TYPE_ID" , "Retail")
' // This Is the staging value. Production value Is available in your dashboard
pMap.put( "CALLBACK_URL", "https://pguat.paytm.com/paytmchecksum/paytmCallback.jsp")
pMap.put( "CHECKSUMHASH" , "CHECKSUMHASH")
Dim porder As Paytmorder
porder.Initialize(pMap)
pservice.InitiatePayment(porder,Null)
End Sub