function getPaymentArray($data) { $payData = array('cac' => $data['Transaction']['Presentation']['Currency'], 'amount' => $data['Transaction']['Presentation']['Amount'], 'MsTxnId' => $data['Transaction']['Identification']['MsTxnId'], 'PspTxnId' => $data['Transaction']['Identification']['PspTxnId'], 'timeStamp' => $data['Transaction']['Processing']['Timestamp'], 'Result' => $data['Transaction']['Processing']['Result'], 'requestType' => 'payNote'); $pay = new pay24($payData); $d = $pay->get_payment_data(); return $d['Sign']; }
<?php date_default_timezone_set('America/Los_Angeles'); include_once './libs/24pay.class.php'; // ID USER IN APP $idUser = 1; $price = 15.55; $debug = true; $pData = array('email' => '*****@*****.**', 'amount' => $price, 'MsTxnId' => mt_rand(0, 99999999), 'requestType' => 'payRequest', 'clientid' => '*****@*****.**', 'firstName' => 'Roman', 'familyName' => 'Huliak'); $p24 = new pay24($pData); $pubData = $p24->get_payment_data(); ?> <a href="https://github.com/roman-huliak/24-pay-payment-gate" target="_blank">https://github.com/roman-huliak/24-pay-payment-gate</a> <br /> <a href="https://www.24-pay.sk/" target="_blank">https://www.24-pay.sk/</a> <form id="payS" method="post" action="<?php echo $pubData['URL']; ?> "> <?php unset($pubData['URL']); foreach ($pubData as $name => $value) { ?> <?php echo $name; ?> <input size="100" type="text" readonly="readonly" name="<?php echo $name; ?>