mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 03:38:07 +01:00
Add method to retrieve receipt credentials for a boost payment
This commit is contained in:
@@ -157,6 +157,20 @@ public class StripeManager {
|
||||
}, executor);
|
||||
}
|
||||
|
||||
public CompletableFuture<PaymentIntent> getPaymentIntent(String paymentIntentId) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
return PaymentIntent.retrieve(paymentIntentId, commonOptions());
|
||||
} catch (StripeException e) {
|
||||
if (e.getStatusCode() == 404) {
|
||||
return null;
|
||||
} else {
|
||||
throw new CompletionException(e);
|
||||
}
|
||||
}
|
||||
}, executor);
|
||||
}
|
||||
|
||||
public CompletableFuture<Subscription> createSubscription(String customerId, String priceId, long level, long lastSubscriptionCreatedAt) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
SubscriptionCreateParams params = SubscriptionCreateParams.builder()
|
||||
|
||||
Reference in New Issue
Block a user