标签: stripe-payments

使用发票描述更新和发票条带订阅数量 laravel 收银员

再会,

我正在做一个涉及 laravel 收银员的项目。我想让用户能够更新他们的订阅数量并立即收费(我已经能够实现,使用下面的代码)

$user = Auth::user()
$user->subscription('main')->incrementAndInvoice(10000);
Run Code Online (Sandbox Code Playgroud)

与预期的一样,返回的发票不包含指示更改的描述,而是发票描述为空白。但是当我检查条纹上的事件数据时,有两个描述[见下图]

第一个描述,即用户当前/未使用的数量 在此处输入图片说明

上图显示了当前订阅数量为 5000 件但增加到 15000 件的订阅计划的用户。有没有办法在生成的发票中包含这些描述。

在我检查了incrementAndInvoice()方法之后,它只接受两个参数(1.count, 2.Plan),如下所示;

在此处输入图片说明

没有像我们对charge()方法那样包含描述的选项。有什么解决方法吗?任何正确方向的想法或指示将不胜感激。

提前感谢您的帮助。

php laravel stripe-payments laravel-cashier

13
推荐指数
1
解决办法
803
查看次数

带客户 ID 的 Stripe 付款链接

我目前正在构建一个应用程序,我们希望在其中使用 Stripe Payment 链接,而不是构建我们自己的 UI 版本来支持相同的功能。但我注意到 Stripe Payment Links 每次都会创建一个新客户。有没有办法将我的客户 ID 附加到付款链接,以便当他们尝试购买多个产品时不会创建新客户?我不希望单个用户在我的数据库中拥有多个客户 ID。

谢谢!

stripe-payments

13
推荐指数
1
解决办法
3748
查看次数

Cypress 12.8.1 无法与 Stripe Elements iframe 配合使用

我已经被困在这个问题上很多年了,不知道如何让 Cypress 12.8.1 与 Stripe 元素一起工作来输入信用卡详细信息并创建付款。

我已经在互联网上搜索过,但似乎没有一个解决方案有效。

任何帮助是极大的赞赏。

我努力了:

  1. 使用 xpath https://www.browserstack.com/guide/frames-and-iframes-in-cypress这对我来说不起作用。查看错误:https://github.com/cypress-io/cypress/issues/24764#issuecomment-1489438851 在此输入图像描述

  2. 尝试过这个插件,但它不再起作用了。/sf/answers/4901746671/ https://github.com/dbalatero/cypress-plugin-stripe-elements

  3. 尝试过这个但出现以下错误。

    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)

在此输入图像描述

  1. 尝试了添加自定义 Cypress 命令“iframeLoaded”的几个版本,但我不知道如何在新的 Cypress 12 打字稿格式中添加这些命令,并且只是收到错误。 https://medium.com/@michabahr/testing-stripe-elements-with-cypress-5a2fc17ab27b https://bionicjulia.com/blog/cypress-testing-stripe-elements

我的代码位于 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-payments angular cypress

13
推荐指数
1
解决办法
2290
查看次数

Stripe - Webhook 负载必须以字符串或缓冲区的形式提供

我正在尝试用条纹编写订阅系统。我的以下代码大部分是从 stripe 文档复制的,但它总是向我显示此错误:

\n
Webhook 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\n
Run Code Online (Sandbox Code Playgroud)\n

这是我用 javascript 编写的代码:

\n
app.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)

javascript node.js express stripe-payments

13
推荐指数
2
解决办法
8590
查看次数

使用自定义金额设置条带

我有设置自定义金额的问题,我想将数据量设置为输入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)

javascript jquery stripe-payments

12
推荐指数
2
解决办法
1万
查看次数

在Cordova/Phonegap应用程序中实现Stripe Payment Gateway

搜索了很多.我想在我的cordova应用程序中集成条带支付网关是否有任何方法可以在Android和ios中使用javascript实现它.

javascript android ios cordova stripe-payments

12
推荐指数
1
解决办法
8362
查看次数

stripe.js可以非阻塞方式加载吗?

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)

javascript stripe-payments

12
推荐指数
2
解决办法
3560
查看次数

使用Stripe checkout.js编辑信用卡

通过简单地调用,Stripe 结帐有一种很好的方式来为交易添加信用卡StripeCheckout.open().

条纹结帐

是否有可能使用.open()编辑卡?(传递卡片令牌)

另外,我在哪里可以下载非缩小版本checkout.js以查看.open()方法签名?

stripe-payments

12
推荐指数
1
解决办法
3833
查看次数

使用Reactjs条带自定义表单

在创建自定义表单时,在提交时您需要将表单发送到服务器.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中执行此操作的正确方法是什么?

javascript jquery stripe-payments reactjs

12
推荐指数
1
解决办法
5344
查看次数

Stripe Connect:React Native中客户和帐户之间的区别是什么?

目前,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)

接受/赞成答案.先感谢您.

javascript payment-gateway stripe-payments

12
推荐指数
1
解决办法
2993
查看次数