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
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\PaymentGateways\Gateways\Stripe\Actions; |
| 4 | |
| 5 | use Give\Donations\Models\Donation; |
| 6 | use Give\Framework\PaymentGateways\DonationSummary; |
| 7 | |
| 8 | /** |
| 9 | * @since 2.19.0 |
| 10 | */ |
| 11 | class SaveDonationSummary |
| 12 | { |
| 13 | /** |
| 14 | * @since 2.19.0 |
| 15 | */ |
| 16 | public function __invoke(Donation $donation): DonationSummary |
| 17 | { |
| 18 | $summary = new DonationSummary($donation); |
| 19 | give_update_meta( |
| 20 | $donation->id, |
| 21 | '_give_stripe_donation_summary', |
| 22 | $summary->getSummaryWithDonor() |
| 23 | ); |
| 24 | |
| 25 | return $summary; |
| 26 | } |
| 27 | } |
| 28 |