为什么我的条带订阅不起作用?我收到以下错误,但我无法解决此问题。
当我在条带管理面板中创建付款时,我得到了ID参考。我目前使用我的表中的ID来匹配条带中的ID。我不确定如何纠正这一点。
payment = customer.subscriptions.create(
source: params[:stripeToken],
plan: @subscription
# the subscription.id is the database id
# the plan.id in stripe uses the same id as
Stripe是在我的应用程序上设置的,用户可以取消或升级他们的订阅。它与条纹很好地沟通。我需要帮助弄清楚如何使更改与我的数据库通信。
如果用户取消其订阅,则应在cancelled列下的“订阅”表中标记它。在此情况下,如果用户在数据库中显示其订阅被取消,则将限制用户访问网站。
我不知道如何将此添加到已安装的“取消订阅”操作中。
在这方面的帮助将是非常感谢!
订阅控制器:
def new
plan = Plan.find(params[:plan_id])
@subscription = plan.subscriptions.build
if params[:Payer
我使用的是条纹元素,当我创建一个付款意向时,如果有一个有一定价格的计划,它就对我有效。
但是,当计划为零$0时,它不承认payment_intent或client_secret
# Here I created an object of type subscription incompletely (@subscription)
# In such a way that the user can enter their credit card and with the help of
# @subscriptions confirm if everything is fine in chec
我在一个有订阅和一次性收费的应用程序中使用Stripes PHP。
我正在通过网络钩子跟踪以下事件:
// Handle the event
switch ($event->type) {
// Fired for every payment, including subscriptions and one-offs
case 'payment_intent.succeeded':
$payment = $event->data->object;
$this->handleOneOffPaymentSucc
我使用Stripe元素创建订阅,一切都很好.但数量付款意向为$0除外
来自Stripe PaymentIntent文档:
最低金额为0.50美元或相当于收费货币。
在这里,我有一个使用stripe元素创建支付意图的方法。
# Here I created an object of type subscription incompletely (@subscription)
# In such a way that the user can enter their credit card and with the help of
# @subscriptions confirm if
我的代码创建并加载了Stripe,客户在其中输入姓名和卡的详细信息,并被返回到一个php脚本,在该脚本中接收令牌并使用它来创建一个Stripe客户,然后发送一个购买请求以对他们的卡进行充值。
在可能的情况下,我如何最好地使用相同的卡和omnipay库添加订阅?我是使用令牌,还是从购买对象中获取源id并使用它,并在购买后创建订阅?
在类内部,调用下面代码中的createSubscription会给出错误"This customer has no attached payment source“。
public function createSubscription($token,$cus
我是新的条纹,我试图更新一个现有网站的检查到新版本的条纹。在经历了一些困难之后,我已经(几乎)成功了,但是现在我看到代码中的一些东西在我结帐后做了几次订阅(比如每分钟几次)。我怎么才能阻止这一切?
我的代码:
app.post('/create-checkout-session', async (req, res) => {
// let priceId = Object.keys(req.body);
// let objId = new ObjectId(req.body.sub_id);
// let norma = new ObjectId
我在创建条带订阅时遇到问题。我想他们只允许25个当前和预定的订阅。我还检查了和以更新限制。但是没有可用的选项。我在stripe中得到了以下错误。
com.stripe.exception.InvalidRequestException: Customer cus_xxx already has the maximum 25 current and scheduled subscriptions.; code: customer_max_subscriptions; request-id: req_cysxx
at com.stripe.net.LiveStripeResponseGetter.
我正在设置一个表单,以便用户可以添加一个新的Stripe信用卡。我在表单上收到一个First argument in form cannot contain nil or be empty到<%= form_for @subscription do |f| %>
我到底错过了什么,这样我就可以把表格提交给Stripe了?
订阅控制器:
def new
plan = Plan.find(params[:plan_id])
@subscription = plan.subscriptions.build
if params[:PayerID]
@
我正在前台使用条纹结账,并收集用户的卡详细信息,然后在后端使用条纹的PHP库为用户订阅预定义的条纹计划。我得到了错误
(1/1) InvalidRequest This customer has no attached payment source
并且,即使我按照文档等将令牌传递给订阅调用,检查条纹仪表板也会显示用户(条纹客户)没有任何关联的卡详细信息。
前端代码(Laravel模板):
<form action="{{url('subscribe')}}" method="POST" id="stripeform1" c
? 使用测试数据,我可以创建客户并附加付款方式,但我的所有订阅都处于此状态。下面是我当前创建订阅的代码: // StripeCreateSubscription create a new subscription with fixed price for user
func StripeCreateSubscription(w http.ResponseWriter, r *http.Request) {
if r.Method != "POST" {
SendResponse(w, utils.MakeError("you can o
我正在与stripe合作,在python Django中构建一个捐赠表单。一些捐赠是一次性的,另一些是重复的。我想要做的是创建一个customer对象,包含两种类型的费用,这样我们就可以为每笔捐款收集邮寄地址、电子邮件地址等。 我遇到的问题是,我可以使用条形令牌处理一次性付款。但我想不出该怎么和顾客打交道。这就是我到目前为止一直在尝试的。我收到的错误是No such token: cus_asdfasdfasdf。知道我做错了什么吗? donate.html页面上的Javascript: var stripe = Stripe('public_key');
var eleme