Esempio n. 1
0
 public function testFetchPaymentMethod()
 {
     $this->expectException("IuguException");
     $new_cc = Iugu_PaymentMethod::fetch($this->cc->id);
     $fetched_cc = $pm->fetch($new_cc["id"]);
     $this->assertNotNull($fetched_cc);
     $this->assertNotNull($fetched_cc["id"]);
 }
Esempio n. 2
0
 public function default_payment_method()
 {
     if (!isset($this->id)) {
         return false;
     }
     if (!isset($this->default_payment_method_id)) {
         return false;
     }
     if (!$this->default_payment_method_id) {
         return false;
     }
     return Iugu_PaymentMethod::fetch(array("customer_id" => $this->id, "id" => $this->default_payment_method_id));
 }