(我是第一次发帖,所以请原谅我缺乏正确的格式,如果这个问题已经以某种形式或方式得到了回答)
问题: Shopify API - 通过创建新交易的订单部分退款(反对简单地取消订单)
原因:在不取消订单的情况下给客户部分退款
问题:在将“创建事务”发送到 shopify api 时查询崩溃,没有错误,没有启动 try 和 catch,并且查询到 shopify 后的代码也被忽略。
用于交易的 Shopify 开发人员 API XML/JSON:http: //api.shopify.com/transactions.html
目前使用 Sandeepsheety 的 PHP API 代码: https ://github.com/sandeepshetty/shopify.php/blob/master/README.md
<?php
//-------------------------------------------------------------------------------
//PHP Code Begins
//NOTE: [Does return correct values for the Order through GET through id=135264996 and,
// transaction GET data is verified as well - Test Order Total = $94.50 and,
// tested a few other orders ids with the same result.]
//-------------------------------------------------------------------------------
//Does connect and I have verified with a few GETS and even a couple cancellations
$shopify = shopify_api_client($SHOPIFY_STORE_URL, NULL, $SHOPIFY_API_KEY, $SHOPIFY_TOKEN, true);
//Based on Create Transactions: (POST /admin/orders/#{id}/transactions.json)
$jsonURL= "/admin/orders/135264996/transactions.json";
$query = $shopify('POST', $jsonURL, array('kind'='refund', 'amount'=10));
//NOTHING HAPPENS and Code Stops HERE
echo "Passed"; //IGNORED
?>