· 7 years ago · Dec 31, 2018, 05:52 PM
1$jj = array(
2 "customer"=>array(
3 "phone"=>"+790842000000",
4 "email"=>"amelin63@yandex.ru",
5 "id"=>1
6 ),
7 "taxmode" => "18",
8 "lines"=>array(
9 array(
10 "name"=>"КазанÑкий марафон 2019 — 42.2 км",
11 "price"=>"1600",
12 "qty"=>"1",
13 "sum"=>"1600",
14 "vat"=>"18",
15 "payattr"=>"1",
16 "lineattr"=>"4"
17 )
18 ),
19 "payments" => array(
20 "kind"=>"1",
21 "type"=>"0",
22 "amount"=>"1600",
23 ),
24 "total"=>"1600"
25 );
26
27 $ReceiptSignature = '';
28 $ReceiptSignature = strtoupper ( md5( md5($this->merchant_id) + '&' + md5($order_id) + '&' +
29 md5($arrFields['Amount']) + '&' + md5(base64_encode(json_encode($jj))) + '&' + md5($this->get_option( 'secret_key' )) ) );
30 $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;