示例#1
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     if (filter_has_var(INPUT_GET, 'status')) {
         $status = filter_input(INPUT_GET, 'status', FILTER_SANITIZE_STRING);
         $payment->set_status($status);
     }
 }
示例#2
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $result = $this->client->transaction_info($payment->get_transaction_id());
     if (isset($result, $result->paymentDetails)) {
         $state = $result->paymentDetails->state;
         $status = Pronamic_WP_Pay_Gateways_PayNL_States::transform($state);
         $payment->set_status($status);
     }
 }
示例#3
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $mollie_payment = $this->client->get_payment($payment->get_transaction_id());
     if ($mollie_payment) {
         $payment->set_status(Pronamic_WP_Pay_Mollie_Statuses::transform($mollie_payment->status));
         if (isset($mollie_payment->details)) {
             $details = $mollie_payment->details;
             if (isset($details->consumerName)) {
                 $payment->set_consumer_name($details->consumerName);
             }
             if (isset($details->consumerAccount)) {
                 $payment->set_consumer_iban($details->consumerAccount);
             }
         }
     } else {
         $this->error = $this->client->get_error();
     }
 }
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $merchant = new Pronamic_WP_Pay_Gateways_MultiSafepay_Connect_Merchant();
     $merchant->account = $this->config->account_id;
     $merchant->site_id = $this->config->site_id;
     $merchant->site_secure_code = $this->config->site_code;
     $message = new Pronamic_WP_Pay_Gateways_MultiSafepay_Connect_XML_StatusRequestMessage($merchant, $payment->get_transaction_id());
     $result = $this->client->get_status($message);
     if ($result) {
         $status = Pronamic_WP_Pay_Gateways_MultiSafepay_Connect_Statuses::transform($result->ewallet->status);
         $payment->set_status($status);
         $payment->set_consumer_name($result->payment_details->account_holder_name);
         $payment->set_consumer_iban($result->payment_details->account_iban);
         $payment->set_consumer_bic($result->payment_details->account_bic);
         $payment->set_consumer_account_number($result->payment_details->account_id);
     } else {
         $this->error = $this->client->get_error();
     }
 }
示例#5
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $status = $this->client->check_status($this->config->layoutcode, $payment->get_transaction_id(), false, Pronamic_IDeal_IDeal::MODE_TEST === $this->config->mode);
     if ($status) {
         $payment->set_status(Pronamic_WP_Pay_Gateways_TargetPay_ResponseCodes::transform($status->code));
         if (Pronamic_WP_Pay_Gateways_TargetPay_ResponseCodes::OK === $status->code) {
             $payment->set_consumer_name($status->account_name);
             $payment->set_consumer_account_number($status->account_number);
             $payment->set_consumer_city($status->account_city);
         }
     }
 }
示例#6
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $transaction_id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING);
     $status = filter_input(INPUT_GET, 'status', FILTER_SANITIZE_STRING);
     $salt = filter_input(INPUT_GET, 'salt', FILTER_SANITIZE_STRING);
     $checksum = filter_input(INPUT_GET, 'checksum', FILTER_SANITIZE_STRING);
     $payment->set_status(Pronamic_WP_Pay_Gateways_Qantani_PaymentStatuses::transform($status));
 }
