· 7 years ago · Dec 31, 2018, 07:34 PM
1$jj = array(
2 "customer" => array(
3 "phone" => "+790842000000",
4 "email" => "amelin63@yandex.ru",
5 // "id"=>1
6 ) ,
7 "taxmode" => "0",
8 "lines" => array(
9 array(
10 "name" => "КазанÑкий марафон 2019 — 42.2 км",
11 "price" => "1600",
12 "qty" => "1",
13 "sum" => "1600",
14 "vat" => "0",
15 "payattr" => "1",
16 "lineattr" => "4"
17 )
18 ) ,
19 "payments" => array(
20 array(
21 "kind" => "1",
22 "type" => "0",
23 "amount" => "1600",
24 )
25 ) ,
26 "total" => "1600"
27 );
28
29 $ReceiptSignature = strtoupper ( md5( md5($this->merchant_id) + '&' + md5($order_id) + '&' +
30 md5($arrFields['Amount']) + '&' + md5(base64_encode(json_encode($jj))) + '&' + md5($this->get_option( 'secret_key' )) ) );
31 $url = 'https://fpay.uniteller.ru/v2/pay/?Shop_IDP='.$this->merchant_id.'&URL_RETURN='.urlencode('https://tatar.run/cart/?uniteller_success=1').'&Signature='.$Signature.'&Email='.urlencode($order->billing_email).'&Order_IDP='.$order_id.'&Subtotal_P='.$arrFields['Amount'].'&Lifetime=3540&Receipt='.base64_encode(json_encode($jj)).'&ReceiptSignature='.$ReceiptSignature;