config('harim_web_services.Harim_Payment.username'), 'password' => config('harim_web_services.Harim_Payment.PASSWORD'), 'amount' => $payment_amount, 'serial' => config('harim_web_services.Harim_Payment.serial'), 'type' => 1, 'instanceid' => config('harim_web_services.Harim_Payment.instanceid'), 'ownerid' => $national_id, 'calculationBox' => "{\"rows\":[{\"amount\":" . $payment_amount . ",\"code\":\"7070011026200593\"}]}" ); $response = Http::withBody(http_build_query($payload)) ->throw() ->withoutVerifying() ->post(config('harim_web_services.Harim_Payment.url')); return $response->body(); } catch (\Throwable $th) { throw new ProhibitedAction('خطا در ارتباط با سرویس پرداخت'); } } return 0; } public function callPaymentStatusBillApi($bill_code) { if (App::isProduction()) { try { $username = config('harim_web_services.Harim_Payment.username'); $password = config('harim_web_services.Harim_Payment.PASSWORD'); $url = config('harim_web_services.Harim_Payment.url'); $result = "{$url}/{$username}/{$password}/{$bill_code}"; return Http::get($result) ->throw() ->body(); }catch (\Throwable $th) { throw new ProhibitedAction('خطا در دریافت'); } } return json_encode(['isPayed' => 1]); } }