How to return to subscription page when I cancel

  • angotsai
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 7 months ago #45102 by angotsai
Hi
How to return to subscription page when I cancel payment from Paypal Payment page.
For now function , I cancel the Paypal payment and then it will redirect to membership cancel page.

the subscribe flow ,
1.registration/subscription page -> 2 redirect to paypal payemnt page -> 3. cancel paypal payment
4-> redirect to cancel page.

if I hope the flow to..
1->2->3->1

I found the code on plugins/os_paypal.php , and the parameter for "$this->setParam('cancel_return' "xxxxxx" ,
I have no idea for my requirment flow.

Please help me !!! thanks.

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #45142 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to return to subscription page when I cancel
Hi

What's the link to your subscription page ? You can simply change the code :
Code:
$this->setParam('cancel_return', $siteUrl . 'index.php?option=com_osmembership&view=cancel&id=' . $row->id . '&Itemid=' . $Itemid);

to :
Code:
$this->setParam('cancel_return', 'URL_OF_YOUR_SUBSCRIPTION_PAGE');

and it should work well !

Tuan

Please Log in or Create an account to join the conversation.

  • angotsai
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 6 months ago - 10 years 6 months ago #45172 by angotsai
Hi
$this->setParam('cancel_return', 'URL_OF_YOUR_SUBSCRIPTION_PAGE');
the string 'URL_OF_YOUR_SUBSCRIPTION_PAGE' that is mean my url or DEFINE String ?

I try to change the code , and then there is no return url link on Paypal payment page.
( $this->setParam('cancel_return', 'URL_OF_YOUR_SUBSCRIPTION_PAGE'); )

It's not work.

Here's parameter I cannot give that fix url, because I have many plans (many subscription pages) .
Please help , thanks.
Last edit: 10 years 6 months ago by angotsai.

Please Log in or Create an account to join the conversation.

  • angotsai
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 6 months ago #45173 by angotsai
Hi
I try to change the code and it's work !! .
$this->setParam('cancel_return',$siteUrl.'index.php?option=com_osmembership&view=register&id='.$row->plan_id );

thanks.

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #45176 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to return to subscription page when I cancel
OH, OK . I thought you have a fixed URL for the subscription page. Your code is correct !

Tuan

Please Log in or Create an account to join the conversation.