本文整理汇总了PHP中CoreUtils::RedirectPOST方法的典型用法代码示例。如果您正苦于以下问题:PHP CoreUtils::RedirectPOST方法的具体用法?PHP CoreUtils::RedirectPOST怎么用?PHP CoreUtils::RedirectPOST使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoreUtils
的用法示例。
在下文中一共展示了CoreUtils::RedirectPOST方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ProceedToPayment
/**
* Send request to payment server
* @param float $amount
* @param integer $invoiceid
* @param string $description
* @param string $type 'single or subscription'
* @param array $extra
*
* @return bool
*/
public final function ProceedToPayment($amount, $invoiceid, $description, $type = 'single', $extra = array())
{
$host = self::HOSTNAME;
if ($type == 'single')
{
$data = array(
"sid" => $this->MerchantID,
"cart_order_id" => $invoiceid,
"total" => $amount,
"card_holder_name" => $extra["firstname"] . " " . $extra["lastname"],
"street_address" => $extra["address"],
"city" => $extra["city"],
"state" => $extra["state"],
"zip" => $extra["zip"],
"country" => $extra["country"],
"email" => $extra["email"],
"phone" => $extra["phone"],
"ship_street_address" => $extra["address"],
"ship_city" => $extra["city"],
"ship_zip" => $extra["zip"],
"ship_country" => $extra["country"],
"ship_state" => $extra["state"],
"Product_description" => $description,
"tco_currency" => $this->CurrencyISO,
"fixed" => "Y"
);
if ($extra["return_url"]) $data["x_receipt_link_url"] = $extra["return_url"];
if ($extra["product_id"]) $data["product_id"] = $extra["product_id"];
//$data["merchant_product_id"] = ($extra["merchant_product_id"]) ? $extra["merchant_product_id"] : time();
if ($this->IsDemo()) $data["demo"] = "Y";
//var_dump($data);
CoreUtils::RedirectPOST($host, $data);
}
elseif ($type == 'subscription')
{
# todo
}
exit();
}
示例2: redirect_post
/**
* Submit HTTP post to $url with form fields $fields
* @access public
* @param string $url URL to redirect to
* @param string $fields Form fields
* @return void
* @deprecated
*/
function redirect_post($url, $fields)
{
CoreUtils::RedirectPOST($url, $fields);
}