Please i need help, i don't know what i am doing wrong. Accessing the API works through postman but not working in my laravel application.
//...........
Client error: `POST https://remitademo.net/remita/exapp/api/v1/send/api/echannelsvc/merchant/api/paymentinit` resulted in a `405 Method Not Allowed` response:
{"responseData":"{\"status\":null,\"responseCode\":\"405\",\"responseMsg\":\"Request method \u0027GET\u0027 not supporte (truncated...)
//.................
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'Authorization' => "remitaConsumerKey={$merchantId},remitaConsumerToken={$hash}"
];
$body = [
"serviceTypeId"=>$serviceTypeId,
"amount"=>$amount,
"orderId"=>$orderId,
"payerName"=> Auth::user()->surname.' '.Auth::user()->firstname,
"payerEmail"=> Auth::user()->email,
"payerPhone"=>Auth::user()->phone,
"description"=>"Payment for Septmeber Fees"
];
$request = new Request('POST', 'https://remitademo.net/remita/exapp/api/v1/send/api/echannelsvc/merchant/api/paymentinit', $headers, json_encode($body));
$res = $client->sendAsync($request
);
GuzzleHttp?Please ensure.