Beispiel #1
0
 public function preparePayment()
 {
     $obj_ideal = new Mollie_iDEAL_Payment($this->arr_settings['account']);
     if (isset($this->arr_settings['secret']) && !empty($this->arr_settings['secret'])) {
         $obj_ideal->setProfileKey($this->arr_settings['secret']);
     }
     //test
     if ($this->testmode == true) {
         $obj_ideal->setTestmode(true);
     }
     $bank = $this->paymentoption;
     // The chosen bank id
     $amount = $this->arr_order['total'] * 100;
     $description = "order: " . $this->arr_order['id'];
     $return_url = $this->url_return_success;
     // Solidshops got $this->url_return_cancel as well, but Mollie doesn't support it
     $report_url = $this->url_callback;
     if ($obj_ideal->createPayment($bank, $amount, $description, $return_url, $report_url)) {
         $this->url_integration = $obj_ideal->getBankURL();
         return true;
     }
     return false;
 }
Beispiel #2
0
 public function testSetBankIdAcceptsTestbankWithTestmodeEnabled()
 {
     $iDEAL = new Mollie_iDEAL_Payment(123);
     $iDEAL->setTestmode();
     $this->assertSame(Mollie_iDEAL_Payment::TEST_BANK_ID, $iDEAL->setBankId(Mollie_iDEAL_Payment::TEST_BANK_ID));
     // Accept other banks as well
     $this->assertSame('0031', $iDEAL->setBankId('0031'));
 }