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; }
<?php require_once '../Mollie/iDEAL/Payment.php'; $partner_id = 00; // Uw mollie partner ID $amount = 120; // Het af te rekenen bedrag in centen (!!!) $description = 'Testbetaling'; // Beschrijving die consument op zijn/haar afschrift ziet. $return_url = 'http://www.domein.nl/return.php'; // URL waarnaar de consument teruggestuurd wordt na de betaling $report_url = 'http://www.domein.nl/report.php'; // URL die Mollie aanvraagt (op de achtergrond) na de betaling om de status naar op te sturen $iDEAL = new Mollie_iDEAL_Payment($partner_id); //$iDEAL->setTestMode(); if (isset($_POST['bank_id']) and !empty($_POST['bank_id'])) { if ($iDEAL->createPayment($_POST['bank_id'], $amount, $description, $return_url, $report_url)) { /* Hier kunt u de aangemaakte betaling opslaan in uw database, bijv. met het unieke transactie_id Het transactie_id kunt u aanvragen door $iDEAL->getTransactionId() te gebruiken. Hierna wordt de consument automatisch doorgestuurd naar de gekozen bank. */ header("Location: " . $iDEAL->getBankURL()); exit; } else { /* Er is iets mis gegaan bij het aanmaken bij de betaling. U kunt meer informatie vinden over waarom het mis is gegaan door $iDEAL->getErrorMessage() en/of $iDEAL->getErrorCode() te gebruiken. */ echo '<p>De betaling kon niet aangemaakt worden.</p>'; echo '<p><strong>Foutmelding:</strong> ', htmlspecialchars($iDEAL->getErrorMessage()), '</p>'; exit; } }
/** * @requires function mb_substr */ public function testSetDescriptionWorksWithUtf8() { $current_encoding = mb_internal_encoding(); if ($current_encoding != "UTF-8") { mb_internal_encoding("UTF-8"); } $ideal = new Mollie_iDEAL_Payment(1001); $exactly_29_utf8_characters = "€ 25 Café in de Überingstraße"; $ideal->setDescription($exactly_29_utf8_characters); $this->assertEquals($exactly_29_utf8_characters, $ideal->getDescription()); mb_internal_encoding($current_encoding); }
<span class="js_job_title"><?php echo JText::_('JS_PAYMENT_METHODS'); ?> </span> <?php if (isset($this->paymentmethod)) { $n = 1; //for the first child padding; foreach ($this->paymentmethod as $key => $paymethod) { $methodname = 'isenabled_' . $key; if ($key == 'ideal') { $partner_id = $this->idealdata['ideal']['partnerid_ideal']; $ideal_testmode = $this->idealdata['ideal']['testmode_ideal']; $idealhelperclasspath = "components/com_jsjobs/classes/ideal/Payment.php"; include_once $idealhelperclasspath; $idealhelperobject = new Mollie_iDEAL_Payment($partner_id); if ($ideal_testmode == 1) { $bank_array = $idealhelperobject->getBanks(); } } if ($paymethod[$methodname] == 1) { ?> <div class="js_listing_wrapper paymentmethod <?php if ($n == 1) { echo 'first-child'; } ?> "> <span class="payment_method_title"> <?php echo $paymethod['title_' . $key];
<?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. */ } }