Skip to content

Commit

Permalink
delete payerIdentity to send server in start transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
yeganehha authored Feb 17, 2019
1 parent 1294129 commit 6137496
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/payping.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function gateway__payping($data)
$token = trim($data['token']);
$amount = round($data['amount']/10);

$data_send = array( 'Amount' => $amount,'payerIdentity'=> $data['mobile'] , 'returnUrl' => $data['callback'], 'Description' => $data['title'].' - '.$data['invoice_id'] , 'clientRefId' => $data['invoice_id'] );
// $data_send = array( 'Amount' => $amount,'payerIdentity'=> $data['mobile'] , 'returnUrl' => $data['callback'], 'Description' => $data['title'].' - '.$data['invoice_id'] , 'clientRefId' => $data['invoice_id'] );
$data_send = array( 'Amount' => $amount, 'returnUrl' => $data['callback'], 'Description' => $data['title'].' - '.$data['invoice_id'] , 'clientRefId' => $data['invoice_id'] );
try {
$curl = curl_init();
curl_setopt_array($curl, array(CURLOPT_URL => "https://api.payping.ir/v1/pay", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode($data_send), CURLOPT_HTTPHEADER => array("accept: application/json", "authorization: Bearer " . $token , "cache-control: no-cache", "content-type: application/json"),));
Expand Down

0 comments on commit 6137496

Please sign in to comment.