Esempio n. 1
0
 /**
  * Create a PBM link
  *
  * @since 1.0.0
  * @param Icepay_Pbm_Object $pbmObject
  * @return string
  */
 public function createLink(Icepay_Pbm_Object $pbmObject)
 {
     $this->validateSettings();
     $linkObj = new StdClass();
     $linkObj->merchantid = $this->getMerchantID();
     $linkObj->timestamp = $this->getTimestamp();
     $linkObj->amount = $pbmObject->getAmount();
     $linkObj->currency = $pbmObject->getCurrency();
     $linkObj->language = $pbmObject->getLanguage();
     $linkObj->orderid = $pbmObject->getOrderID();
     $linkObj->country = $pbmObject->getCountry();
     $linkObj->description = $pbmObject->getDescription();
     $linkObj->reference = $pbmObject->getReference();
     $linkObj->checksum = $this->generateChecksum($linkObj);
     $result = $this->generateURL($linkObj);
     return json_decode($result);
 }