本文整理汇总了PHP中Cart66Common::getLocaleCode方法的典型用法代码示例。如果您正苦于以下问题:PHP Cart66Common::getLocaleCode方法的具体用法?PHP Cart66Common::getLocaleCode怎么用?PHP Cart66Common::getLocaleCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cart66Common
的用法示例。
在下文中一共展示了Cart66Common::getLocaleCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($tax > 0) {
$total = $total + $tax;
}
}
// Set payment information
$payment = array('AMT' => $total, 'TAXAMT' => $tax, 'CURRENCYCODE' => CURRENCY_CODE, 'ITEMAMT' => $itemTotal, 'SHIPPINGAMT' => $shipping, 'NOTIFYURL' => $ipnUrl);
Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Setting Payment Details:\n" . print_r($payment, true));
$pp->setPaymentDetails($payment);
// Add cart items to PayPal
$pp->populatePayPalCartItems();
// Set Express Checkout URLs
$returnPage = get_page_by_path('store/express');
$returnUrl = get_permalink($returnPage->ID);
$cancelPage = get_page_by_path('store/checkout');
$cancelUrl = get_permalink($cancelPage->ID);
$localeCode = Cart66Common::getLocaleCode();
$ecUrls = array('RETURNURL' => $returnUrl, 'CANCELURL' => $cancelUrl, 'LOCALECODE' => $localeCode);
$pp->setEcUrls($ecUrls);
$response = $pp->SetExpressCheckout();
$ack = strtoupper($response['ACK']);
if ('SUCCESS' == $ack || 'SUCCESSWITHWARNING' == $ack) {
Cart66Session::set('PayPalProToken', $response['TOKEN']);
$expressCheckoutUrl = $pp->getExpressCheckoutUrl($response['TOKEN']);
wp_redirect($expressCheckoutUrl);
exit;
} elseif (empty($ack)) {
echo '<pre>Failed to connect via curl to PayPal. The most likely cause is that your PHP installation failed to verify that the CA cert is OK</pre>';
} else {
try {
throw new Cart66Exception(ucwords($response['L_SHORTMESSAGE0']), 66503);
} catch (Cart66Exception $e) {