You need to sign in to do that
Don't have an account?
Inserting a paypal link
hi
I have this column set up as part of a related list, it all works fine but I want to use this column as an external link to a paypal cart. I am using a field "item.Paypal_button_text__c}" that replaces the v v long value in the original html so that I can refererence unique text foreach instance. I get an errorwhen it redirects me.
<apex:column headerValue="Availability" >
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick"></input>
<apex:inputHidden id="encrypted" value="{!item.Paypal_button_text__c}"/>
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."></input>
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1"></img>
</form>
</apex:column>
It doesn't work,probably because I have thw HTML & Apex mixed up.
this is the original code from paypal
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="xxxxxxx-paypal v v long text !!!!, now in SF field">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
sorry about the format, but can you help
What error do you get?
Hi, there's no sf error, it just doesn't pass the right info through to paypal & you get an error on the paypal page
Hi
I couldn't get this to work by just passing a value through so am converting to apex., I've got this far but it only directs me tothe paypal home page
The original code is above & then my attempt to convert to apex.
item.Paypal_cmd__c contains "_s-xclick" & item.paypal_button_text__c contains "-------Begin etc "
Try using a link instead of a form... I don't remember exactly how they are structured but I'm sure you could find it on the PayPal website. All of the details in your hidden fields can be passed via a url.