本文整理汇总了PHP中Payment::generateForm方法的典型用法代码示例。如果您正苦于以下问题:PHP Payment::generateForm方法的具体用法?PHP Payment::generateForm怎么用?PHP Payment::generateForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Payment
的用法示例。
在下文中一共展示了Payment::generateForm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Payment
<?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>';
示例2: Payment
?>
</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>
示例3: intval
$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) {