- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将 Stripe Java 库与 JSP Java servlet 一起使用。
我已将以下库导入到 servletaccept paymentrequest.java 中:
import com.stripe.Stripe;
import com.stripe.exception.APIConnectionException;
import com.stripe.exception.APIException;
import com.stripe.exception.AuthenticationException;
import com.stripe.exception.CardException;
import com.stripe.exception.InvalidRequestException;
import com.stripe.model.Charge;
我的pom.xml如下:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jsp.payments</groupId>
<artifactId>payments-app</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>payments-app Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<tomcat.version>9.0.0.M6</tomcat.version>
</properties>
<dependencies>
...
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>8.1.0</version>
</dependency>
</dependencies>
<build>
<finalName>payments-app</finalName>
<resources>
<resource>
<directory>src/main/webapp</directory>
<targetPath>META-INF/resources</targetPath>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<inherited>true</inherited>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>payments-app-${project.version}</finalName>
<archive>
<manifest>
<mainClass>com.jsp.payments.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
当我运行命令时
mvn compile
我收到两个编译错误:
cannot find symbol: class APIConnectionException location: package com.stripe.exception
cannot find symbol: class APIException location: package com.stripe.exception
感谢任何帮助。
最佳答案
删除以下导入语句后编译项目:
import com.stripe.exception.APIConnectionException;
import com.stripe.exception.APIException;
import com.stripe.exception.AuthenticationException;
import com.stripe.exception.CardException;
import com.stripe.exception.InvalidRequestException;
根据官方 Stripe Java API 文档,仅导入了这个:
import com.stripe.exception.StripeException
关于java - 使用 Stripe 时 Maven 编译错误 : Cannot find symbol APIException, APIConnectionException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55416890/
我可以在不使用收款人信用卡号的情况下将资金从我的 Stripe 账户发送到另一个 Stripe 账户吗?在我的网站中,我希望管理员将资金从他的帐户转移到用户的条纹帐户(而不是用户的银行帐户)。用户的
我曾经有 Angular Stripe Checkout 表单,我正在尝试将表单更新为新的 Stripe Card Elements这是最近推出的。 删除表单输入字段并将其替换为条纹卡片元素后,我的表
我的目标是为产品创建一个简单的支付页面。 在官方文档中,它说在服务器端需要生成 token 才能创建交易,使用: stripe.paymentIntents.create({ amount: re
我是 strip 的新手,打算使用 strip token /收费 api,但 strip 文档说 paymentIntent api 是新的方法。我可以使用任何人吗或 PaymentIntent 是
我正在开发一个项目,我们正在为 Node 使用 Stripe 库。我们还想在这个项目上使用 TypeScript。 我发现 Stripe 没有提供官方 TypeScript 定义,但我找到了一些社区定
通常在使用 stripe 时我可以创建产品并添加税率、运费。付款后我可以创建发票。我想在使用连接帐户时做同样的事情。在我的应用程序中,我希望用户创建商店,并且该商店的产品将保存到他们连接的 Strip
假设我们已经设置了一个 Stripe 订阅计划。即 30 美元/月。 (注意:账单/账户信息存储在 Stripe 上。) 假设我们想为客户提供提前购买一年服务的选项,如果他们这样做,他们只需支付 25
我们知道 Stripe 支持多张信用卡。一个是 default_card。关于这张 Stripe 多张卡片,我需要知道一些答案。 假设我想向我的客户收费,他的 Stripe 个人资料中有 3 张信用卡
有没有办法根据为特定客户生成的最后一张发票过滤发票结果? 穿过 Stripe documentation我可以看到有可能获得即将到来的发票,但我找不到获得最后生成的发票的方法。 最佳答案 如果您使用
我正在使用 Stripe 为客户订阅月度计划。中途客户可能会减少计划数量。所以,在即将开出的发票有时会是负数。 带有负金额的发票行是否意味着客户将这些金额退还到他们的卡中? 谢谢 最佳答案 是的,负发
我正在使用定期计划和电子邮件地址在 Stripe(使用测试模式)中创建客户。到目前为止,一切都按我的预期工作:当客户创建并注册到定期计划时,他们会自动在计划的第一期收费。我所拥有的几乎是逐字逐句wha
我正在尝试使用 Stripe checkout.js 订阅,然后使用 PHP 订阅客户。我的问题是获取他们的电子邮件地址。在文档中找不到任何有用的东西。 文档在这里:https://stripe.co
我在两部分付款过程中使用 Stripe。 IE。 使用 capture = false 对调用 Charge 对象的卡进行预授权 做一些数据库工作 使用电荷捕获为卡充电 如果第 2 步失败(即数据库工
我们使用 Stripe 作为支付网关,我们有一个年度计划,即该计划的计费周期为 1 年。 在计费周期内,用户可以更新选择更多席位,这将导致增加订阅计划的数量。 Subscription subscri
我正在使用 PHP Stripe Payment 表单来收款。付款似乎通过 OK 并在成功完成后将用户带到确认页面。我处于测试模式,能够看到显示在仪表板“付款”部分的付款。但是,当我单击仪表板的“主页
我正在构建一个市场应用程序。我正在使用 Stripe 接受买家付款并将百分比转移给卖家。但是,stripe 只能让您从 Stripe 余额中转移。因此,如果我接受需要 2 个工作日才能显示在我的 st
正如我们所知,Stripe 每张信用卡收费 2.9% + 30 美分。因此,对于每 1 美元的交易,Stripe 大约需要 33 美分。有没有办法批量处理多个 1 美元的交易(由同一客户)并完全收费?
我有一个关于 Stripe 的订阅计划,并将其用于按座位定价。 具体用例是: 客户之前已付款,因此数据库中的客户 ID 和订阅 ID 他们在一个月内删除了所有用户 下个月他们又添加了一个用户 我希望结
在Stripe API文档中,它们显示您可以在客户上应用优惠券。 cust = Stripe::Customer.retrieve("cus_asdasdad") cust.coupon = "COU
我在订阅中添加发票项目时遇到问题,目前无法正常工作。 我已经在 strip 上创建了一个发票项目,并且希望该发票项目包含在定期付款中 这是我的代码,它在第一个发票上添加了一个发票项目,但在下一个发票上
我是一名优秀的程序员,十分优秀!