Skip to content

Instantly share code, notes, and snippets.

@eyalcohen4
Created June 4, 2017 13:30
Show Gist options
  • Save eyalcohen4/32f54d445a8c1f0f8b692f5b88c511ae to your computer and use it in GitHub Desktop.
Save eyalcohen4/32f54d445a8c1f0f8b692f5b88c511ae to your computer and use it in GitHub Desktop.
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;
}
@lexizli
Copy link

lexizli commented Nov 25, 2020

It's fine.

But hou te recieve order number and names, quantity, price and sum for every SKU in order?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment