関数
OrderEdit::setActionStatusAndMessage( int $order_id, array $res )
Sets action status and updates amazon_order_state meta value which is checked against to avoid unnecessary Amazon API calls.
パラメータ パラメータ
- $order_id
(数値) (必須)
- $res
(配列) (必須)
ファイル: src/V1/OrderEdit.php
public function setActionStatusAndMessage($order_id, $res) { global $usces; if (isset($_SESSION['amazon_admin_msg'])) { $res = $_SESSION['amazon_admin_msg']; unset($_SESSION['amazon_admin_msg']); switch ($res['method']) { case 'capture': $usces->set_action_status($res['status'], $res['message']); if (!($res['status'] === 'error')) { ModuleUtils::updateOrderReceipt($order_id, 'receipted'); usces_action_acting_getpoint($order_id); $usces->set_order_meta_value('amazon_order_state', 'captured', $order_id); } break; case 'cancel': $usces->set_action_status($res['status'], $res['message']); if (!($res['status'] === 'error')) { ModuleUtils::updateOrderReceipt($order_id, 'noreceipt'); $usces->set_order_meta_value('amazon_order_state', 'canceled', $order_id); } break; } } }