wip
This commit is contained in:
@@ -447,47 +447,37 @@ function syncWithBankSystem(
|
||||
$amount = $online_payment_tmt_amount;
|
||||
$payPurpose = $pay_purpose;
|
||||
|
||||
return [
|
||||
'ecomId' => $ecomId,
|
||||
'agentId' => $agentId,
|
||||
'eposId' => $eposId,
|
||||
'account' => $account,
|
||||
'rrn' => $rrn,
|
||||
'amount' => $amount,
|
||||
'payPurpose' => $payPurpose,
|
||||
];
|
||||
$curl = curl_init();
|
||||
|
||||
// $curl = curl_init();
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => 'http://10.3.158.102:8888/api/paytrn/new',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => '',
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_TIMEOUT => 0,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'POST',
|
||||
CURLOPT_POSTFIELDS => sprintf('{
|
||||
"ecomId": "%s",
|
||||
"agentId": "%s",
|
||||
"eposId": "%s",
|
||||
"account": "%s",
|
||||
"rrn": "%s",
|
||||
"amount": "%s",
|
||||
"payPurpose": "%s"
|
||||
}', $ecomId, $agentId, $eposId, $account, $rrn, $amount, $payPurpose),
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'Authorization: Basic YWRtaW46UUFad3N4MTIz',
|
||||
'Content-Type: application/json',
|
||||
],
|
||||
]);
|
||||
|
||||
// curl_setopt_array($curl, [
|
||||
// CURLOPT_URL => 'http://10.3.158.102:8888/api/paytrn/new',
|
||||
// CURLOPT_RETURNTRANSFER => true,
|
||||
// CURLOPT_ENCODING => '',
|
||||
// CURLOPT_MAXREDIRS => 10,
|
||||
// CURLOPT_TIMEOUT => 0,
|
||||
// CURLOPT_FOLLOWLOCATION => true,
|
||||
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
// CURLOPT_CUSTOMREQUEST => 'POST',
|
||||
// CURLOPT_POSTFIELDS => sprintf('{
|
||||
// "ecomId": "%s",
|
||||
// "agentId": "%s",
|
||||
// "eposId": "%s",
|
||||
// "account": "%s",
|
||||
// "rrn": "%s",
|
||||
// "amount": "%s",
|
||||
// "payPurpose": "%s"
|
||||
// }', $ecomId, $agentId, $eposId, $account, $rrn, $amount, $payPurpose),
|
||||
// CURLOPT_HTTPHEADER => [
|
||||
// 'Authorization: Basic YWRtaW46UUFad3N4MTIz',
|
||||
// 'Content-Type: application/json',
|
||||
// ],
|
||||
// ]);
|
||||
$response = curl_exec($curl);
|
||||
|
||||
// $response = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
|
||||
// curl_close($curl);
|
||||
|
||||
// return $response;
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,39 +58,11 @@ class SyncWithSystem extends Action
|
||||
pay_purpose: $sberPaymentOrder->created_at->translatedFormat('F').' '.$sberPaymentOrder->created_at->format('Y')
|
||||
);
|
||||
|
||||
info($systemResponse);
|
||||
|
||||
return Action::modal('modal-response', [
|
||||
'title' => 'SYSTEM API',
|
||||
'html' => "
|
||||
<ul class='p-2'>
|
||||
<pre>
|
||||
{$systemResponse['ecomId']}
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
{$systemResponse['agentId']}
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
{$systemResponse['eposId']}
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
{$systemResponse['account']}
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
{$systemResponse['rrn']}
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
{$systemResponse['amount']}
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
{$systemResponse['payPurpose']}
|
||||
</pre>
|
||||
</ul>
|
||||
",
|
||||
'html' => "<>",
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user