Steven F Posted April 8, 2015 Report Posted April 8, 2015 I'm working on the Stripe Checkout plugin. I've ironed out most of the kinks and it's basically ready to go. Stripe Checkout posts directly to a form of your choosing. Currently, it is sending the client to: callback/gw/1/stripe_checkout/?client_id=$id. This is all good (invoices are getting marked as paid, everything looks nice), except that there is no redirect to a success page or failure page. Is there any way for me to redirect them to some other page? Quote
Steven F Posted April 9, 2015 Author Report Posted April 9, 2015 It would seem that this happens automatically, but was being caused by an error! I've located the problem and am now working to fix it. Quote
Blesta Addons Posted April 9, 2015 Report Posted April 9, 2015 It would seem that this happens automatically, but was being caused by an error! I've located the problem and am now working to fix it. The problem is from your side or from stripe plugin ? Quote
Tyson Posted April 9, 2015 Report Posted April 9, 2015 There are two URLs a gateway typically needs to use. First, the payment callback should be sent to: Configure::get("Blesta.gw_callback_url") . Configure::get("Blesta.company_id") . "/yourgateway/". $client_id Second, the client should be redirected to: domain.com/blesta/client/pay/received/yourgateway/client-id/ ...which should be provided to the YourGateway::bulidProcess() method in $options['return_url']. If the gateway only supports one of these, use the callback URL. Michael 1 Quote
Max Posted August 31, 2015 Report Posted August 31, 2015 There are two URLs a gateway typically needs to use. First, the payment callback should be sent to: Configure::get("Blesta.gw_callback_url") . Configure::get("Blesta.company_id") . "/yourgateway/". $client_id Second, the client should be redirected to: domain.com/blesta/client/pay/received/yourgateway/client-id/ ...which should be provided to the YourGateway::bulidProcess() method in $options['return_url']. If the gateway only supports one of these, use the callback URL. Problem with using the callback URL for clients is that the Blesta code is then redirecting the client to /client/pay/received/yourgateway, and not preserving any added parameters (like /client_id in your example) /blesta/app/controllers/callback.php // Process the payment notification from the gateway $this->GatewayPayments->processNotification($gateway_name, $this->get, $this->post); // Redirect any client back to the payment received page if ($this->Session->read("blesta_client_id") || $this->Session->read("payment")) $this->redirect($this->client_uri . "pay/received/" . $gateway_name); Can workaround this by storing the added parameters in a session as well (which is what we did in our proof of concept Omnipay module), but would be nice if the Blesta core code was fixed to just append any additional parameters as well when redirecting. Blesta Addons 1 Quote
Blesta Addons Posted August 31, 2015 Report Posted August 31, 2015 This is a part of the probleme descriped here http://www.blesta.com/forums/index.php?/topic/4961-transaction-gateway-not-recorded/ Quote
wCORS Posted February 6 Report Posted February 6 On 8/31/2015 at 7:43 PM, Max said: If the gateway only supports one of these, use the callback URL. I have coded it, but it doesn't redirect to the received page, my gateway supports one return URL, and as soon as the client pays, it shows a blank page. and the transaction is added. I have tried $this->redirect invalidate, but it doesn't work at all. now help, please. how do I redirect the client back to the client's page? $redirectUrl = "https://domain.com/client/payments/success"; $this->redirect($redirectUrl); // Use Blesta's redirect method also checked that, but doesn't work sucess() public function success(array $get, array $post) { $validatedData = $this->validate($post); if ($validatedData) { $redirectUrl = "https://domain.com/client/payments/success"; $this->redirect($redirectUrl); // Use Blesta's redirect method exit; return $validatedData; // Return the already validated data } echo "Validation failed."; // Handle failure case return null; Quote
Nouman Ali Posted 8 hours ago Report Posted 8 hours ago It sounds like your Stripe Checkout integration is working well, but you're missing a proper redirect after payment. Stripe Checkout allows you to set success_url and cancel_url when creating a Checkout session. You should ensure these URLs are correctly configured to redirect users after payment. If you're using a plugin, check its settings for redirect options. Otherwise, in your code, add success_url=https://yourdomain.com/success and cancel_url=https://yourdomain.com/failure when initializing the Checkout session. This will ensure users land on the appropriate page after payment. If you need more details, feel free to contact Stripe support or check their documentation. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.