Android Question Help with one line of code!

Beja

Expert
Licensed User
Longtime User
Hi all,
Trying to use a simple PayPal.me API, it works fine when you pass an absolute number for the money (150 for example) but when I tried to pass a string variable
containing the value it didn't work. Any hint appreciated:
Here's my code:

B4X:
Sub Button1_Click
    Dim url As String = "http://www.paypal.me/myPayPalAccount/EditText1.Text"   '&ET1.text  '" &NumberFormat2(mstr1, 1, 2, 2, False)
    WebView1.LoadUrl(url)
End Sub

'Note: if I used absolute money amount it works, but I want to put the money ammount on EditText1
'Dim url As String = "http://www.paypal.me/myPayPalAccount/600" (this works)
 

JohnC

Expert
Licensed User
Longtime User
B4X:
Sub Button1_Click
    Dim url As String = "http://www.paypal.me/myPayPalAccount/" & EditText1.Text   '&ET1.text  '" &NumberFormat2(mstr1, 1, 2, 2, False)
    WebView1.LoadUrl(url)
End Sub
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
B4X:
Sub Button1_Click
    Dim url As String = "http://www.paypal.me/myPayPalAccount/" & EditText1.Text   '&ET1.text  '" &NumberFormat2(mstr1, 1, 2, 2, False)
    WebView1.LoadUrl(url)
End Sub

Hi John,
Thanks for trying, but I want to pass a value for payment.. so the customer doesn't need to enter the value manually on PayPal website
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Simple...

B4X:
Sub Button1_Click
    Dim url As String = "http://www.paypal.me/myPayPalAccount/" & YourStringVariableNameContainingTheAmount
End Sub
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Simple...

B4X:
Sub Button1_Click
    Dim url As String = "http://www.paypal.me/myPayPalAccount/" & YourStringVariableNameContainingTheAmount
End Sub

Very simple.. my mistake. Thanks John so much.
 
Upvote 0
Top