Skip to content

Issue with Donation Details Update #7187

Discussion options

You must be logged in to vote

Hey @8verstudio-Chua

You will want replace your usage of our legacy class Give_Payment with the Donation model as it looks like you are trying to use the donation model api with the legacy Give_Payment class which would not work.

Here's an example direction taken from your code:

//update donation type to subscription and other details
$donation = Donation::create([
    'amount' => $subscription->amount,
    'formId' => $subscription->donationFormId,
    'status' => DonationStatus::COMPLETE(),
    'transactionId' => $payment['id'],
    'type' => DonationType::SUBSCRIPTION(),
    'subscriptionId' => $subscription->id,
]);

give()->subscriptions->updateLegacyParentPaymentId($subscription->id…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@8verstudio-Chua
Comment options

@jonwaldstein
Comment options

Answer selected by 8verstudio-Chua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants