xalupeao Posted October 16, 2014 Share Posted October 16, 2014 Hi Guys. I need check the total amount in my callback. My Callaback recive the amount but this is amount is possible modify by clients. is possible check or get amount of invoice in callback? An my callback have this url to success payment /viewinvoice.php?id={invoiceid}&paymentsuccess=true But the system auto redirect to /cart.php?a=complete is possible stop this redirect... or is possible customize cart.php page? Thanks ! - - - Updated - - - And is possible get the Payment method in cart.tpl ? Thanks 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 16, 2014 Share Posted October 16, 2014 Yes, you can retreive this value with invoice ID or some other value depending on what your paymant gateway returns. In fact every gateway is different from each other. For sure you should have a returning transaction ID. You could use it to retreive, by querying the database, the total amount in the tblinvoices table. Alternatively gateways usually allow you to specify an order ID or use a note field. Since they both return back, you could store invoice ID in one of them so that in your call back you'll simply need to run this kind of query. SELECT total FROM tblinvoices WHERE id = $_POST["returning_value_with_id_of_invoice"] 0 Quote Link to comment Share on other sites More sharing options...
xalupeao Posted October 16, 2014 Author Share Posted October 16, 2014 Thanks Kian you help! you know if it is possible to avoid redirection cart.php?a=complete 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 16, 2014 Share Posted October 16, 2014 Yes and maybe in several ways. You could inject your alternative redirect in ShoppingCartCheckoutCompletePage hook point or in Smarty directly inside the template or maybe even at the very end of your callback script. 0 Quote Link to comment Share on other sites More sharing options...
xalupeao Posted October 16, 2014 Author Share Posted October 16, 2014 Kyan, is possible get systemurl in the Hook? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 16, 2014 Share Posted October 16, 2014 (edited) Sure. Normal URL: SELECT value FROM tblconfiguration WHERE setting = 'SystemURL' SSL URL: SELECT value FROM tblconfiguration WHERE setting = 'SystemSSLURL' Even if you could get it also with standard PHP in $_SERVER['SERVER_NAME']; Edited October 16, 2014 by Kian 0 Quote Link to comment Share on other sites More sharing options...
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.