<?php include "payment.class.php"; $pay = new Payment(); $pay->setOrderId(123); $pay->setChargedPrice(1234567); $pay->setName('Flavio P. Duarte'); $pay->setCGCCPF('98765432112'); $pay->setPaymentMethod("XXX"); // Mostra a tela echo $pay->generateForm(); echo '<BR>' . $pay->getOrderId() . '<BR>';
?> </td> </tr> <tr> <td><?php echo $matAddr[0]->country; ?> </td> </table> <?php // Finally, draw submit button for appropriated payment method $pay = new Payment(); $pay->setOrderId($reqid); $pay->setChargedPrice($totalPrice); $pay->setName($matUser[0]->fullname); $pay->setAddress($fullAddress); $pay->setCGCCPF($matUser[0]->CNPJ_CPF); $pay->setPaymentMethod($formaPagamento); echo "\n<center>" . $pay->generateForm() . "</center>\n"; $sql = "UPDATE RequestPayment SET paymentType='" . $formaPagamento . "' "; $sql .= "WHERE ReqId=" . $reqid; log_msg($sql); $dbcat = $GLOBALS["dbcatalog"]; if (!$dbcat->query($sql)) { log_msg($dbcat->error($sql)); die($dbcat->error($sql)); } ?> </body> </html>
$payment->amount = number_format(getNumberFromPost($_GET['pret'], 2), 2, '.', ''); $builorder = '' . intval($_GET['offid']); $buildcount = 1; while (strlen($builorder) < 6) { $builorder .= $builorder; $buildcount *= 2; } $builorder = $buildcount . $builorder; $payment->order = $builorder . rand(100, 999); $payment->desc = "Plata decont de prima conform oferta nr. " . intval($_GET['offid']); //get offer info require_once "extensions/process_offer_ws.php"; $off = ws_process("InfoOferta", $_GET['offid']); $data_custom = array("ProductsData" => array(0 => array("ItemName" => "Plata decont " . intval($_GET['offid']), "ItemDesc" => "Comisioane sunt suportate de broker", "Categ" => "Asigurari", "Subcateg" => "Polita", "Quantity" => "1", "Price" => $payment->amount)), "UserData" => array("LoginName" => intval($_GET['offid']), "Email" => $off['emailclient']['VALUE'], "Name" => $off['nume']['VALUE'], "Surname" => $off['prenume']['VALUE'], "Cnp" => $off['cnpcui']['VALUE'], "Phone" => $off['telclient']['VALUE'], "ShippingName" => $off['nume']['VALUE'], "ShippingSurname" => $off['prenume']['VALUE'], "ShippingID" => $off['ciserie']['VALUE'], "ShippingIDNumber" => $off['cinumar']['VALUE'], "ShippingIssuedBy" => $off['localitate']['VALUE'], "ShippingEmail" => $off['emailclient']['VALUE'], "ShippingPhone" => $off['telclient']['VALUE'], "ShippingAddress" => $off['adresa']['VALUE'], "ShippingCity" => $off['localitate']['VALUE'], "ShippingPostalCode" => $off['zip']['VALUE'], "ShippingDistrict" => $off['judet']['VALUE'], "ShippingCountry" => "Romania", "BillingName" => $off['nume']['VALUE'], "BillingSurname" => $off['prenume']['VALUE'], "BillingID" => $off['ciserie']['VALUE'], "BillingIDNumber" => $off['cinumar']['VALUE'], "BillingIssuedBy" => $off['localitate']['VALUE'], "BillingEmail" => $off['emailclient']['VALUE'], "BillingPhone" => $off['telclient']['VALUE'], "BillingAddress" => $off['adresa']['VALUE'], "BillingCity" => $off['localitate']['VALUE'], "BillingPostalCode" => $off['zip']['VALUE'], "BillingDistrict" => $off['judet']['VALUE'], "BillingCountry" => "Romania")); $payment->dataProducts = base64_encode(serialize($data_custom)); $payment->generateForm(); echo $payment->form; //echo $payment->string; //echo '<pre>';print_r($data_custom);echo '</pre>'; ?> </body></html><?php die; } if ($_GET['t'] == "crediteurope") { $amount = getNumberFromPost($_GET['pret'], 2); $transactionType = "Auth"; $rnd = microtime(); $oid = intval($_GET['offid']); $instalment = ""; //get offer info if (intval($off['ce_rate']['VALUE']) > 1) {