CreateCheckoutSession.php
4 years ago
CreatePaymentIntent.php
4 years ago
GetOrCreateStripeCustomer.php
4 years ago
GetPaymentMethodFromRequest.php
4 years ago
SaveDonationSummary.php
4 years ago
UpdateStripeAccountStatementDescriptor.php
4 years ago
ValidatePaymentMethod.php
4 years ago
SaveDonationSummary.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\PaymentGateways\Gateways\Stripe\Actions; |
| 4 | |
| 5 | use Give\PaymentGateways\DataTransferObjects\GatewayPaymentData; |
| 6 | use Give\Framework\PaymentGateways\DonationSummary; |
| 7 | |
| 8 | /** |
| 9 | * @since 2.19.0 |
| 10 | */ |
| 11 | class SaveDonationSummary |
| 12 | { |
| 13 | /** |
| 14 | * @param GatewayPaymentData $paymentData |
| 15 | * |
| 16 | * @return DonationSummary |
| 17 | */ |
| 18 | public function __invoke(GatewayPaymentData $paymentData) |
| 19 | { |
| 20 | $summary = new DonationSummary($paymentData); |
| 21 | give_update_meta( |
| 22 | $paymentData->donationId, |
| 23 | '_give_stripe_donation_summary', |
| 24 | $summary->getSummaryWithDonor() |
| 25 | ); |
| 26 | return $summary; |
| 27 | } |
| 28 | } |
| 29 |