0

I have a laravel application and I want to send(POST) some value from a form to another domain for processing. However, whenever I attempt to do so, I get 405 error. Any help, please.

My guzzle fucntion:

    $http = new Client();
        $response = $http->post('https://pay.mysite.com', [
            'form_params' => [
                'amnt' =>  75
            ],
        ]);

     echo $response->getStatusCode();

I simply want to transfer the value to my other domain and process.

kish77
  • 65
  • 2
  • 9
  • Sounds like the site you are posting to is saying "Method Not Allowed"... Could be authentication, invalid URI, etc. Not much to go on. Try and debug with insight on request: https://github.com/guzzle/guzzle/issues/1688 – ficuscr Jun 07 '19 at 21:04
  • Is there any other way I could send this value across even if it is without using Guzzle? – kish77 Jun 07 '19 at 21:13
  • Yes there are other options besides the Guzzle wrapper. [How do I send a POST request with PHP?](https://stackoverflow.com/questions/5647461/how-do-i-send-a-post-request-with-php) – ficuscr Jun 07 '19 at 21:15
  • ok thank you. I'll check those out – kish77 Jun 07 '19 at 21:23

0 Answers0