eldzee Posted October 28, 2015 Report Share Posted October 28, 2015 Hi, I got question about payment process for the non-merchant gateway my transaction doesn't get recorded into the system after I call the callback/return url basically my validate/success function is as: (using get method to test) public function success(array $get, array $post) { $client_id = $this->ifSet($get['cid']); $return = array( 'client_id' => $client_id, 'amount' => $this->ifSet($get['amount']), 'currency' => $this->ifSet($get['currency']), 'invoices' => $this->unserializeInvoices($this->ifSet($get['inv'])), 'status' => "approved", 'transaction_id' => $this->ifSet($get['txid']), 'parent_transaction_id' => $this->ifSet($get['txid']) ); return $return; } and I called the return/callback url with the param: ?currency=IDR&cid=3&txid=1234&amount=1000.000&inv=32=1000.0000 But the invoices doesn't get credited, it still have outstanding payment of 1000 and I don't see any transaction being recorded Is there any functions to record the payment transaction that I missed? Quote Link to comment Share on other sites More sharing options...
0 eldzee Posted October 28, 2015 Author Report Share Posted October 28, 2015 Nevermind...I tried called the callback url and it worked, the transaction got recorded so basically the return_url doesn't do anything? Paul 1 Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted October 28, 2015 Report Share Posted October 28, 2015 The return URL is the URL the client gets returned to when they come back from the non-merchant gateway's website. The callback URL is where the gateway will respond to the payment to notify Blesta that a payment has been received. If the gateway does not support both of these URLs, then use the callback URL to do both. Quote Link to comment Share on other sites More sharing options...
0 eldzee Posted October 29, 2015 Author Report Share Posted October 29, 2015 May I ask about what's the point of the success function from https://docs.blesta.com/display/dev/Non-merchant+Gateway+Methods#Non-merchantGatewayMethods-success%28array$get,array$post%29 from what I see the codes are similar to the validate function unless the documentation a bit outdated, shouldn't it do something else like setting the view (for thank you message, etc...) rather than having the same function? Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted October 29, 2015 Report Share Posted October 29, 2015 The documentation is not out-dated. The success method is called when the client returns back to Blesta. No validation is necessary here. The validation occurs via the gateway callback. Michael 1 Quote Link to comment Share on other sites More sharing options...
Question
eldzee
Hi,
I got question about payment process for the non-merchant gateway
my transaction doesn't get recorded into the system after I call the callback/return url
basically my validate/success function is as: (using get method to test)
and I called the return/callback url with the param:
But the invoices doesn't get credited, it still have outstanding payment of 1000
and I don't see any transaction being recorded
Is there any functions to record the payment transaction that I missed?
Link to comment
Share on other sites
4 answers to this question
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.