Generate PayPal Payment URL using paypal_button shortcode

Recently added “echo_link” attribute open new doors of using this plugin. I will explain them here
1. Although, this plugin already has option to choose a custom payment button. But, if it does not comply with you situation you can use same shortcode like following
<a href="[paypal_button name=&quot;ABC Product&quot; amount=&quot;10&quot; echo_link=&quot;1&quot;]"><img alt="" src="http://xyz.com/linktoyourbutton.png" /></a>
2. To open payment page in a new window you can use the same above code with additional one attirbute i.e. traget=”_blank”
<a href="[paypal_button name=&quot;ABC Product&quot; amount=&quot;10&quot; echo_link=&quot;1&quot;]" target="_blank"><img alt="" src="http://xyz.com/linktoyourbutton.png" /></a>
3.  If you just want to have payment URL so you an use it anywhere. For example, some themes, plugins, shortcodes and widget require a payment URL that have to start with http:// then I believe there is no other way around except to generate a PayPal payment URL from the shortcode and paste it to the field.
For example. Write following in any of your post (in Text view) after setting the proper attributes of your payment
<a href="[paypal_button amount=10 echo_link=1 name=&quot;ABC&quot;]">Buy Now</a>
Then Visit this post and copy the link of “Buy Now” (right click on the URL and select “Copy Link”)and paste it where you want to put the Payment URL (starting with http://&#8221;). Copying URL from browser’s location bar after clicking on the link would not work. You have to copy by right clicking on it.
Link to default PayPal buttons are as below, just in case, you need them
Image Link to Image
https://www.paypal.com/en_AU/i/btn/btn_buynowCC_LG.gif
https://www.paypal.com/en_AU/i/btn/btn_paynowCC_LG.gif
https://www.paypal.com/en_AU/i/btn/btn_donateCC_LG.gif
https://www.paypal.com/en_AU/i/btn/btn_buynow_LG.gif
https://www.paypal.com/en_AU/i/btn/btn_paynow_LG.gif
https://www.paypal.com/en_AU/i/btn/btn_cart_LG.gif
https://www.paypal.com/en_AU/i/btn/btn_donate_LG.gif
https://www.paypal.com/en_AU/i/btn/btn_buynow_SM.gif
https://www.paypal.com/en_AU/i/btn/btn_paynow_SM.gif
https://www.paypal.com/en_AU/i/btn/btn_donate_SM.gif
https://www.paypal.com/en_AU/i/btn/btn_cart_SM.gif
Advertisements

4 responses to “Generate PayPal Payment URL using paypal_button shortcode

  1. Thanks for the all work you’ve put into this AWESOME plugin! After I updated the plugin today, I could not get the custom button I was using in the settings to show up like it did before the update. The following worked for me and it’s much better because now I can use a different image on different pages:

    • I apologize for the inconvenience. Yes, we missed that part in the latest upgrade. Please re-download and install the plugin. It should all work now.
      Thanks for letting us know about this problem!

  2. What happens if different products use a thank you page and user order more than one product?

    “thankyou_page_url:
    (string) (optional) Buyer will be redirect to this page after successful payment.
    Possible Values: An absolute URL e.g. http://abc.com/thankyou2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s