Php shopify中的事务后api

Php shopify中的事务后api,php,api,shopify,Php,Api,Shopify,我正在尝试更新交易,并通过更改为“已付款”状态将其标记为“已完成” 我正在使用shopifyapi POST/admin/orders/{id}/transactions.json。所以我想知道,在这篇文章中是用来更新或创建新的 此api无法在post中传递值 $transaction = array( 'kind' => 'capture' ); //baseurl is defines properly $ch = curl_init($baseUrl.'orders

我正在尝试更新交易,并通过更改为“已付款”状态将其标记为“已完成”

我正在使用shopifyapi POST
/admin/orders/{id}/transactions.json
。所以我想知道,在这篇文章中是用来更新或创建新的

此api无法在post中传递值

$transaction =
array(
 'kind' => 'capture'
    );
  //baseurl is defines properly

 $ch = curl_init($baseUrl.'orders/#3055189382/transactions.json'); //set the url

 $data_string = json_encode(array('transaction'=>$transaction)); //encode the   product as json
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");  //specify this as a POST
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); //set the POST string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //specify return value as string
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
); 
$server_output = curl_exec ($ch);

对现有对象的任何更改都不应该使用
PUT
?对现有对象的任何更改都不应该使用
PUT