phpmodel-view-controllerstripe-paymentsreturnurl

Stripe return url to outside of public folder


My website is written in MVC PHP. This places view pages in an app folder outside the domain public folder.

Stripe returns to the public folder after payment and not to the cancel or success pages in the app/views.

I give the complete path to this page on payment but MVC PHP does not see it when it returns from stripe.

I expected the full return path to run the success or cancel page.

This works great for me when testing.

define('STRIPE_SUCCESS_URL', 'https://localhost/stripe/app/payment-success.php'); //Payment success URL 
define('STRIPE_CANCEL_URL', 'https://localhost/stripe/app/payment-cancel.php'); //Payment cancel URL

This does not when live and runs index.php.

define('STRIPE_SUCCESS_URL', 'https://mywebsite.com/stripe/app/payment-success.php'); //Payment success URL 
define('STRIPE_CANCEL_URL', 'https://mywebsite.com/stripe/app/payment-cancel.php'); //Payment cancel URL

I am new to MVC PHP.

Could you tell me what I'm doing wrong?


Solution

  • Solved,

    Thank you so much C3roe. The reference you gave me was just what I needed to go forward on my learning curve.