{{-- --}}
@php
$pp_ExpiryDays = 6;
$integrity_salt = $key_values['integrity_salt'];
$action_url = $key_values['action_url'];
$return_url = $key_values['return_url'];
$merchant_id = $key_values['merchant_id'];
$password = $key_values['password'];
$order_id = $order['order']['id'];
$txn_date_time = date('YmdHis');
$expiry_time = date('YmdHis', strtotime("+".$pp_ExpiryDays." hours"));
$txn_ref_number = "TXN1". date('YmdHis');
$amount_tmp = $order['order']['total_price']*100;
$amt_split_array = explode('.', $amount_tmp);
$formatted_amount = $amt_split_array[0];
$currency = 'PKR';
$pp_version = '2.0';
$pp_language = 'EN';
$description = $order['order']['id'];
// foreach($order['order']['line_items'] as $key => $_items){
// $description .= $key==0? $_items['title'] : ' / '.$_items['title'];
// }
$array = $integrity_salt.'&'.$formatted_amount.'&'.$order_id.'&'.$description.'&'.'Yes'.'&'.$pp_language.'&'.$merchant_id.'&'.$password.'&'.$return_url.'&'.$currency.'&'.$txn_date_time.'&'.$expiry_time.'&'.$txn_ref_number.'&'.'MPAY'.'&'.$pp_version.'&'.'1'.'&'.'2'.'&'.'3'.'&'.'4'.'&'.'5';
$pp_securehash = hash_hmac('sha256', $array, $integrity_salt);
@endphp