Skip to content

Commit

Permalink
set payment method for donation
Browse files Browse the repository at this point in the history
  • Loading branch information
gcatanese committed Sep 13, 2024
1 parent cd2540e commit dabc5c9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ public ResponseEntity<DonationPaymentResponse> donations(@RequestBody Amount bod

donationRequest.amount(body);
donationRequest.reference(UUID.randomUUID().toString());
donationRequest.setPaymentMethod(new DonationPaymentMethod(new CardDonations()));
// set payment method for donation
CardDonations cardDetails = new CardDonations().type(CardDonations.TypeEnum.SCHEME);
donationRequest.paymentMethod(new DonationPaymentMethod(cardDetails));
// set donaton token
donationRequest.setDonationToken(donationToken);
donationRequest.donationOriginalPspReference(pspReference);
donationRequest.setDonationAccount(this.applicationProperty.getDonationMerchantAccount());
Expand Down

0 comments on commit dabc5c9

Please sign in to comment.