diff --git a/app/Http/Controllers/OnlinePaymentController.php b/app/Http/Controllers/OnlinePaymentController.php index b995747..317bcc7 100644 --- a/app/Http/Controllers/OnlinePaymentController.php +++ b/app/Http/Controllers/OnlinePaymentController.php @@ -46,8 +46,8 @@ class OnlinePaymentController extends Controller $response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatus.do', [ 'language' => 'ru', 'orderId' => $request->orderId, - 'userName' => $resource->branch->billing_username, - 'password' => $resource->branch->billing_password, + 'userName' => $resource->branch->billing_visa_master_username, + 'password' => $resource->branch->billing_visa_master_password, ]); $payment_status = $response['ErrorCode'] == '0'; diff --git a/app/Nova/Actions/MakePaymentNovaVisaMaster.php b/app/Nova/Actions/MakePaymentNovaVisaMaster.php index c6bd0a1..dd32008 100644 --- a/app/Nova/Actions/MakePaymentNovaVisaMaster.php +++ b/app/Nova/Actions/MakePaymentNovaVisaMaster.php @@ -8,6 +8,7 @@ use App\Repos\Payment\OnlinePaymentRepo; use Illuminate\Bus\Queueable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Collection; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; use Illuminate\Validation\Rule; @@ -51,7 +52,9 @@ class MakePaymentNovaVisaMaster extends Action return ActionResponse::danger('Şahamça visa/master tölegi kabul edip bilmeýär.'); } - $payment = $this->order($resource, $fields->payment_method); + $total_amount = floatval(number_format($fields->payment_amount, 2)) + 23; + + $payment = $this->order($resource, $total_amount); return $payment['status'] === 'success' ? ActionResponse::openInNewTab($payment['url']) @@ -75,7 +78,11 @@ class MakePaymentNovaVisaMaster extends Action $max_value = number_format($usd_to_tmt->value * 250, 2); return [ - Heading::make('1 USD = ' . $usd_to_tmt->value . ' TMT'), + Heading::make(Blade::render(<<1 USD = $usd_to_tmt->value TMT +