简体   繁体   English

bitpay托管结帐按钮集成

[英]bitpay hosted checkout button integration

I was trying to process bitcoin payments thru my website using bitpay.我试图使用 bitpay 通过我的网站处理比特币支付。 The problem is that I cannot pass the total amount from the cart to bitpay button in order to charge the customer the right amount.问题是我无法将总金额从购物车传递到 bitpay 按钮,以便向客户收取正确的金额。 I know there is a way to do that since bitpay mention that in their website and I already emailed their support and waiting for an answer but wanna integrate the button earlier since they take some time to answer.我知道有一种方法可以做到这一点,因为 bitpay 在他们的网站上提到了这一点,我已经通过电子邮件发送了他们的支持并等待答复,但由于他们需要一些时间来答复,所以我想早点集成按钮。 If someone is using bitpay or have faced the same problem, please let me know.如果有人正在使用 bitpay 或遇到同样的问题,请告诉我。 Your help will be appreciated.您的帮助将不胜感激。 Thanks.谢谢。

Not sure if this has been answered yet, but I found this question while looking for the same answer, and found it later to help my project with implementing a BitPay button for a shopping cart:不确定是否已经回答了这个问题,但我在寻找相同答案时发现了这个问题,后来发现它可以帮助我的项目为购物车实现 BitPay 按钮:

<form action="https://test.bitpay.com/checkout" method="post">
   <input type="hidden" name="action" value="checkout" />
   <input type="hidden" name="posData" value="" />
   <input type="hidden" name="price" value="<?php echo $price_var;?>" />
   <input type="hidden" name="data" value="...(your data value)..." />
   <input name="checkout" type="submit" value="Checkout" class="form-button-submit button"/>
 </form>

The Bitpay site does not tell you how to set a custom price, but if you have it stored as a global variable (for example, $price_var above), you can use the line above that contains name="price" to set a custom price. Bitpay 站点没有告诉您如何设置自定义价格,但如果您将其存储为全局变量(例如,上面的$price_var ),您可以使用上面包含name="price"来设置自定义name="price"价格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM