【发布时间】:2018-06-01 12:37:16
【问题描述】:
我需要将数据发送到不同应用程序的另一个网页,它会发送一些我需要在进一步说明中使用的 json 数据。
我需要向该网页发送一些基本信息,例如cus_name, cus_email, cus_phone,这将以 json 格式发送一些数据。
我对如何捕获 json 响应有了基本的了解:就像那样,
$client = new Client();
$body = $client->get('https://securepay.google.com/gwprocess/v3/api.php')->getBody();
$data = json_decode($body);
return redirect($data->GatewayPageURL);
我如何将这些变量发送到同一控制器并捕获响应? 提前致谢。
【问题讨论】:
-
设计一个Web服务/Rest API来实现这个东西。
标签: php laravel api curl laravel-5