Jump to content

validate order


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


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

Link to comment
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
  • Create New...