8889841cwp-content/plugins/give/src/Framework/PaymentGateways/CommandHandlers/PaymentHandler.php000064400000002765150515567530033462 0ustar00home/clixcotz/lions.clix.co.tzpaymentCommand = $paymentCommand; } /** * @since 2.18.0 */ public static function make(PaymentCommand $paymentCommand): PaymentHandler { return new static($paymentCommand); } /** * @since 2.21.0 replace $donationId with Donation model * @since 2.18.0 * * @throws Exception */ public function handle(Donation $donation) { $donation->status = $this->getPaymentStatus(); $donation->gatewayTransactionId = $this->paymentCommand->gatewayTransactionId; $donation->save(); foreach ($this->paymentCommand->paymentNotes as $paymentNote) { DonationNote::create([ 'donationId' => $donation->id, 'content' => $paymentNote ]); } } }