1
$ch = curl_init("https://test.chargify.com/subscriptions/10441751.json");
$data = array(
'subscription' => array(
'customer' => array(
'address' => "test123"
)
)
);
$data = json_encode($data);
curl_setopt_array($ch, array(
CURLOPT_USERPWD => "xxx:x", // assume this is correct
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => $data,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data)
)
));
$output = curl_exec($ch);
curl_close($ch);
我被卡住,試圖更新一個chargify訂閱。 cURL調用的輸出完全相同。客戶地址不變。任何想法可能是錯誤的?Chargify更新訂閱
更新客戶信息請執行'print_r($ output)'並告訴它說了什麼。 – jlocker