Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
LESTROSO
- Posts: 85
- Joined: Wed Apr 04, 2007 6:14 pm
-
Contact:
Post
by LESTROSO » Fri Aug 27, 2010 8:21 pm
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......
Lestroso
http://fasasoftware.cwahi.net/
http://www.myspace.com/lestroso
Last edited by
LESTROSO on Sun Jun 26, 2011 3:15 pm, edited 1 time in total.
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Mon Aug 30, 2010 1:07 pm
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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
LESTROSO
- Posts: 85
- Joined: Wed Apr 04, 2007 6:14 pm
-
Contact:
Post
by LESTROSO » Wed Sep 01, 2010 9:10 pm
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

-
jedthefed
- Posts: 8
- Joined: Sun Jun 26, 2011 1:07 am
Post
by jedthefed » Sun Jun 26, 2011 1:19 am
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
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Sun Jun 26, 2011 1:35 pm
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¤cy_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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
jedthefed
- Posts: 8
- Joined: Sun Jun 26, 2011 1:07 am
Post
by jedthefed » Sun Jun 26, 2011 1:48 pm
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
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Sun Jun 26, 2011 2:11 pm
Jed,
See my previous answer.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
jedthefed
- Posts: 8
- Joined: Sun Jun 26, 2011 1:07 am
Post
by jedthefed » Sun Jun 26, 2011 2:41 pm
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
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Sun Jun 26, 2011 2:54 pm
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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
jedthefed
- Posts: 8
- Joined: Sun Jun 26, 2011 1:07 am
Post
by jedthefed » Sun Jun 26, 2011 3:03 pm
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
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Mon Jul 11, 2011 11:53 am
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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
LESTROSO
- Posts: 85
- Joined: Wed Apr 04, 2007 6:14 pm
-
Contact:
Post
by LESTROSO » Mon Jul 11, 2011 2:24 pm
Thanks a lot again Mark....and many thanks to everybody.....
Bye Lestroso....

-
jedthefed
- Posts: 8
- Joined: Sun Jun 26, 2011 1:07 am
Post
by jedthefed » Mon Jul 11, 2011 9:58 pm
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