Jump to content

validate order


morp
 Share

Recommended Posts

Hi all,
I'm coding my paymenet module.

I validate my order in this way:

--
$currency = new Currency(intval(isset($_POST['currency_payement']) ? $_POST['currency_payement'] : $cookie->id_currency)); $total = floatval(number_format($cart->getOrderTotal(true, 3), 2, '.', ''));

$cardpayment = new cardpayment();

$cardpayment->validateOrder($cart->id, _PS_OS_PREPARATION_, $total, $cardpayment ->displayName, NULL, NULL, $currency->id);
---

The validation goes well, perfect.


Looking in some payment module, I see that someone validate order in this way, passing a secure key:

--
$order = new Order($cardpayment->currentOrder);

Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?
id_cart='.$cart>id.'&id;_module='.$cardpayment->id.'&id;_order='.$cardpayment>currentOrder.'&key;='.$order->secure_key);
--

but, what does it mean? Why I can validate the order without the key? Why should I use it?

please someone can explain me more?


many thanks
bye

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More