Jump to content
  • 0

Paypal subscriptions redirect not working


fossxplorer

Question

I followed the WHMCS import doc and did a rewrite according to

Quote

Redirect 301 /modules/gateways/callback/paypal.php /callback/gw/1/paypal_payments_standard/

In Nginx this translates into:

rewrite ^/modules/gateways/callback/paypal.php$ /callback/gw/1/paypal_payments_standard/ last;

But i get 404 - Not found when using it. I figured out /callback/gw/1/paypal_payments_standard/  doesn't exist on my installation.
Buti could find components/gateways/nonmerchant/paypal_payments_standard/ so i wonder if the following is correct to use?

rewrite ^/modules/gateways/callback/paypal.php$ /components/gateways/nonmerchant/paypal_payments_standard/

 

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

/callback/gw/1/paypal_payments_standard/ is the correct path, assuming your Blesta is install in the root web. If Blesta is at sub.domain.com, then sub.domain.com/callback/gw/1/paypal_payments_standard/ would be correct and should just return a blank page with HTTP 200 response (not a 404)

Assuming that is correct, it's also important that the paypal email address match a client. This is how Blesta decides where to apply the payment, it checks for a matching email address. If the email does match, it should be applied. If it does not match, that subscription should be cancelled and re-created within Blesta or the customers email address should be updated to match.

In the future we want to store subscription id's and reference them that way instead, which would resolve this kind of issue.

Link to comment
Share on other sites

  • 0

Alright, my installation was indeed at a subdomain so the correct redirect is:

rewrite ^/modules/gateways/callback/paypal.php$ sub.domain.com/callback/gw/1/paypal_payments_standard/

It doesn't matter if it's inside subdomain or not, since the the rewrite line is inside the scope of the vhost, so the correct redirect is:

rewrite ^/modules/gateways/callback/paypal.php$ /callback/gw/1/paypal_payments_standard/

Now testing with curl -L -I, i can see first a 302 Found with Location: sub.domain.com/index.php/, then i get 200 OK.

Hopefully i got things right now to be able to receive payment notifications from Paypal into Blesta. Has been a big mess until now and i just hope no to loose customers due to my migration over.

 

 

Link to comment
Share on other sites

  • 0

What does your Nginx configuration look like? You also shouldn't be accessing Blesta via sub.domain.com/index.php/ unless your Nginx configuration is incorrect. It should be accessible simply via sub.domain.com/

 

Quote

pefully i got things right now to be able to receive payment notifications from Paypal into Blesta.

Test using a developer account rather than hoping for it to work correctly.

Link to comment
Share on other sites

  • 0
11 hours ago, fossxplorer said:

Nginx config at https://gist.github.com/fossxplorer/943ed638518987ae21e074a68c3d9258

Btw, the Paypal IPN works now.

How do i get a developer account ?

I'd love to have a developer license as i had it with WHMCS and it was very useful!

if you have a owned license from Blesta you can get a development license. If you have one with a vendor you can ask sales[at]domain.com and it's up to Blesta.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...