コード例 #1
0
 /**
  * @return mixed
  */
 public function getCustomerInformation()
 {
     if ($this->customerInformation == null) {
         $c = new CustomerInformation($this->transactionManager);
         $c->setUrl($this->transactionManager->getUrl() . "recurring-bill/");
         $c->getDataByTransaction(TransactionType::RecurringBill, $this->lastRecurringBillResponse->getRecurringBillId());
         $this->customerInformation = $c;
     }
     return $this->customerInformation;
 }
コード例 #2
0
 /**
  * @return mixed
  */
 public function getCustomerInformation()
 {
     if ($this->customerInformation == null) {
         $c = new CustomerInformation($this->transactionManager);
         $c->setUrl($this->transactionManager->getUrl() . "verify/");
         $c->getDataByTransaction(TransactionType::Verify, $this->verifyResponse->getVerifyId());
         $this->customerInformation = $c;
     }
     return $this->customerInformation;
 }
コード例 #3
0
 public static function fromJson($data)
 {
     if (!is_null($data)) {
         $customerInformation = new CustomerInformation();
         $customerInformation->convertData($data);
         $customerInformation->convertDataToCustomer($data);
         return $customerInformation;
     }
 }
コード例 #4
0
 /**
  * Perform a new query that retrieves you the list of Customers for Recurring billings.
  *
  * @return an CustomerInformation list object.
  * @see {@link com.payhub.ws.api.CustomerInformation};
  */
 public function getAllCustomerForRecurringBillInformation()
 {
     $url = $this->getUrl() . "customer/";
     $request = $this->setHeadersGet($url, $this->_oauthToken);
     $result = $this->doGet($request);
     if (array_key_exists('_embedded', $result)) {
         foreach ($result['_embedded']['customers'] as $customer) {
             $response_tmp = CustomerInformation::fromJson(json_encode($customer));
             $response_tmp->setTransactionManager($this);
             $response[] = $response_tmp;
         }
         return $response;
     } else {
         $errors_tmp = new Errors();
         foreach ($result as $errorData) {
             $errors_tmp = Errors::fromArray($errorData);
         }
         $errors[] = $errors_tmp;
         return $errors;
     }
 }
コード例 #5
0
 /**
  * @return mixed
  */
 public function getCustomerInformation()
 {
     if ($this->customerInformation == null) {
         $c = new CustomerInformation($this->transactionManager);
         $c->setUrl($this->transactionManager->getUrl() . "sale/");
         $c->getCustomerForSaleInformationByTransactionId($this->saleResponse->getSaleId());
         $this->customerInformation = $c;
     }
     return $this->customerInformation;
 }
コード例 #6
0
 /**
  * Perform a new query that retrieves you the list of Customers for Recurring billings.
  *
  * @return an CustomerInformation list object.
  * @see {@link com.payhub.ws.api.CustomerInformation};
  */
 public function getAllCustomerForRecurringBillInformation()
 {
     $url = $this->getUrl() . "customer/";
     $request = $this->setHeadersGet($url, $this->_oauthToken);
     $result = $this->doGet($request);
     foreach ($result['_embedded']['customers'] as $billForSale) {
         $response_tmp = CustomerInformation::fromJson(json_encode($billForSale));
         $response_tmp->setTransactionManager($this);
         $response[] = $response_tmp;
     }
     return $response;
 }
コード例 #7
0
 /**
  * @return mixed
  */
 public function getCustomerInformation()
 {
     if ($this->customerInformation == null) {
         $c = new CustomerInformation($this->transactionManager);
         $c->setUrl($this->transactionManager->getUrl() . "authonly/");
         $c . getDataByTransaction(TransactionType::AuthOnly, $this->authOnlyResponse->getTransactionId());
         $this->customerInformation = $c;
     }
     return $this->customerInformation;
 }