简短版:
我只想接受 Paypal 作为美国 48 岁以下人群以外的任何人的付款方式。
我看不出这不是 bigcommerce 在支付选项下已经安装的功能,并且只是根据下拉国家/地区菜单中的选择隐藏这些支付网关。
不幸的是,我不太了解 bigcommerce,但我已经成功地在 x-cart 等其他购物车上对此进行了编码,没有太多问题。有没有人遇到过这个问题或为我解决了这个问题?
目前,我们已禁止通过我们的商家向美国以外的任何人付款,并在注册您的帐户进行付款时在我们的网站上放置横幅,但随后人们会坐在那里尝试输入他们的 CC 信息 12000 次,淹没了我的邮箱带有捕获警报-_-
在此先感谢
当前正在运行的 Cornerstone 1.5 主题
问问题
251 次
1 回答
0
一种可能的解决方案是使用 JavaScript 读取发货国家或帐单国家/地区,然后显示相关的付款方式。
这是一个概念示例,假设您知道如何选择特定元素(使用浏览器的开发人员工具来确定目标元素的正确选择器)..
/**
* This example binds a change event to the shipping country input dropdown,
* so whenever a country is selected or changed, this code will show the relevant
* payment methods.
* NOTE: The change method here might not work if the payment methods section
* is inaccessible at the time of country selection, at which point you should
* modify the code to read the country at the time of DOM load for the payment methods.
*/
//** Whenever the shipping country is selected or changed **//
$("#shipping_country_dropdown").change(function() {
// Hide/Clear all visible payment options:
$(".payment_methods :input").each(function() {
$(this).hide();
});
togglePaymentMethodsByCountry($(this).find('option:selected').text());
});
/**
* Displays specific payment methods depending on the customer's selected billing or shipping country.
* You set the list of countries and their allowed payment methods here.
* @param country String - The customer selected country.
* @return Void
*/
function togglePaymentMethodsByCountry(country) {
//** Define your country/payment options here, countries in caps **//
switch(country.toUpperCase()) {
case "UNITED STATES OF AMERICA":
$('#payment_method_1').show();
$('#payment_method_2').show();
$('#payment_method_3').show();
break;
case "CANADA":
$('#payment_method_1').show();
$('#payment_method_2').show();
break;
default:
// For all other countries not listed above:
$('#payment_method_3').show();
break;
}
}
于 2017-04-04T08:59:41.757 回答