/**
  * Test transform
  *
  * @dataProvider status_matrix_provider
  */
 public function test_transform($responseCode, $expected)
 {
     $status = Pronamic_WP_Pay_Gateways_TargetPay_ResponseCodes::transform($responseCode);
     $this->assertEquals($expected, $status);
 }
예제 #2
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);
         }
     }
 }