diff --git a/app/Nova/Actions/CheckOnlinePayment.php b/app/Nova/Actions/CheckOnlinePayment.php index a3389ec..2f12f2d 100644 --- a/app/Nova/Actions/CheckOnlinePayment.php +++ b/app/Nova/Actions/CheckOnlinePayment.php @@ -58,7 +58,14 @@ class CheckOnlinePayment extends Action ]); } - $response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatus.do', [ + // $response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatus.do', [ + // 'language' => 'ru', + // 'orderId' => $onlinePaymentResource->orderId, + // 'userName' => $username, + // 'password' => $password, + // ]); + + $response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatusExtended.do', [ 'language' => 'ru', 'orderId' => $onlinePaymentResource->orderId, 'userName' => $username, diff --git a/app/Repos/Payment/Billing/HandlesBillingSyncing.php b/app/Repos/Payment/Billing/HandlesBillingSyncing.php index 305a722..74bfce8 100644 --- a/app/Repos/Payment/Billing/HandlesBillingSyncing.php +++ b/app/Repos/Payment/Billing/HandlesBillingSyncing.php @@ -17,15 +17,20 @@ trait HandlesBillingSyncing CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_POSTFIELDS => '{ - "ecomId" : "12345-12345-12345-12345", - "agentId" : "1304", - "eposId" : "30401238", - "account" : "130420912769753", - "rnn" : "110784016238", - "amount" : 895.46, - "payPurpose" : "Mart 2025" -}', + CURLOPT_POSTFIELDS => sprintf( + '{ + "ecomId" : "%s", + "agentId" : "%s", + "eposId" : "30401238", + "account" : "130420912769753", + "rnn" : "110784016238", + "amount" : 895.46, + "payPurpose" : "Mart 2025" + }', + // $uuid, + // $bankCode, + + ), CURLOPT_HTTPHEADER => [ 'Authorization: Basic YWRtaW46UUFad3N4MTIz', 'Content-Type: application/json',