Link to home
Start Free TrialLog in
Avatar of jake072
jake072Flag for Canada

asked on

Insert a "PayPal Donations" link directly into a Button with WIN32 API & C++

Experts,

What I'm trying to accomplish is to have a Button in my C++ App (programmed through WIN32 API), that I can have the user click to direct them to a donations page on paypal.  I would like this link to directly open the page, however, the code for the button is in the type of <form> with the button producing a "submit".

Is there anyway I can make a button that if clicked, will use my <form>...</form> code from PayPal to directly open the link to paypal for donations in a web browser?

I can post the <form> code, if needed.

Thanks in advance,

Jake
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jake072

ASKER

I found a solution to the problem by re-creating my link as a defined URL:

https://www.paypal.com/xclick/business=me@mybiz.com&item_name=Team+In+Traning&no_note=1&tax=0¤cy_code=USD

(Just a sample)

Then, using your code, it works, thanks, jkr!

Jake
Avatar of jake072

ASKER

Here is the Form code, just in case you can figure out how to use it directly (Just a sample from PayPal):

<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="me@mybiz.com">
<input type="hidden" name="item_name" value="Team In Training">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="amount" value="25.00">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>

Thanks,

Jake
>>just in case you can figure out how to use it directly

No need to do that - it'll just create the URL you gave :o)
Avatar of jake072

ASKER

jkr,

Yes, I figured that out... :)

Giving you the points anyways; you helped with the actual C++ syntax.

Oh well, thanks,

Jake