activa Posted June 14, 2015 Report Posted June 14, 2015 i'm working for a new Gateway , but i have some confusion about this urls , when used and what they are ? return_url , $options['return_url'] ? cancel_url , ?? notify_url , callback_url ? and which url should be called in a successful operation , and wish for denied operation , and wish one for canceled operation by client click ? Wouter 1 Quote
serge Posted June 14, 2015 Report Posted June 14, 2015 This is not only for blesta context: return_url , $options['return_url'] ? after checkout customer are redirected to gateway website, and after they pay there, they are redirected back to the merchant website at the given return url. as blesta can be multi-company, multi-domain, that why the return url is passed in the parameter you send to the gateway when asking gateway to create the transaction cancel_url , ?? not certain, I suppose, at gateway website, when customer was coming from the checkout, and if customer do not want to pay but want to cancel, so it's will be pointing to this url to back at merchant website notify_url , callback_url ? This is the url for the payment gateway post transaction update like paid, on hold, cancelled,... -------------------- so it's depend of each gateway, but in general, from checkout, if customer pay quick, : - from the gateway, the transaction status update will be sent to the notify url and just after - customer is redirected to the return url if customer pay later, there is only a notification send to merchant website, and there is no redirection/return to the merchant website ------------------ Quote
activa Posted June 14, 2015 Author Report Posted June 14, 2015 but , as i know , but wich url we should use in successfull paiement , and wich for failed paiement . normally a failed paiemnt should return to payment page with error failed operation . Blesta Addons 1 Quote
Wouter Posted July 15, 2015 Report Posted July 15, 2015 I'm also in search for a good example for the cancel_url. Can't find anything in the existing non merchant gateways. Quote
Tyson Posted July 17, 2015 Report Posted July 17, 2015 If your gateway supports a 'cancel URL', determine the cases where the gateway would redirect the customer to it. You can set errors on your gateway's success() method in those cases. The only page that is currently used for customers returning from making a payment is the /client/pay/received/ page. So if you redirect there and set an error message and an empty return array on your success() method, then the client will see an error message. It may not be ideal in some cases, but it is an alternative to the normal success page. Quote
Blesta Addons Posted July 17, 2015 Report Posted July 17, 2015 If your gateway supports a 'cancel URL', determine the cases where the gateway would redirect the customer to it. You can set errors on your gateway's success() method in those cases. The only page that is currently used for customers returning from making a payment is the /client/pay/received/ page. So if you redirect there and set an error message and an empty return array on your success() method, then the client will see an error message. It may not be ideal in some cases, but it is an alternative to the normal success page. how to set a error message in the gateway in success function ? Quote
Tyson Posted July 17, 2015 Report Posted July 17, 2015 how to set a error message in the gateway in success function ? I think something like this would work (untested): public function success(...) { ... $this->Input->setErrors(array( 'error' => array( 'type' => 'Error!' ) )); ... } Quote
Blesta Addons Posted July 18, 2015 Report Posted July 18, 2015 I think something like this would work (untested): public function success(...) { ... $this->Input->setErrors(array( 'error' => array( 'type' => 'Error!' ) )); ... } i will bookmark this to test later . but if i remember , in a old thread , gateways is not able to set messages (error - success) in the view ?! Quote
Tyson Posted July 18, 2015 Report Posted July 18, 2015 i will bookmark this to test later . but if i remember , in a old thread , gateways is not able to set messages (error - success) in the view ?! That's correct. The gateway doesn't set errors to the view. It can set errors, but it is the caller that sets the view and determines whether to set any of the gateway's errors to it, which would be the case here. 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.