Created
June 4, 2017 13:30
-
-
Save eyalcohen4/32f54d445a8c1f0f8b692f5b88c511ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getPaymentUrl($orderId) { | |
$DEFAULT_SUM = 10; | |
$this->load->library('Tranzila'); | |
$tranzila = new Tranzila(); | |
$tranzilaHost = 'secure5.tranzila.com'; | |
$tranzilaPath = '/cgi-bin/tranzila71dt.cgi'; | |
$tranzilaParams = [ | |
'sum' => $DEFAULT_SUM, | |
'TranzilaPW' => getenv('TRANZILA_PASSWORD'), | |
'supplier' => getenv('TRANZILA_SUPPLIER'), | |
'op' => 1, | |
]; | |
$token = $tranzila->setApiHost($tranzilaHost)->setApiPath($tranzilaPath)->setApiParams($tranzilaParams)->getHandShakeToken(); | |
$iframeHost = 'direct.tranzila.com'; | |
$iframePath = '/' . getenv('TRANZILA_SUPPLIER') . '/iframe.php'; | |
$iframeParam = [ | |
'sum' => $DEFAULT_SUM, | |
'orderId' => $orderId, | |
'currency' => Tranzila::CURRENCY_NIS, | |
'cred_type' => Tranzila::CRED_TYPE_WITH_SINGLE_PAYMENT, | |
'lang' => Tranzila::IFRAME_LANGUAGE_HEBREW, | |
'maxpay' => Tranzila::MAX_ALLOWED_PAYMENTS, | |
'thtk' => $token, | |
'tranmode' => 'AK' | |
]; | |
$iframeUrl = $tranzila->setApiHost($iframeHost)->setApiPath($iframePath)->setApiParams($iframeParam)->getIframeLink(); | |
return $iframeUrl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's fine.
But hou te recieve order number and names, quantity, price and sum for every SKU in order?