public static function fromJson($data) { if (!is_null($data)) { $cardDataInformation = new CardDataInformation(null); $cardDataInformation->convertData($data); $cardDataInformation->convertAbstractData($data); return $cardDataInformation; } }
/** * @return mixed */ public function getCardDataInformation() { if ($this->cardDataInformation == null) { $c = new CardDataInformation($this->transactionManager); $c->getDataByTransaction(TransactionType::Verify, $this->verifyResponse->getVerifyId()); $this->cardDataInformation = $c; } return $this->cardDataInformation; }
/** * Perform a new query that retrieves you the list of Card Data. * * @return an CardDataInformation list object. * @see {@link com.payhub.ws.api.CardDataInformation}; */ public function getAllCardDataInformation() { $url = $this->getUrl() . "carddata/"; $request = $this->setHeadersGet($url, $this->_oauthToken); $result = $this->doGet($request); if (array_key_exists('_embedded', $result)) { foreach ($result['_embedded']['carddata'] as $billForSale) { $response_tmp = CardDataInformation::fromJson(json_encode($billForSale)); $response[] = $response_tmp; } return $response; } else { $errors_tmp = new Errors(); foreach ($result as $errorData) { $errors_tmp = Errors::fromArray($errorData); } $errors[] = $errors_tmp; return $errors; } }
/** * @return mixed */ public function getCardDataInformation() { if ($this->cardDataInformation == null) { $c = new CardDataInformation($this->transactionManager); $c->getDataByTransaction(TransactionType::RecurringBill, $this->lastRecurringBillResponse->getRecurringBillId()); $this->cardDataInformation = $c; } return $this->cardDataInformation; }
/** * Perform a new query that retrieves you the list of Card Data. * * @return an CardDataInformation list object. * @see {@link com.payhub.ws.api.CardDataInformation}; */ public function getAllCardDataInformation() { $url = $this->getUrl() . "carddata/"; $request = $this->setHeadersGet($url, $this->_oauthToken); $result = $this->doGet($request); foreach ($result['_embedded']['carddata'] as $billForSale) { $response_tmp = CardDataInformation::fromJson(json_encode($billForSale)); $response[] = $response_tmp; } return $response; }