This commit is contained in:
2025-09-09 11:37:08 +05:00
parent ed65172b07
commit 3e04b17edf
2 changed files with 10 additions and 5 deletions

View File

@@ -448,8 +448,13 @@ function syncWithBankSystem(
$payPurpose = $pay_purpose; $payPurpose = $pay_purpose;
return [ return [
'ecomId' => $ecomId,
'agentId' => $agentId,
'eposId' => $eposId,
'account' => $account,
'rrn' => $rrn,
'amount' => $amount, 'amount' => $amount,
'amount_formatted' => number_format($amount, 2, '.', ''), 'payPurpose' => $payPurpose,
]; ];
// $curl = curl_init(); // $curl = curl_init();

View File

@@ -32,10 +32,10 @@ class SyncWithSystem extends Action
*/ */
public function handle(ActionFields $fields, Collection $models) public function handle(ActionFields $fields, Collection $models)
{ {
/** @var \App\Modules\SberPaymentOrder\Models\SberPaymentOrderItem $item */ /** @var \App\Modules\SberPaymentOrder\Models\SberPaymentOrderItem $orderItem */
$item = $models->first(); $orderItem = $models->first();
$result = getSberCredentials($item); $result = getSberCredentials($orderItem);
if (isset($result['error'])) { if (isset($result['error'])) {
$this->handleError($result); $this->handleError($result);
@@ -55,7 +55,7 @@ class SyncWithSystem extends Action
online_payment_terminal_id: $response['terminalId'], online_payment_terminal_id: $response['terminalId'],
user_deposit_account: $sberPaymentOrder->sender_deposit_account, user_deposit_account: $sberPaymentOrder->sender_deposit_account,
online_payment_auth_ref_num: $response['authRefNum'], online_payment_auth_ref_num: $response['authRefNum'],
online_payment_tmt_amount: $response['paymentAmountInfo']['depositedAmount'], online_payment_tmt_amount: $orderItem->tmt_payment_amount,
pay_purpose: $sberPaymentOrder->created_at->translatedFormat('F').' '.$sberPaymentOrder->created_at->format('Y') pay_purpose: $sberPaymentOrder->created_at->translatedFormat('F').' '.$sberPaymentOrder->created_at->format('Y')
)); ));