Hello all ,
I did this wrapper for a guy in this forum (we agreed on $60) he informed me that the library is working but he asked to get some time , I gave him a few months but he never replied or PAID anything ( now he reads my whatsapp messages but does not reply ).
Sample
As it seems India specific I don't know whether my sample is working or not but it might give you some hint
I did this wrapper for a guy in this forum (we agreed on $60) he informed me that the library is working but he asked to get some time , I gave him a few months but he never replied or PAID anything ( now he reads my whatsapp messages but does not reply ).
Sample
B4X:
'#Region Project Attributes
#ApplicationLabel: Paytm Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private paramMap As Map
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private paytmservice As Paytm
Private cha As String = "WAP"
Private n As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
n=DateTime.Now
paytmservice.Initialize("paytm",True)
paramMap.Initialize
paramMap.put( "MID" , "yourMID")
paramMap.put( "ORDER_ID" , "order1"&n)
paramMap.put( "CUST_ID" , "cust123")
paramMap.put( "MOBILE_NO" , "7777777777")
paramMap.put( "EMAIL" , "[email protected]")
paramMap.put( "CHANNEL_ID" , cha)
paramMap.put( "TXN_AMOUNT" , "100.12")
paramMap.put( "WEBSITE" , "WEBSTAGING")
' // This Is the staging value. Production value Is available in your dashboard
paramMap.put( "INDUSTRY_TYPE_ID" , "Retail")
' // This Is the staging value. Production value Is available in your dashboard
paramMap.put( "CALLBACK_URL", "https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=order1"&n)
Dim order As PaytmOrder
order.Initialize(paramMap)
paytmservice.InitiatePayment(order,Null)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub paytm_someuierroroccurred(inErrorMessage As String)
Log("B4A: paytm_someuierroroccurred")
End Sub
Sub paytm_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 paytm_networknotavailable
Log("B4A: paytm_networknotavailable")
End Sub
Sub paytm_clientauthenticationfailed( inErrorMessage As String)
Log("B4A: paytm_clientauthenticationfailed")
End Sub
Sub paytm_onerrorloadingwebpage(iniErrorCode As Int , inErrorMessage As String, inFailingUrl As String)
Log("B4A: paytm_onerrorloadingwebpage")
End Sub
Sub paytm_onbackpressedcanceltransaction
Log("B4A: paytm_onbackpressedcanceltransaction")
End Sub
Sub paytm_ontransactioncancel( inErrorMessage As String,inResponse As Map )
Log("B4A: paytm_ontransactioncancel")
End Sub
As it seems India specific I don't know whether my sample is working or not but it might give you some hint
Attachments
Last edited: