Android Question Intent for beginners

Pantelis Loizou

Member
Licensed User
Longtime User
hi to every one

could you please help me how to convert the below code to B4A

Intent payIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(
"vivapayclient://pay/v1"
+ "?merchantKey="MY_MERCHANT_KEY""
+ "&appId=com.example.myapp"
+ "&action=sale"
+ "&clientTransactionId=1234567801234"
+ "&amount=1200"
+ "&tipAmount=200"
+ "&show_receipt="+true
+ "&show_transaction_result="+true
+ "&show_rating="+true
+ "&ISV_amount="+100
+ "&ISV_clientId=qwerty123456"
+ "&ISV_clientSecret=qwerty123456"
+ "&ISV_sourceCode=qwerty123456"
+ "&callback=mycallbackscheme://result"));

payIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

payIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
startActivity(payIntent);
 

JohnC

Expert
Licensed User
Longtime User
Just follow this tutorial and put that long string in step 5:

 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
Dim in As Intent
in.Initialize(in.ACTION_VIEW, _
"vivapayclient://pay/v1" _
& "?merchantKey=""MY_MERCHANT_KEY""" +
& "&appId=com.example.myapp"
& "&action=sale"
& "&clientTransactionId=1234567801234"
& "&amount=1200"
& "&tipAmount=200"
& "&show_receipt=true" _
& "&show_transaction_result=true" _
& "&show_rating=true" _
& "&ISV_amount=100" _
& "&ISV_clientId=qwerty123456" _
& "&ISV_clientSecret=qwerty123456" _
& "&ISV_sourceCode=qwerty123456" _
& "&callback=mycallbackscheme://result")
StartActivity(in)
 
Upvote 0
Top