【发布时间】:2015-05-01 06:00:33
【问题描述】:
我正在使用“订单/创建”挂钩
它是通过应用程序创建的。但是下单时,会多次从api调用hook url。
使用 php,我怎样才能让它只调用一次 hook url。
我正在发送 200 ok 的响应头,这也是我的 api 文件代码
$checkout_information = json_decode(file_get_contents(
'php://input'));
ob_start();
print_r($_REQUEST);
print_r($checkout_information);
$out1 = ob_get_contents();
ob_end_clean();
mail('xxxx@xxx.com','Testing Connect shopify order create',$out1);
$status['status'] = '200';
http_response_code(200);
header("HTTP/1.1 200 OK");
header("Status: 200 OK");
echo json_encode($status);
exit();
在这种情况下任何人都可以帮助我。
【问题讨论】: