本文整理匯總了PHP中MemberOrder::updateBilling方法的典型用法代碼示例。如果您正苦於以下問題:PHP MemberOrder::updateBilling方法的具體用法?PHP MemberOrder::updateBilling怎麽用?PHP MemberOrder::updateBilling使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MemberOrder
的用法示例。
在下文中一共展示了MemberOrder::updateBilling方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: trim
$morder->FirstName = $bfirstname;
$morder->LastName = $blastname;
$morder->Address1 = $baddress1;
$morder->Address2 = $baddress2;
//other values
$morder->billing->name = $bfirstname . " " . $blastname;
$morder->billing->street = trim($baddress1 . " " . $baddress2);
$morder->billing->city = $bcity;
$morder->billing->state = $bstate;
$morder->billing->country = $bcountry;
$morder->billing->zip = $bzipcode;
$morder->billing->phone = $bphone;
//$gateway = pmpro_getOption("gateway");
$morder->gateway = $gateway;
$morder->setGateway();
$worked = $morder->updateBilling();
if ($worked) {
//send email to member
$pmproemail = new PMProEmail();
$pmproemail->sendBillingEmail($current_user, $morder);
//send email to admin
$pmproemail = new PMProEmail();
$pmproemail->sendBillingAdminEmail($current_user, $morder);
}
} else {
$worked = true;
}
if ($worked) {
//update the user meta too
$meta_keys = array("pmpro_bfirstname", "pmpro_blastname", "pmpro_baddress1", "pmpro_baddress2", "pmpro_bcity", "pmpro_bstate", "pmpro_bzipcode", "pmpro_bphone", "pmpro_bemail", "pmpro_CardType", "pmpro_AccountNumber", "pmpro_ExpirationMonth", "pmpro_ExpirationYear");
$meta_values = array($bfirstname, $blastname, $baddress1, $baddress2, $bcity, $bstate, $bzipcode, $bphone, $bemail, $CardType, hideCardNumber($AccountNumber), $ExpirationMonth, $ExpirationYear);