latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

PayPal Cancel and Return URL

Home Forums Community Forum PayPal Cancel and Return URL

This topic contains 6 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 6 months ago.

Topic Author Topic
Posted: Thursday Jun 6th, 2013 at 9:51 am #51527

Hi,

how can I change the cancel and return URL that is shown on the PP page directly after clicking on a s2-PP-button?

I found the following thread that explains that this is handled with the code of the PP button:

http://stackoverflow.com/questions/16540398/setting-business-name-and-cancel-and-return-attributes-on-paypal-review-info

The mention setting a CANCELURL parameter and since the return url is unknown to Paypal from my PP settings it seems obvious that this is set by s2member.

I use the standard PP button shortcode and generate an appropriate URL with it. But this URL is encoded so i cannot change something there and from the shortcode parameters I could not find a way to specify this.

How can I change this?

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Friday Jun 7th, 2013 at 5:33 am #51583

I’m not familiar with that variable, but you can, instead of using the shortcode for the button, use the HTML that the button shortcode generator outputs, and add your hidden input there for it. Remember that the HTML includes some PHP, so you’ll need a PHP execution plugin and use the text editor (not the visual editor) for your WordPress page.

Posted: Friday Jun 7th, 2013 at 11:16 am #51613

I cannot do that since I need an URL that is generated by the shortcode.

I would rather suggest that you issue a feature request to Jason because if you look at the forums of s2member this cancel url is a PITA for many people.

Thanks
Alex

Posted: Saturday Jun 8th, 2013 at 6:02 am #51664

Sure, I’m forwarding the request to Jason.

Posted: Monday Jun 10th, 2013 at 4:05 pm #51725

Ok, I found the parameter in the paypal-api.log file:

&cancel_return=

This is the entry that I (and from your forum it shows many others as well) want to change from the GUI.

Thanks for fixing this soon! Maybe it can be changed with a hook in the hacking file!?

Posted: Tuesday Jun 18th, 2013 at 12:55 am #52066

Here’s what Jason said:

There is no shortcode attribute for this presently.

See: s2member/includes/classes/sc-paypal-button-in.inc.php
Specifically this template replacement code: [hilite mono]%%cancel_return%%.[/hilite]

See also: s2member/includes/templates/buttons/paypal/ for all templates that use this replacement code.

What this does? Currently, s2Member simply sets this to the home page of the current site that is implementing the PayPal Button. It’s really NOT an important setting in my view. It’s often excluded completely by many site owners.

If a customer clicks the “Cancel Checkout” link during their checkout experience at PayPal.com, they are returned back to the site where they started from; based on the value of this setting. s2Member returns them back to the home page of the site (e.g. [hilite mono]%%cancel_return%%[/hilite] defaults to [hilite mono]home_url('/')[/hilite]).

With s2Member Pro Forms, this value is established dynamically, and s2Member will return any customer that cancels an Express Checkout transaction; back to the original Pro Form page they started from.

There isn’t a hook for it, though, so you’d have to edit the files directly.

Posted: Tuesday Jun 18th, 2013 at 1:46 am #52071

Jason didn’t mention this, but I’m guessing it’d work, if you use buttons created over at PayPal.com following the instructions to integrate with s2Member, you may also be able to add the cancel_return URL there. These buttons only works for new WordPress signups, not upgrades of existing users. See: Knowledge Base » Using Buttons Generated @ PayPal.com

Viewing 6 replies - 1 through 6 (of 6 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.