在WHMC中禁用PayPal Black借记卡或信用卡按钮
我需要在WHCMS中禁用PayPal的借记卡或信用卡按钮。我已经使用Stripe作为信用卡选项,因此使我的客户感到困惑。谁能为此建议解决方案? ScreenShot
I need to disable the Debit or Credit Card button from PayPal in WHCMS. I have used Stripe for credit card option, so it confuses my customers. Can anyone suggest the solution for this?
screenshot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
要禁用黑色借记卡或信用卡按钮,请添加
& disable-gunding = card
src
的< script>
加载加载该结帐页面上的PayPal JS SDK。因此,例如:
您可以在演示中对此进行测试: https:// https:// developer.paypal.com/demo/checkout/#/pattern/server
To disable the black Debit or Credit Card button, add
&disable-funding=card
to thesrc
of the<script>
that loads the PayPal JS SDK on that checkout page.So, for example:
You can test this in the demo at: https://developer.paypal.com/demo/checkout/#/pattern/server
添加
disable-gunding =信用,卡
到脚本的SRC。例子:
Add
disable-funding=credit,card
to the src of the script.example:
我创建了一个挂钩,该挂钩删除了购物车上的
.express-checkout buttons
元素。它不是理想的,还删除了“默认”贝宝结帐按钮。 To implement the same solution create a file calledDisableExpressCheckout.php
inwhmcs\includes\hooks
and put the following content in it:The above script will create a script element on the卡车页面将等待整个页面加载,然后从DOM上删除Express Checkout按钮。这样做,即使使用CSS将按钮放开按钮,用户也无法使用它们。
您也可以在模板中添加自定义CSS类,以隐藏元素在JavaScript删除之前。您可以通过将以下CSS放置在模板自定义CSS文件中来做到这一点。否则,您可以在上面的钩子中添加
样式
标签。I created a hook that removes the
.express-checkout-buttons
element on the Cart. It is not ideal and also removes the "default" PayPal checkout button. To implement the same solution create a file calledDisableExpressCheckout.php
inwhmcs\includes\hooks
and put the following content in it:The above script will create a script element on the cart page that will wait for the entire page to load and then remove the express checkout buttons from the DOM. In doing so users won't be able to use them at all, even if they unhide the button using CSS.
You might also add a custom CSS class to your template to hide the element before it gets removed by the javascript. You could do that by placing the following CSS in your template custom CSS file. Otherwise you can add an
style
tag in the hook above.