Beispiel #1
0
 public function validateIpn($arr_params)
 {
     try {
         $obj_ideal = new Mollie_iDEAL_Payment($this->arr_settings['account']);
         parent::validateIpn();
         $obj_ideal->checkPayment($arr_params['transaction_id']);
         if ($obj_ideal->getBankStatus() == 'Success') {
             $this->payment_result->confirmed = 1;
         } elseif ($this->obj_ideal->getBankStatus() != 'CheckedBefore') {
             $this->payment_result->confirmed = 0;
         }
         $this->payment_result->log .= "Transaction " . $arr_params['transaction_id'] . " recorded with Bank status: " . $obj_ideal->getBankStatus();
     } catch (Exception $e) {
         $this->payment_result->log .= "CATCH" . print_r($e, true);
         $this->payment_result->error = 01;
         $this->payment_result->confirmed = 0;
     }
     return $this->payment_result;
 }
Beispiel #2
0
 public function testCheckPaymentActionChecksTransactionId()
 {
     $iDEAL = new Mollie_iDEAL_Payment(1001);
     $result = $iDEAL->checkPayment(NULL);
     $this->assertFalse($result);
     $this->assertEquals("Er is een onjuist transactie ID opgegeven", $iDEAL->getErrorMessage());
 }
Beispiel #3
0
<?php

require_once "../Mollie/iDEAL/Payment.php";
$partner_id = 00;
// Uw mollie partner ID
if (isset($_GET['transaction_id'])) {
    $iDEAL = new Mollie_iDEAL_Payment($partner_id);
    // $iDEAL->setTestMode();
    $iDEAL->checkPayment($_GET['transaction_id']);
    if ($iDEAL->getPaidStatus()) {
        /* De betaling is betaald, deze informatie kan opgeslagen worden (bijv. in de database).
          	   Met behulp van $iDEAL->getConsumerInfo(); kunt u de consument gegevens ophalen (de 
           functie returned een array). Met behulp van $iDEAL->getAmount(); kunt u het betaalde
           bedrag vergelijken met het bedrag dat afgerekend zou moeten worden. */
    }
}