コード例 #1
0
ファイル: Card.php プロジェクト: dorelljames/laravel-billing
 /**
  * Gets info for a card.
  *
  * @return array|null
  */
 public function info()
 {
     if (!$this->id || !$this->local_customer) {
         return null;
     }
     if (!$this->local_card) {
         $this->local_card = $this->local_customer->cards()->where('id', $this->id)->first();
         $this->gateway->apiDelay();
     }
     if (!$this->local_card) {
         return null;
     }
     return array('id' => $this->id, 'last4' => $this->local_card->last4, 'brand' => $this->local_card->brand, 'exp_month' => $this->local_card->exp_month, 'exp_year' => $this->local_card->exp_year, 'name' => $this->local_card->name, 'address_line1' => $this->local_card->address_line1, 'address_line2' => $this->local_card->address_line2, 'address_city' => $this->local_card->address_city, 'address_state' => $this->local_card->address_state, 'address_zip' => $this->local_card->address_zip, 'address_country' => $this->local_card->address_country);
 }