From fee25d5e0915ebe91950893f2a8c03bce0b08d17 Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Fri, 8 Nov 2024 07:10:46 -0800 Subject: [PATCH 1/2] fix: declare dynamic properties --- .../SessionObjects/Donation.php | 24 +++++ .../SessionObjects/FormEntry.php | 97 +++++++++++++++++++ 2 files changed, 121 insertions(+) diff --git a/src/Session/SessionDonation/SessionObjects/Donation.php b/src/Session/SessionDonation/SessionObjects/Donation.php index 9d28a34050..e3c3cdda03 100644 --- a/src/Session/SessionDonation/SessionObjects/Donation.php +++ b/src/Session/SessionDonation/SessionObjects/Donation.php @@ -73,6 +73,30 @@ class Donation implements Objects */ public $paymentGateway; + /** + * Donation-related objects. + * + * @unreleased + * @var FormEntry + */ + public $formEntry; + + /** + * Donor information. + * + * @unreleased + * @var DonorInfo + */ + public $donorInfo; + + /** + * Card information. + * + * @unreleased + * @var CardInfo + */ + public $cardInfo; + /** * Array of properties and their cast type. * diff --git a/src/Session/SessionDonation/SessionObjects/FormEntry.php b/src/Session/SessionDonation/SessionObjects/FormEntry.php index 57721ba5fc..e882209f93 100644 --- a/src/Session/SessionDonation/SessionObjects/FormEntry.php +++ b/src/Session/SessionDonation/SessionObjects/FormEntry.php @@ -5,6 +5,8 @@ use Give\Framework\Exceptions\Primitives\InvalidArgumentException; use Give\Helpers\ArrayDataSet; use Give\Session\Objects; +use Give\ValueObjects\CardInfo; +use Give\ValueObjects\DonorInfo; /** * Class FormEntry @@ -92,6 +94,101 @@ class FormEntry implements Objects */ public $paymentGateway; + /** + * Donation-related session objects. + * + * @unreleased + * @var FormEntry + */ + public $formEntry; + + /** + * Donor information. + * + * @unreleased + * @var DonorInfo + */ + public $donorInfo; + + /** + * Card information. + * + * @unreleased + * @var CardInfo + */ + public $cardInfo; + + /** + * Honeypot value to detect spam submissions. + * + * @var string|null + */ + public $honeypot; + + /** + * Form ID prefix. + * + * @var string|null + */ + public $formIdPrefix; + + /** + * Form URL. + * + * @var string|null + */ + public $formUrl; + + /** + * Minimum donation amount. + * + * @var float|null + */ + public $formMinimum; + + /** + * Maximum donation amount. + * + * @var float|null + */ + public $formMaximum; + + /** + * Form hash. + * + * @var string|null + */ + public $formHash; + + /** + * Payment mode. + * + * @var string|null + */ + public $paymentMode; + + /** + * Stripe Payment Method. + * + * @var string|null + */ + public $stripePaymentMethod; + /* + + /** + * Constant Contact signup status. + * + * @var bool|null + */ + public $constantContactSignup; + + /** + * Action property. + * + * @var string|null + */ + public $action; + /** * Take array and return object. * From 93f48677f0ba79bffc1c9c302a0a7009ca8db108 Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Fri, 15 Nov 2024 07:03:23 -0800 Subject: [PATCH 2/2] chore: remove whitespace --- src/Session/SessionDonation/SessionObjects/FormEntry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Session/SessionDonation/SessionObjects/FormEntry.php b/src/Session/SessionDonation/SessionObjects/FormEntry.php index e882209f93..75e89a2e50 100644 --- a/src/Session/SessionDonation/SessionObjects/FormEntry.php +++ b/src/Session/SessionDonation/SessionObjects/FormEntry.php @@ -137,14 +137,14 @@ class FormEntry implements Objects * * @var string|null */ - public $formUrl; + public $formUrl; /** * Minimum donation amount. * * @var float|null */ - public $formMinimum; + public $formMinimum; /** * Maximum donation amount.