関数
OrderList::batchUpdateOrderStatusCompletion( string $msgstr, array $order_res, array $req, integer $id, WlcOrderList|\dataList $obj )
説明 説明
- function: updateOrderData
 
- $msgstr
 (文字列) (必須)
- $order_res
 (配列) (必須)
- $req
 (配列) (必須) $_REQUEST
- $id
 (integer) (必須)
- $obj
 (WlcOrderList) (必須) @see use-e-shop/classes/orderList[2].class.php
ファイル: src/Admin/OrderList.php
    protected function batchUpdateOrderStatusCompletion($msgstr, $order_res, $req, $id, $obj) {
        global $usces;
        $amazon_order_state = $usces->get_order_meta_value('amazon_order_state', $id);
        if (!empty($amazon_order_state)) {
            return (new V1OrderList($this->module))->batchUpdateOrderStatusCompletion(
                $msgstr,
                $order_res,
                $req,
                $id,
                $obj
            );
        }
        $opts = $this->module->getActingOpts();
        if ($opts['sync_with_order_status_changes'] !== 'on') {
            return $msgstr;
        }
        try {
            $order = new OrderMeta($id);
        } catch (InvalidArgumentException $e) {
            // order is not an Amazon Pay order...
            return $msgstr;
        }
        if ($order->getTransactionState()->getState() !== Charge\State::AUTHORIZED) {
            return $msgstr;
        }
        $result = (new API\Charge\Capture($this->module, $order))->post(
            $order->getChargeId(),
            $order->getMostRecentTransactionAmount(),
            $order->getPaymentCurrency()
        );
        if ($result instanceof GenericError) {
            $msgstr .= !empty($msgstr) ? '<br/><br/>' : '';
            $msgstr .= Utils::adminMessageString($id, 'error', $result->message, false);
        }
        return $msgstr;
    }