Skip to content

Commit

Permalink
fix: broken donations on v2 forms
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubersilva committed Apr 18, 2024
1 parent f849eea commit 2c17d39
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ public function getLegacyFormFieldMarkup(
/**
* First we create a payment, then move on to the gateway processing
*
* @unreleased Add support to "phone" property
* @since 3.2.0 Capture exceptions when get gateway data.
* @since 3.0.0 Catch and handle errors from the gateway here
* @since 2.30.0 Add success, cancel and failed URLs to gateway data. This will be used in both v2 and v3 forms so gateways can just refer to the gateway data.
@@ -84,7 +85,8 @@ public function handleBeforeGateway(array $legacyDonationData, PaymentGateway $r
$formData->donorInfo->email,
$formData->donorInfo->firstName,
$formData->donorInfo->lastName,
$formData->donorInfo->honorific
$formData->donorInfo->honorific,
''
);

$donation = $formData->toDonation($donor->id);
@@ -324,6 +326,7 @@ private function setSession($donationId)
}

/**
* @unreleased Add support to "phone" property
* @since 3.4.0 add $formId and do_action
* @since 3.2.0 add honorific and use GetOrCreateDonor action
* @since 2.21.0
@@ -336,7 +339,8 @@ private function getOrCreateDonor(
string $donorEmail,
string $firstName,
string $lastName,
?string $honorific
?string $honorific,
?string $donorPhone
): Donor {
$getOrCreateDonorAction = new GetOrCreateDonor();

@@ -345,7 +349,8 @@ private function getOrCreateDonor(
$donorEmail,
$firstName,
$lastName,
$honorific
$honorific,
$donorPhone
);

if ($getOrCreateDonorAction->donorCreated) {

0 comments on commit 2c17d39

Please sign in to comment.