问题标签 [stripe.js]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
47 浏览

javascript - 承诺不发送任何数据。没有错误?

当这个承诺运行时,浏览器只是超时(没有发送任何数据。ERR_EMPTY_RESPONSE)。终端没有任何错误。第一个 console.log 被打印出来,但没有别的。

0 投票
2 回答
8712 浏览

javascript - Stripe 无法创建临时密钥

我正在制作一个使用 Stripe 的 iOS 项目。我正在使用 STPCustomerContext 并且创建实例的参数是下面 MainAPI 的一个对象。当我创建实例时,它会自动调用 createCustomerKey() 但抛出错误(404)。URL 是“ http://localhost:1337/ephemeral_keys ”,我相信这是我到处都有的,但它却抛出了 404。这是 MainAPI.swift、index.js 和 api.js 的代码。

代码是:

MainAPI.swift

api.js

index.js

当我创建一个 STPCustomerContext (像这样):

打印以下错误(不允许稍后显示 STPPaymentContext):

0 投票
1 回答
1426 浏览

javascript - react-stripe-elements得到“无法读取未定义的属性'props'”

以下是自述文件中的 react-stripe-elements示例。我可以正确设置条纹表单,但在按下支付按钮时出现以下错误。

我的 paymentForm.jsx 是这样的:

从“反应”导入反应;从'react-stripe-elements'导入{injectStripe};

从 './paymentCard' 导入 PaymentCard

0 投票
1 回答
364 浏览

javascript - 带选项的条纹自定义结帐

如何向 Stripe Custom Checkout 添加尺寸选项?截至目前,我有这个使用带有脚本标签的自定义结帐。

0 投票
2 回答
570 浏览

ruby-on-rails - Rails & Stripe - Stripe 卡令牌不保存给新客户以供以后付款(订阅免费试用)

我将 Rails、Devise 和 Stripe 用于 SaaS 应用程序,但在注册时无法保存客户卡信息。

我想保存信息而不收费的原因是因为它是一个免费试用的订阅计划。

到目前为止,我可以获得要创建的卡令牌和要创建的客户,它们都出现在 Stripe 仪表板日志中(POST /v1/tokens 和 POST /v1/customer)。

问题是卡没有显示为客户保存,即他们都被提交但他们没有连接。

我认为这与我在用户模型中创建客户的方式有关:

但我似乎找不到解决方案。

这是我的表格:

这是JS:

这是控制器:

这是模型:

任何人都可以帮助解决为什么创建卡时没有与客户链接?

0 投票
1 回答
162 浏览

reactjs - 条纹结帐错误

我正在尝试对我的商店实施条带结帐,但我收到一条错误消息:在此处输入图像描述

这是我的代码:

0 投票
3 回答
4987 浏览

javascript - 在 Angular 5 中使用 Stripe

我有一个使用 Stripe 来保存客户支付卡信息的 Angular 应用程序。

我将此脚本包含在我的 index.html 中

这个脚本提供了一个“条纹”对象,我可以像这样使用它:

问题是:如何从我的角度打字稿代码中访问 Stripe 对象?

0 投票
3 回答
8953 浏览

react-native - How to implement stripe with react-native using expo?

I have been searching a lot and seen a lot of similar questions but non of them fits in my requirements.

I need to implement Stripe in react-native built using expo XDE. As mentioned in expo docs here: https://docs.expo.io/versions/latest/sdk/payments.html#importing-payments, I will have to detach my project to implement payment but I don't want to do that. Is there any alternative? Also other wrappers available on GitHub doesn't facilitates projects built with expo completely. I am unable to find any complete wrapper or at least a guide to build my own.

I am looking for a solution for subscription based model, I need to charge my customers recursively and allow them to upgrade/downgrade their packages during an on going paid/trial period. I don't want to hold credit card information and allow customers to update their billing information whenever needed. Implement refund policies as well.

0 投票
1 回答
257 浏览

meteor - 流星条纹元素不渲染

我正在尝试将条纹元素形式(v3)与流星形式一起使用。mount()所有代码都运行而不会崩溃,但在调用之后不会渲染任何内容。有任何想法吗?

js:

html:

0 投票
1 回答
1234 浏览

ios - 使用 Stripe.js (iOS) 为 Stripe Connect 支付创建 external_account

我正在尝试将实际银行账户连接到 Stripe Connect 中的条带账户。

但是,我在实际实施中苦苦挣扎。

我使用自定义帐户,所以我想通过我的 iOS 应用程序为用户提供帐户创建逻辑。

在 Stripe API Reference 中,推荐的方法是:“在创建或更新自定义账户时,通过 external_accounts 参数添加目标账户。值应该是从 Stripe.js 返回的银行账户或借记卡令牌。”

创建令牌记录如下(我使用的是 NodeJS):

在帐户创建过程中在哪里链接该令牌?请参阅下面的相关代码:

令牌创建只是在客户端验证帐户信息的一种方式吗?

如果有人可以通过简单的分步解释详细说明这一点,我们会很高兴,在此先感谢您!