Beispiel #1
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);
     }
 }
Beispiel #2
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();
     }
 }
Beispiel #3
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());
     }
 }
Beispiel #4
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);
         }
     }
 }
 /**
  * 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();
     }
 }