/** * @inheritdoc */ public function fillPaymentFormDataset(Dataset $dataset, Transaction $transaction) { // add some common fields $dataset->setParam('action', 'gaf')->setParam('ver', 4)->setParam('datetime', date("YmdHis")); // convert amount into cents $amount = (int) ($transaction->getSum() * 100); // add transaction information /** @noinspection SpellCheckingInspection */ $dataset->setParam('id', $this->getConfParam('id'))->setParam('ecuno', $transaction->getTransactionId())->setParam('eamount', $amount)->setParam('cur', $transaction->getCurrency())->setParam('lang', $this->getLanguageCode($transaction->getLanguage()))->setParam('charEncoding', $this->getConfParam('charEncoding', 'UTF-8'))->setParam('feedBackUrl', $this->getReturnUrl())->setParam('delivery', $this->getConfParam('delivery', 'S')); if (intval($ecuno = $dataset->getParam('ecuno', 0)) < 100000) { $dataset->setParam('ecuno', $ecuno + 100000000); // add 100 000 000 } $this->addMacSignature($dataset); }
/** * @inheritdoc */ public function fillPaymentFormDataset(Dataset $dataset, Transaction $transaction) { /** @noinspection SpellCheckingInspection */ $dataset->setParam('SOLOPMT_VERSION', '0003')->setParam('SOLOPMT_STAMP', $transaction->getTransactionId())->setParam('SOLOPMT_RCV_ID', $this->getConfParam('SOLOPMT_RCV_ID'))->setParam('SOLOPMT_LANGUAGE', $this->getConfParam('SOLOPMT_LANGUAGE'))->setParam('SOLOPMT_AMOUNT', $transaction->getSum())->setParam('SOLOPMT_DATE', 'EXPRESS')->setParam('SOLOPMT_RETURN', $this->getReturnUrl())->setParam('SOLOPMT_CANCEL', $this->getReturnUrl())->setParam('SOLOPMT_REJECT', $this->getReturnUrl())->setParam('SOLOPMT_CONFIRM', 'YES')->setParam('SOLOPMT_KEYVERS', $this->getConfParam('SOLOPMT_KEYVERS', '0001'))->setParam('SOLOPMT_CUR', $transaction->getCurrency()); // add reference if set if ($transaction->hasReference()) { $dataset->setParam('SOLOPMT_REF', $transaction->getReference()); } elseif (false !== $this->getConfParam('SOLOPMT_REF', false)) { $dataset->setParam('SOLOPMT_REF', $this->getConfParam('SOLOPMT_REF')); } // add comment if set if ($transaction->hasComment()) { $dataset->setParam('SOLOPMT_MSG', $transaction->getComment()); } elseif (false !== $this->getConfParam('SOLOPMT_MSG', false)) { $dataset->setParam('SOLOPMT_MSG', $this->getConfParam('SOLOPMT_MSG')); } // add language if set if ($transaction->getLanguage() !== $this->getConfParam('SOLOPMT_LANGUAGE')) { $dataset->setParam('SOLOPMT_LANGUAGE', $this->getLanguageCode($transaction->getLanguage())); } $this->formatParams($dataset); $mac = $this->generateMacKey($dataset, 'payment'); $dataset->setParam('SOLOPMT_MAC', $mac); return $dataset; }
/** * This can be overridden by child classes of iPizza if necessary */ public function addCommonParams(Dataset $dataset) { $dataset->setParam('VK_SERVICE', $this->getConfParam('VK_SERVICE', '1001'))->setParam('VK_VERSION', '008')->setParam('VK_SND_ID', $this->getConfParam('VK_SND_ID'))->setParam('VK_ACC', $this->getConfParam('VK_ACC'))->setParam('VK_NAME', $this->getConfParam('VK_NAME'))->setParam('VK_RETURN', $this->getReturnUrl())->setParam('VK_CANCEL', $this->getCancelUrl()); }