再会,
我正在做一个涉及 laravel 收银员的项目。我想让用户能够更新他们的订阅数量并立即收费(我已经能够实现,使用下面的代码)
$user = Auth::user()
$user->subscription('main')->incrementAndInvoice(10000);
Run Code Online (Sandbox Code Playgroud)
与预期的一样,返回的发票不包含指示更改的描述,而是发票描述为空白。但是当我检查条纹上的事件数据时,有两个描述[见下图]
上图显示了当前订阅数量为 5000 件但增加到 15000 件的订阅计划的用户。有没有办法在生成的发票中包含这些描述。
在我检查了incrementAndInvoice()方法之后,它只接受两个参数(1.count, 2.Plan),如下所示;
没有像我们对charge()方法那样包含描述的选项。有什么解决方法吗?任何正确方向的想法或指示将不胜感激。
提前感谢您的帮助。
我目前正在构建一个应用程序,我们希望在其中使用 Stripe Payment 链接,而不是构建我们自己的 UI 版本来支持相同的功能。但我注意到 Stripe Payment Links 每次都会创建一个新客户。有没有办法将我的客户 ID 附加到付款链接,以便当他们尝试购买多个产品时不会创建新客户?我不希望单个用户在我的数据库中拥有多个客户 ID。
谢谢!
我已经被困在这个问题上很多年了,不知道如何让 Cypress 12.8.1 与 Stripe 元素一起工作来输入信用卡详细信息并创建付款。
我已经在互联网上搜索过,但似乎没有一个解决方案有效。
任何帮助是极大的赞赏。
我努力了:
使用 xpath https://www.browserstack.com/guide/frames-and-iframes-in-cypress这对我来说不起作用。查看错误:https://github.com/cypress-io/cypress/issues/24764#issuecomment-1489438851

尝试过这个插件,但它不再起作用了。/sf/answers/4901746671/ https://github.com/dbalatero/cypress-plugin-stripe-elements
尝试过这个但出现以下错误。
const $body = $element.contents().find('body')
let stripe = cy.wrap($body)
stripe.find('input[name="number"]').click().type('4242424242424242')
stripe = cy.wrap($body)
stripe.find('input[name="expiry"]').click().type('4242')
stripe = cy.wrap($body)
stripe.find('input[name="cvc"]').click().type('424')
})
Run Code Online (Sandbox Code Playgroud)
我的代码位于 support/commands.ts
// ***********************************************
// This example namespace declaration will help
// with Intellisense and code completion in your
// IDE or Text Editor.
// ***********************************************
declare namespace Cypress {
interface Chainable<Subject = any> {
iframeLoaded($iframe: …Run Code Online (Sandbox Code Playgroud) 我正在尝试用条纹编写订阅系统。我的以下代码大部分是从 stripe 文档复制的,但它总是向我显示此错误:
\nWebhook signature verification failed. Webhook payload must b\ne provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.Payload was provided as a parsed JavaScript object instead.\nSignature verification is impossible without access to the original signed material.\nLearn more about webhook signing and explore webhook integration \nexamples for various frameworks at https://github.com/stripe/stripe-node#webhook-signing\nRun Code Online (Sandbox Code Playgroud)\n这是我用 javascript 编写的代码:
\napp.post(\n '/webhook',\n express.raw({ type: 'application/json' }),\n (request, response) => {\n let event = request.body;\n\n const endpointSecret = …Run Code Online (Sandbox Code Playgroud) 我有设置自定义金额的问题,我想将数据量设置为输入id ="custom-donation-amount"中的任何用户,我应该怎么做.我的尝试不起作用.
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-image="images/button.png"
data-key="pk_test_FTZOOu9FL0iYJXXXXXX"
data-name="Fund"
data-label= "DONATE"
data-description="ysysys"
data-amount =
>
$('.donate-button').click(function(event){
var self = $(this);
var amount = 0;
amount = $('#custom-donation-amount').val();
if (amount === "") {
amount = 50;
}
amount = self.attr('data-amount');
amount = Math.abs(amount * 100);
});
</script>
<input type="number" id="custom-donation-amount" placeholder="50.00" min="0" step="10.00"/>
Run Code Online (Sandbox Code Playgroud) 搜索了很多.我想在我的cordova应用程序中集成条带支付网关是否有任何方法可以在Android和ios中使用javascript实现它.
stripe.js可以延期并与一些我在文档中找不到的准备回调一起使用吗?
这就是我想做的事情:
<script src="https://js.stripe.com/v2/" async></script>
Run Code Online (Sandbox Code Playgroud)
然后在我的应用程序中:
function stripeReadyHandler () {
//do stuff
}
Run Code Online (Sandbox Code Playgroud) 通过简单地调用,Stripe 结帐有一种很好的方式来为交易添加信用卡StripeCheckout.open().

是否有可能使用.open()到编辑卡?(传递卡片令牌)
另外,我在哪里可以下载非缩小版本checkout.js以查看.open()方法签名?
在创建自定义表单时,在提交时您需要将表单发送到服务器.DOM选择器非常简单.这里:
var $form = $('#payment-form');
Stripe.createToken($form, this.stripe_response_handler);
Run Code Online (Sandbox Code Playgroud)
但是,在使用React时,不应该直接尝试修改或访问DOM.为了克服这一点,我用了ref.这里:
<Form onSubmit={this.select_plan} ref={(ref) => this.paymentForm = ref} >
...
</Form>
Run Code Online (Sandbox Code Playgroud)
然后
Stripe.createToken(this.paymentForm, this.stripe_response_handler);
Run Code Online (Sandbox Code Playgroud)
但是这导致了错误:
未捕获的TypeError:将循环结构转换为JSON
在React中执行此操作的正确方法是什么?
目前,Connect似乎可以Accounts做到一切Customers,例如可以直接在Accounts账户中添加银行卡.所以只Accounts为用户创建一个似乎就足够了,但是有没有必要创建一个Customers对象?
例如,在教程(https://stripe.com/docs/connect/payments-fees)中,对于TOKEN,可以简单地提供Accounts可发布的密钥:
stripe.charges.create({
amount: 1000,
currency: 'usd',
source: {TOKEN},
destination: {CONNECTED_STRIPE_ACCOUNT_ID}
});
Run Code Online (Sandbox Code Playgroud)
需要澄清的source是,资金将从哪里撤出,destination资金将用于何处?资金将存入destination默认银行账户?
此外,当Accounts通过API创建时,新连接的帐户帐户是否可以通过平台的仪表板查看?并且还能够查看交易和余额?
最后,在转移资金时,如果没有定义来源,这是否意味着资金将从平台账户的余额中提取?
var stripe = require('stripe')(PLATFORM_SECRET_KEY);
stripe.transfers.create(
{
amount: 1000,
currency: "usd",
destination: "default_for_currency"
},
{stripe_account: CONNECTED_STRIPE_ACCOUNT_ID}
);
Run Code Online (Sandbox Code Playgroud)
接受/赞成答案.先感谢您.