Jump to content

Check Amount in Callback gateway and edit template cart.php


xalupeao

Recommended Posts

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 :)

Link to comment
Share on other sites

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"]

Link to comment
Share on other sites

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 by Kian
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated