직접 처리 할 수없는 문제가 발생했습니다. Appf을 통해 Shopfiy에서 주문의 지불 상태를 변경하고 싶습니다. Shopify의 API 문서는 "지불"로 기존 트랜잭션을 표시하는 방법을 명확하게 설명 https://help.shopify.com/api/reference/transaction#createShopify API 트랜잭션 - "캡처 할 수있는 트랜잭션을 찾을 수 없습니다"
내가 아니라 모든 기록 않았지만, 오류 메시지가 받고 있어요 :
를 "없음 capturable 트랜잭션이 발견되었다"이상한 점은 이전에 만든 다른 응용 프로그램에서 사용했던 코드와 똑같은 코드라는 것입니다.
$shopify = shopify\client($stores[$order['storeID']]['shop'], SHOPIFY_APP_API_KEY, $stores[$order['storeID']]['oauth_token']);
try
{
# Making an API request can throw an exception
$transactions = $shopify('POST /admin/orders/'.$order['order_id'].'/transactions.json', array(), array
(
'transaction' => array
(
"amount" => $order['cod_amount_received'],
"kind" => "capture"
)
));
print_r($transactions);
}
catch (shopify\ApiException $e)
{
# HTTP status code was >= 400 or response contained the key 'errors'
echo $e;
print_r($e->getRequest());
print_r($e->getResponse());
}
catch (shopify\CurlException $e)
{
# cURL error
echo $e;
print_r($e->getRequest());
print_r($e->getResponse());
}
응답은 I 수신 :
phpish는 \ shopify \ ApiException이 [422] 처리 할 수 없음 엔티티 (https://proda-hu.myshopify.com/admin/orders/3264737735/transactions.json) 배열 ('기부'=> 배열 (0 => '아니오 capturable 트랜잭션 없었다 '),),) /)/(헤더에있는 /chroot/home/onlinema/webshippy.com/html/app/syncback_shopify.php 온라인에 98Array ([method] => POST [uri] =>https://proda-hu.myshopify.com/admin/orders/3264737735/transactions.json [ => 배열 ([거래] => 배열 ([금액]) => 배열 ([X-Shopify-Access-Token] => 37c97637d737cf7ac8d8784d3d8ba7fd [content-type] => application/json; charset = utf- ] => 5980.00 [kind] => capture))) 배열 ([errors] => Array ([base ] => 배열 ([0] => 캡처 할 수있는 거래 없음)))
API에서 변경된 사항이 있습니까? 누구든지 도와 줄 수 있습니까? 감사합니다, 앤드류