Page 1 of 1

How to convert html code into runrev script

Posted: Fri Aug 27, 2010 8:21 pm
by LESTROSO
Hy to everybody,

i try to integrate a pay pal button on my stack, can anyone help me please??? thanks a lot.......

here below my code, and i would like if possible to move/arrange where i want on the window stack....

Code: Select all

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="xxxxxxxxxxxxxx">
<input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypal.com/it_IT/i/scr/pixel.gif" width="1" height="1">
</form>
i thank you so much in advance...... :oops:

Lestroso
http://fasasoftware.cwahi.net/
http://www.myspace.com/lestroso

Re: How to convert html code into runrev script

Posted: Mon Aug 30, 2010 1:07 pm
by Mark
Hi Lestroso,

Go back to your PayPal account. Find the e-mail link for your button. PayPal clearly states to provide this link to allow you to send this link by e-mail. You can use this link in your scripts. Just use the launch URL command to open the PayPal link in your browser.

Best,

Mark

Re: How to convert html code into runrev script

Posted: Wed Sep 01, 2010 9:10 pm
by LESTROSO
MARK I thank you so much!!!!!! You are the best runrev Programmer i ever knew!!!!!

You always helped me so much in these years and other people!!!! :)

Thank again !!

Cheers,

Lestroso :D

Re: How to convert html code into runrev script

Posted: Sun Jun 26, 2011 1:19 am
by jedthefed
Can anyone be more clear on this as I am a newbie. I have a simular form to bring up in paypal but I am unclear how to do it. It is mentioned use launch URl command. Do i insert my entire form html code into one launchurl command?

Actually after reading this a few more times this person is calling upo a predefined button. I need to create the button on the fly. I have a form where you can pick up to 22 different items and any combination of items changes the subtotal, shipping cost and total to be passed to the cart.

Jed

Re: How to convert html code into runrev script

Posted: Sun Jun 26, 2011 1:35 pm
by Mark
Hi Jed,

You need to get yourself familiar with PayPal's syntax for link buttons. Here's an actual example:

Code: Select all

https://www.paypal.com/xclick/business=support%40economy-x-talk.com&item_name=Custom+Software+Solutions&no_shipping=1&cn=Additional+comments&&amount=84.03&tax=15.96&currency_code=EUR
You can easily change business, item_name, amount, tax and currency_code as needed. Create your URL by script and then use the launch URL command.

Kind regards,

Mark

Re: How to convert html code into runrev script

Posted: Sun Jun 26, 2011 1:48 pm
by jedthefed
Thank you for your response. I have figured out how use a preconfigured PayPal button. The issue is that I have a form and people can select any combination of 22 different items. Combining items changes the total as well as the shipping there is a standard shipping fee for each item. But when you add items the shipping for each additional is reduced. So a predefined button would not work for me. I would need hundreds of them to calculate any possible combination of items.

Jed

Re: How to convert html code into runrev script

Posted: Sun Jun 26, 2011 2:11 pm
by Mark
Jed,

See my previous answer.

Kind regards,

Mark

Re: How to convert html code into runrev script

Posted: Sun Jun 26, 2011 2:41 pm
by jedthefed
Mark wrote:Jed,

See my previous answer.

Kind regards,

Mark
I appreciate your efforts, but pointing me back to an answer a second time that I already don't understand doesn't help much. I see what your getting at and I understand what i need to do. But how to do it, i do not understand. Building a url and launching it with launch url sounds good, but I am still at a loss even where to start. Without a coding example to refference I am still not able to figure it out.

Thanks anyway, I'll keep trying. Eventually i'll figure it out.
Jed

Re: How to convert html code into runrev script

Posted: Sun Jun 26, 2011 2:54 pm
by Mark
Jed,

Code: Select all

put "http://www.domain.com/" into myMain
put "bla=foo&blub=bar" into myVar
put myMain & myVar into myUrl
launch url myUrl
Make sure to read the docs, both LiveCode's and PayPal's.

Kind regards,

Mark

Re: How to convert html code into runrev script

Posted: Sun Jun 26, 2011 3:03 pm
by jedthefed
Thanks Mark,

That does makes sence now. Is there a limitation on how long the url can be? Say someone bought 15 items. In php I had a nice list of all 15 items in the cart. Is this possible using this method or should I just use "your Order" or something like that as the item decription. Then the price, tax, total.

Thanks again
Jed

Re: How to convert html code into runrev script

Posted: Mon Jul 11, 2011 11:53 am
by Mark
Hi Jed,

The length of the URL depends on the server configuration, usually it is 1024 bytes, sometimes it is 256 bytes, sometimes there is no limit. I don't think that PayPal has a limit. If there is one, you will probably see an error message.

You can also use PHP to make a dynamic form, which lists only one item and the total sum to pay.

Best,

Mark

Re: How to convert html code into runrev script

Posted: Mon Jul 11, 2011 2:24 pm
by LESTROSO
Thanks a lot again Mark....and many thanks to everybody.....

Bye Lestroso.... :D

Re: How to convert html code into runrev script

Posted: Mon Jul 11, 2011 9:58 pm
by jedthefed
Mark wrote:Hi Jed,

The length of the URL depends on the server configuration, usually it is 1024 bytes, sometimes it is 256 bytes, sometimes there is no limit. I don't think that PayPal has a limit. If there is one, you will probably see an error message.

You can also use PHP to make a dynamic form, which lists only one item and the total sum to pay.

Best,

Mark
Thanks Mark,

The length of the string in paypal is 256 bytes. I have it working perfectly now :)

Gary