Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Paypal and Link Webpart View modes: 
User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 10/21/2013 7:32:17 PM
   
Paypal and Link Webpart
Is it possible to use the Link webpart in conjunction with the code for PayPal? For instance the code generated from Paypal is
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input name="cmd" type="hidden" value="_s-xclick" /> <input name="hosted_button_id" type="hidden" value="123456" /> <input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" type="image" /> <img alt="" border="0" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" /></form>
And I set the properties of the link webpart as such:

Image=https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif
Alternate text=PayPal - The safer, wasier way to pay online!
Action=https://www.paypal.com/cgi-bin/webscr

And in the HTML Before box I enter:
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="hosted_button_id" type="hidden" value="123456" />

When I click the button, it directs me to the paypal site but doesn't bring up my checkout page. Any ideas?

This is a one time button setup, I don't want to implement the whole checkout process and/or products for this particular site.

User avatar
Certified Developer 13
Certified Developer 13
kentico-jx2tech - 10/21/2013 8:11:40 PM
   
RE:Paypal and Link Webpart
Did you try putting the hidden values in a querystring?
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=123456">
<img id="p_lt_ctl07_wP_p_lt_ctl04_Link_btnElem_image" title="PayPal - The safer, wasier way to pay online!" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" alt="PayPal - The safer, wasier way to pay online!">
</a>
if we need to add other input variables like quantity and price from the user, we use an iframe to avoid the form within a form.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 10/22/2013 8:31:13 AM
   
RE:Paypal and Link Webpart
I did try the querystring and same result. I wanted to avoid the iframe solution just because.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 12/2/2013 12:06:07 AM
   
RE:Paypal and Link Webpart
Hi,
Have you found any solution with the querystring? Or anything else except an iframe?
I have asked our e-comm dev team if they knew some way, so we'll see..

Regards,
Zdenek

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 12/12/2013 8:17:03 AM
   
RE:Paypal and Link Webpart
No not yet. I'm going to simply create a webpart that will work with a simple <a> tag or link button. Once if finish it, I'll submit it to the Marketplace for others. Seems like something pretty simple that should be included.