示例#7
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $result = $this->client->get_status($payment->get_transaction_id());
     $error = $this->client->get_error();
     if (null !== $error) {
         $this->set_error($error);
     } else {
         $transaction = $result->transaction;
         $payment->set_status($transaction->getStatus());
         $payment->set_consumer_name($transaction->getConsumerName());
         $payment->set_consumer_account_number($transaction->getConsumerAccountNumber());
         $payment->set_consumer_city($transaction->getConsumerCity());
     }
 }
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $approval_code = filter_input(INPUT_POST, 'approval_code', FILTER_SANITIZE_STRING);
     $input_hash = filter_input(INPUT_POST, 'response_hash');
     $hash_values = array($this->client->get_secret(), $approval_code, filter_input(INPUT_POST, 'chargetotal', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'currency', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'txndatetime', FILTER_SANITIZE_STRING), $this->client->get_storename());
     if (filter_has_var(INPUT_POST, 'notification_hash')) {
         $input_hash = filter_input(INPUT_POST, 'notification_hash');
         $hash_values = array(filter_input(INPUT_POST, 'chargetotal', FILTER_SANITIZE_STRING), $this->client->get_secret(), filter_input(INPUT_POST, 'currency', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'txndatetime', FILTER_SANITIZE_STRING), $this->client->get_storename(), $approval_code);
     }
     $hash = Pronamic_WP_Pay_Gateways_EMS_ECommerce_Client::compute_hash($hash_values);
     // Check if the posted hash is equal to the calculated response or notification hash
     if (0 === strcasecmp($input_hash, $hash)) {
         $response_code = substr($approval_code, 0, 1);
         switch ($response_code) {
             case 'Y':
                 $status = Pronamic_WP_Pay_Statuses::SUCCESS;
                 break;
             case 'N':
                 $status = Pronamic_WP_Pay_Statuses::FAILURE;
                 $fail_code = filter_input(INPUT_POST, 'fail_rc', FILTER_SANITIZE_NUMBER_INT);
                 if ('5993' === $fail_code) {
                     $status = Pronamic_WP_Pay_Statuses::CANCELLED;
                 }
                 break;
             default:
                 $status = Pronamic_WP_Pay_Statuses::OPEN;
                 break;
         }
         // Set the status of the payment
         $payment->set_status($status);
         $labels = array('approval_code' => __('Approval code', 'pronamic_ideal'), 'oid' => __('Order ID', 'pronamic_ideal'), 'refnumber' => _x('Reference number', 'creditcard', 'pronamic_ideal'), 'status' => __('Status', 'pronamic_ideal'), 'txndate_processed' => __('Time of transaction processing', 'pronamic_ideal'), 'tdate' => __('Identification for transaction', 'pronamic_ideal'), 'fail_reason' => __('Fail reason', 'pronamic_ideal'), 'response_hash' => __('Response hash', 'pronamic_ideal'), 'processor_response_code' => __('Processor response code', 'pronamic_ideal'), 'fail_rc' => __('Fail code', 'pronamic_ideal'), 'terminal_id' => __('Terminal ID', 'pronamic_ideal'), 'ccbin' => __('Creditcard issuing bank', 'pronamic_ideal'), 'cccountry' => __('Creditcard country', 'pronamic_ideal'), 'ccbrand' => __('Creditcard brand', 'pronamic_ideal'));
         $note = '';
         $note .= '<p>';
         $note .= __('EMS e-Commerce transaction data in response message:', 'pronamic_ideal');
         $note .= '</p>';
         $note .= '<dl>';
         foreach ($labels as $key => $label) {
             if (filter_has_var(INPUT_POST, $key)) {
                 $note .= sprintf('<dt>%s</dt>', esc_html($label));
                 $note .= sprintf('<dd>%s</dd>', esc_html(filter_input(INPUT_POST, $key, FILTER_SANITIZE_STRING)));
             }
         }
         $note .= '</dl>';
         $payment->add_note($note);
     }
 }
示例#9
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $result = $this->client->get_status($payment->get_transaction_id());
     if ($result instanceof Pronamic_WP_Pay_Gateways_Sisow_Error) {
         $this->error = $this->client->get_error();
         return;
     }
     if (false === $result) {
         $this->error = $this->client->get_error();
         return;
     }
     if ($result instanceof Pronamic_WP_Pay_Gateways_Sisow_Transaction) {
         $transaction = $result;
         $payment->set_status($transaction->status);
         $payment->set_consumer_name($transaction->consumer_name);
         $payment->set_consumer_account_number($transaction->consumer_account);
         $payment->set_consumer_city($transaction->consumer_city);
     }
 }
