Stripe API
を使用してJava Spring MVC
ウェブアプリケーションのAutomatic Renewal
機能を設定しようとしています。私は私のpom.xml
ファイルに次のMaven
依存関係を追加しました:私はhttps://stripe.com/docs/subscriptions/quickstart#define-planからの指示に従うことをしようとしていますJavaでStripe APIを使用して自動更新を設定する
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>5.8.0</version>
</dependency>
。
全く同じコードを使用してリンクに指定されているプランを作成しようとすると、コードにはエラーのみが表示されます。私はeclipse
を使用しており、インポートされるものは何も表示されていません。何かが見つからないように見えますが、ストライプのドキュメントから何も見つかりませんでした。
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
Stripe.apiKey = "sk_test_...";
Map<String, Object> params = new HashMap<String, Object>();
params.put("name", "Basic Plan");
params.put("id", "basic-monthly");
params.put("interval", "month");
params.put("currency", "usd");
params.put("amount", 0);
Plan plan = Plan.create(params);
ストライプAPIで自動更新を設定する例はありますか。
は、あなたがこの記事をチェックすることができます。https://stackoverflow.com/questions/46131842/using-stripe-webhook-to-send-get-customer-details-for -recurring-payments-using-s –