public function getData()
 {
     $this->validate('merchantId', 'customerId', 'transactionId', 'amount', 'currency', 'returnUrl', 'clientIp');
     $data = ['MID' => $this->getMerchantId(), 'AMT' => $this->getAmount(), 'CURR' => Currency::getValue($this->getCurrency()), 'VS' => $this->getTransactionId(), 'RURL' => $this->getReturnUrl(), 'IPC' => $this->getClientIp(), 'NAME' => $this->getCustomerId(), 'TPAY' => 'N', 'AREDIR' => 1, 'TIMESTAMP' => str_pad($this->getTimestamp(), 14, "0", STR_PAD_LEFT)];
     if ($this->getLanguage()) {
         $data['LANG'] = Language::getValue($this->getLanguage());
     }
     $data['HMAC'] = $this->getSignator()->sign($data, $this->getSignatureKeys());
     return $data;
 }
Example #2
0
 /**
  * Get available currencies
  */
 public static function getCurrencies()
 {
     return Enum\Currency::getNames();
 }