public static function listen() { if (filter_has_var(INPUT_POST, 'Data') && filter_has_var(INPUT_POST, 'Seal')) { $input_data = filter_input(INPUT_POST, 'Data', FILTER_SANITIZE_STRING); $data = Pronamic_WP_Pay_Gateways_OmniKassa_Client::parse_piped_string($input_data); $transaction_reference = $data['transactionReference']; $payment = get_pronamic_payment_by_meta('_pronamic_payment_omnikassa_transaction_reference', $transaction_reference); Pronamic_WP_Pay_Plugin::update_payment($payment); } }
public static function listen() { // Also check for typo 'xml_notifaction', as this has been used in the past. if (filter_has_var(INPUT_GET, 'xml_notification') || filter_has_var(INPUT_GET, 'xml_notifaction')) { $data = file_get_contents('php://input'); $xml = Pronamic_WP_Util::simplexml_load_string($data); if (!is_wp_error($xml)) { $notification = Pronamic_WP_Pay_Gateways_IDealBasic_XML_NotificationParser::parse($xml); $purchase_id = $notification->get_purchase_id(); $payment = get_pronamic_payment_by_meta('_pronamic_payment_purchase_id', $purchase_id); if ($payment) { $payment->set_transaction_id($notification->get_transaction_id()); $payment->set_status($notification->get_status()); Pronamic_WP_Pay_Plugin::update_payment($payment); } } } }
function get_pronamic_payment_by_transaction_id($transaction_id, $entrance_code = null) { return get_pronamic_payment_by_meta('_pronamic_payment_transaction_id', $transaction_id); }