Persist onetime donation payment success timestamps for Braintree transactions

This commit is contained in:
Katherine
2023-12-14 19:48:29 -05:00
committed by GitHub
parent bb347999ce
commit 9cfc2ba09a
4 changed files with 12 additions and 15 deletions

View File

@@ -780,8 +780,9 @@ public class SubscriptionController {
})
.thenCompose(unused -> braintreeManager.captureOneTimePayment(request.payerId, request.paymentId,
request.paymentToken, request.currency, request.amount, request.level))
.thenApply(chargeSuccessDetails -> Response.ok(
new ConfirmPayPalBoostResponse(chargeSuccessDetails.paymentId())).build());
.thenCompose(chargeSuccessDetails -> oneTimeDonationsManager.putPaidAt(chargeSuccessDetails.paymentId(), Instant.now()))
.thenApply(paymentId -> Response.ok(
new ConfirmPayPalBoostResponse(paymentId)).build());
}
public static class CreateBoostReceiptCredentialsRequest {