関数
Listener::getOrderIdFromChargeId( string $chargeId )
Returns the order_id associated with an Amazon Pay chargeId, if one exists
パラメータ パラメータ
- $chargeId
(文字列) (必須)
ファイル: src/IPN/Listener.php
public function getOrderIdFromChargeId($chargeId) { global $wpdb; $order_meta_table_name = $wpdb->prefix . 'usces_order_meta'; $query = $wpdb->prepare( "SELECT order_id FROM {$order_meta_table_name} WHERE meta_key = %s AND meta_value = %s ORDER BY order_id ASC LIMIT 1", Models\OrderMeta::CHARGE_ID, $chargeId ); $orderId = $wpdb->get_var($query); if (empty($orderId)) { return null; } return $orderId; }