public static function fromJson($data)
 {
     if (!is_null($data)) {
         $merchantInfromation = new MerchantInformation(null);
         $merchantInfromation->convertData($data);
         $merchantInfromation->convertAbstractData($data);
         return $merchantInfromation;
     }
 }
 /**
  * @return mixed
  */
 public function getMerchantInformation()
 {
     if ($this->merchantInformation == null) {
         $m = new MerchantInformation($this->transactionManager);
         $m->getDataByTransaction(TransactionType::Verify, $this->verifyResponse->getVerifyId());
         $this->merchantInformation = $m;
     }
     return $this->merchantInformation;
 }
 /**
  * @return mixed
  */
 public function getMerchantInformation()
 {
     if ($this->merchantInformation == null) {
         $m = new MerchantInformation($this->transactionManager);
         $m->getDataByTransaction(TransactionType::RecurringBill, $this->lastRecurringBillResponse->getRecurringBillId());
         $this->merchantInformation = $m;
     }
     return $this->merchantInformation;
 }
 /**
  * Perform a new query that retrieves you the list of Merchants.
  *
  * @return an MerchantInformation list object.
  * @see {@link com.payhub.ws.api.MerchantInformation};
  */
 public function getAllMerchantInformation()
 {
     $url = $this->getUrl() . "merchant/";
     $request = $this->setHeadersGet($url, $this->_oauthToken);
     $result = $this->doGet($request);
     if (array_key_exists('_embedded', $result)) {
         foreach ($result['_embedded']['merchants'] as $billForSale) {
             $response_tmp = MerchantInformation::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;
     }
 }
예제 #5
0
 /**
  * Perform a new query that retrieves you the list of Merchants.
  *
  * @return an MerchantInformation list object.
  * @see {@link com.payhub.ws.api.MerchantInformation};
  */
 public function getAllMerchantInformation()
 {
     $url = $this->getUrl() . "merchant/";
     $request = $this->setHeadersGet($url, $this->_oauthToken);
     $result = $this->doGet($request);
     foreach ($result['_embedded']['merchants'] as $billForSale) {
         $response_tmp = MerchantInformation::fromJson(json_encode($billForSale));
         $response[] = $response_tmp;
     }
     return $response;
 }
 /**
  * @return mixed
  */
 public function getMerchantInformation()
 {
     if ($this->merchantInformation == null) {
         $m = new MerchantInformation($this->transactionManager);
         $m->getDataByTransaction(TransactionType::Capture, $this->lastCaptureResponse->getTransactionId());
         $this->merchantInformation = $m;
     }
     return $this->merchantInformation;
 }