示例#10
0
 /**
  * Update the status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  * @throws Exception
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     // Get the Icepay Result and set the required fields
     $result = new Icepay_Result();
     $result->setMerchantID($this->config->merchant_id)->setSecretCode($this->config->secret_code);
     try {
         // Determine if the result can be validated
         if ($result->validate()) {
             // What was the status response
             switch ($result->getStatus()) {
                 case Icepay_StatusCode::SUCCESS:
                     $payment->set_status(Pronamic_WP_Pay_Statuses::SUCCESS);
                     break;
                 case Icepay_StatusCode::OPEN:
                     $payment->set_status(Pronamic_WP_Pay_Statuses::OPEN);
                     break;
                 case Icepay_StatusCode::ERROR:
                     $payment->set_status(Pronamic_WP_Pay_Statuses::FAILURE);
                     break;
             }
         }
     } catch (Exception $exception) {
         $this->error = new WP_Error('icepay_error', $exception->getMessage(), $exception);
     }
 }
示例#11
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $data = Pronamic_WP_Pay_Gateways_Ogone_Security::get_request_data();
     $data = array_change_key_case($data, CASE_UPPER);
     $calculation_fields = Pronamic_WP_Pay_Gateways_Ogone_Security::get_calculations_parameters_out();
     $fields = Pronamic_WP_Pay_Gateways_Ogone_Security::get_calculation_fields($calculation_fields, $data);
     $signature = $data['SHASIGN'];
     $signature_out = Pronamic_WP_Pay_Gateways_Ogone_Security::get_signature($fields, $this->config->sha_out_pass_phrase, $this->config->hash_algorithm);
     if (0 === strcasecmp($signature, $signature_out)) {
         $status = Pronamic_WP_Pay_Gateways_Ogone_Statuses::transform($data[Pronamic_WP_Pay_Gateways_Ogone_Parameters::STATUS]);
         $payment->set_status($status);
     }
 }
示例#12
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $input_data = filter_input(INPUT_POST, 'Data', FILTER_SANITIZE_STRING);
     $input_seal = filter_input(INPUT_POST, 'Seal', FILTER_SANITIZE_STRING);
     $data = Pronamic_WP_Pay_Gateways_OmniKassa_Client::parse_piped_string($input_data);
     $seal = Pronamic_WP_Pay_Gateways_OmniKassa_Client::compute_seal($input_data, $this->config->secret_key);
     // Check if the posted seal is equal to our seal
     if (0 === strcasecmp($input_seal, $seal)) {
         $response_code = $data['responseCode'];
         $status = Pronamic_WP_Pay_Gateways_OmniKassa_ResponseCodes::transform($response_code);
         // Set the status of the payment
         $payment->set_status($status);
         $labels = array('amount' => __('Amount', 'pronamic_ideal'), 'captureDay' => _x('Capture Day', 'creditcard', 'pronamic_ideal'), 'captureMode' => _x('Capture Mode', 'creditcard', 'pronamic_ideal'), 'currencyCode' => __('Currency Code', 'pronamic_ideal'), 'merchantId' => __('Merchant ID', 'pronamic_ideal'), 'orderId' => __('Order ID', 'pronamic_ideal'), 'transactionDateTime' => __('Transaction Date Time', 'pronamic_ideal'), 'transactionReference' => __('Transaction Reference', 'pronamic_ideal'), 'keyVersion' => __('Key Version', 'pronamic_ideal'), 'authorisationId' => __('Authorisation ID', 'pronamic_ideal'), 'paymentMeanBrand' => __('Payment Mean Brand', 'pronamic_ideal'), 'paymentMeanType' => __('Payment Mean Type', 'pronamic_ideal'), 'responseCode' => __('Response Code', 'pronamic_ideal'));
         $note = '';
         $note .= '<p>';
         $note .= __('OmniKassa transaction data in response message:', 'pronamic_ideal');
         $note .= '</p>';
         $note .= '<dl>';
         foreach ($labels as $key => $label) {
             if (isset($data[$key])) {
                 $note .= sprintf('<dt>%s</dt>', esc_html($label));
                 $note .= sprintf('<dd>%s</dd>', esc_html($data[$key]));
             }
         }
         $note .= '</dl>';
         $payment->add_note($note);
     }
 }
示例#13
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $result = $this->client->check_payment($payment->get_transaction_id());
     if (false !== $result) {
         $consumer = $result->consumer;
         switch ($result->status) {
             case Pronamic_WP_Pay_Gateways_Mollie_IDeal_Statuses::SUCCESS:
                 $payment->set_consumer_name($consumer->name);
                 $payment->set_consumer_account_number($consumer->account);
                 $payment->set_consumer_city($consumer->city);
             case Pronamic_WP_Pay_Gateways_Mollie_IDeal_Statuses::CANCELLED:
             case Pronamic_WP_Pay_Gateways_Mollie_IDeal_Statuses::EXPIRED:
             case Pronamic_WP_Pay_Gateways_Mollie_IDeal_Statuses::FAILURE:
                 $payment->set_status($result->status);
                 break;
             case Pronamic_WP_Pay_Gateways_Mollie_IDeal_Statuses::CHECKED_BEFORE:
                 // Nothing to do here
                 break;
         }
     } else {
         $this->error = $this->client->get_error();
     }
 }
示例#14
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $result = $this->client->get_status($payment->get_transaction_id());
     $error = $this->client->get_error();
     if (is_wp_error($error)) {
         $this->set_error($error);
     } else {
         $transaction = $result->transaction;
         $payment->set_status($transaction->get_status());
         $payment->set_consumer_name($transaction->get_consumer_name());
         $payment->set_consumer_iban($transaction->get_consumer_iban());
         $payment->set_consumer_bic($transaction->get_consumer_bic());
     }
 }
示例#15
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $method = filter_var($_SERVER['REQUEST_METHOD'], FILTER_SANITIZE_STRING);
     $data = array();
     switch ($method) {
         case 'GET':
             $data = $_GET;
             break;
         case 'POST':
             $data = $_POST;
             // WPCS: CSRF OK
             break;
     }
     $data = Pronamic_WP_Pay_Buckaroo_Util::urldecode($data);
     $data = stripslashes_deep($data);
     $data = $this->client->verify_request($data);
     if ($data) {
         $payment->set_transaction_id($data[Pronamic_WP_Pay_Buckaroo_Parameters::PAYMENT]);
         $payment->set_status(Pronamic_WP_Pay_Buckaroo_Statuses::transform($data[Pronamic_WP_Pay_Buckaroo_Parameters::STATUS_CODE]));
         $payment->set_consumer_iban($data[Pronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_IBAN]);
         $payment->set_consumer_bic($data[Pronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_BIC]);
         $payment->set_consumer_name($data[Pronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_NAME]);
         $labels = array(Pronamic_WP_Pay_Buckaroo_Parameters::PAYMENT => __('Payment', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::PAYMENT_METHOD => __('Payment Method', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::STATUS_CODE => __('Status Code', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::STATUS_CODE_DETAIL => __('Status Code Detail', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::STATUS_MESSAGE => __('Status Message', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::INVOICE_NUMBER => __('Invoice Number', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::AMOUNT => __('Amount', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::CURRENCY => __('Currency', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::TIMESTAMP => __('Timestamp', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_ISSUER => __('Service iDEAL Consumer Issuer', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_NAME => __('Service iDEAL Consumer Name', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_IBAN => __('Service iDEAL Consumer IBAN', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_BIC => __('Service iDEAL Consumer BIC', 'pronamic_ideal'), Pronamic_WP_Pay_Buckaroo_Parameters::TRANSACTIONS => __('Transactions', 'pronamic_ideal'));
         $note = '';
         $note .= '<p>';
         $note .= __('Buckaroo data:', 'pronamic_ideal');
         $note .= '</p>';
         $note .= '<dl>';
         foreach ($labels as $key => $label) {
             if (isset($data[$key])) {
                 $note .= sprintf('<dt>%s</dt>', esc_html($label));
                 $note .= sprintf('<dd>%s</dd>', esc_html($data[$key]));
             }
         }
         $note .= '</dl>';
         $payment->add_note($note);
     }
 }
示例#16
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $result = $this->client->get_payment_status($payment->get_id());
     if ($result) {
         $payment->set_status(Pronamic_WP_Pay_Gateways_PayDutch_States::transform($result->state));
         $payment->set_consumer_name($result->consumername);
         $payment->set_consumer_account_number($result->consumeraccount);
         $payment->set_consumer_city($result->consumercity);
         // $payment->set_consumer_country( $result->consumercountry );
     } else {
         $this->error = $this->client->get_error();
     }
 }
示例#17
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $mollie_payment = $this->client->get_payment($payment->get_transaction_id());
     if (!$mollie_payment) {
         $this->error = $this->client->get_error();
         return;
     }
     $status = Pronamic_WP_Pay_Mollie_Statuses::transform($mollie_payment->status);
     $payment->set_status($status);
     $subscription = $payment->get_subscription();
     if ($subscription && '' === $subscription->get_transaction_id()) {
         // First payment or non-subscription recurring payment,
         // use payment status for subscription too.
         $subscription->set_status($status);
     }
     if (isset($mollie_payment->details)) {
         $details = $mollie_payment->details;
         if (isset($details->consumerName)) {
             $payment->set_consumer_name($details->consumerName);
         }
         if (isset($details->consumerAccount)) {
             $payment->set_consumer_iban($details->consumerAccount);
         }
     }
 }
示例#18
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $data = Pronamic_WP_Pay_Gateways_Ogone_Security::get_request_data();
     $data = $this->client->verify_request($data);
     if (false !== $data) {
         $status = Pronamic_WP_Pay_Gateways_Ogone_Statuses::transform($data[Pronamic_WP_Pay_Gateways_Ogone_Parameters::STATUS]);
         $payment->set_status($status);
         $this->update_status_payment_note($payment, $data);
     }
 }
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $order = $this->client->get_order($payment->get_transaction_id());
     if ($order) {
         $payment->set_status(Pronamic_WP_Pay_ING_KassaCompleet_Statuses::transform($order->status));
         if (isset($order->transactions[0]->payment_method_details)) {
             $details = $order->transactions[0]->payment_method_details;
             if (isset($details->consumer_name)) {
                 $payment->set_consumer_name($details->consumer_name);
             }
             if (isset($details->consumer_iban)) {
                 $payment->set_consumer_iban($details->consumer_iban);
             }
         }
     } else {
         $this->error = $this->client->get_error();
     }
 }
示例#20
0
 /**
  * Update status of the specified payment
  *
  * @param Pronamic_Pay_Payment $payment
  */
 public function update_status(Pronamic_Pay_Payment $payment)
 {
     $data = Pronamic_WP_Pay_Gateways_Ogone_Security::get_request_data();
     $data = $this->client->verify_request($data);
     if (false !== $data) {
         $status = Pronamic_WP_Pay_Gateways_Ogone_Statuses::transform($data[Pronamic_WP_Pay_Gateways_Ogone_Parameters::STATUS]);
         $payment->set_status($status);
         $this->update_status_payment_note($payment, $data);
         return;
     }
     $order_id = $payment->format_string($this->config->order_id);
     $status = $this->client->get_order_status($order_id);
     if (null !== $status) {
         $payment->set_status($status);
     }
 }