开发者

PayPal Button As Text Link

Can anyone please tell me how to change a PayPal buy button to a text link? Thanks. Here is the code:

<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="XXX">
  <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gi开发者_StackOverflow中文版f" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
  <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>


Did you try this? https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XXX

You need to replace XXX of course.

The HTML-Code would look like this: Your Text

For example one with working button id: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7865


Paypal has a builder for doing this. Login to your paypal account. Click on 'Merchant Services'. Choose the button type you want (payment, subscription, etc). Run through the rest of the options. It will generate the button as a form but there is a tab at the top to have it generated as a link. The tab is titled "Email".


After you have created a button, there will be an email link. You can use this as an href="https://www.paypal.com/examplecode/ExampleButtonID".


Check out this Paypal Link Generator. http://www.blogbyben.com/2009/04/paypal-link-generator-build-your-own-1.html

It does appear that PayPal basically forces you to use an image as the link because it allows them to encrypt some of the data that is sent. Check out "Protecting HTML Code for Payment Buttons" on page 90 of https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/pp_websitepaymentsstandard_integrationguide.pdf


The code you need is:

<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XXX">Text goes here</a>

Replace XXX with whatever your button code is and replace Text goes here with whatever text you wish to show.

The XXX is the hosted button ID, which is usually a 13 character value such as H6C28LJRV72J2.


One solution that has not been posted is for the donate link. Hopefully someone finds this helpful. In addition to what @1' OR 1 -- provided, you can use the below for a text link for donations:

https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=INFO@EMAIL.COM&lc=US&item_name=Donation+to+YOUR+BUSINESS+NAME&no_note=0&cn=&curency_code=USD&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted

You'll want to replace INFO@EMAIL.com and Donation+to+YOUR+BUSINESS+NAME with your own information, as well as possibly change currency code.


What about this:

<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="XXX">
  <input type="submit" value="submit" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
  <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

This will give you a button with text.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