banco-alimentar / alimentestaideia.pt

Site doações alimente esta ideia
http://alimentestaideia.pt
Other
10 stars 0 forks source link

Payments row is created but no donationId #737

Closed tiagonmas closed 1 year ago

tiagonmas commented 1 year ago

There are payment rows that are "orphan" and do not have a related donation. Last row with null donationid is from 8th of Dec 2022.

select * from payments where DonationId is null
select count(1) from payments where DonationId is null
guerrerotook commented 1 year ago

I created a tool that consolidates this information. Out of the 72 rows, 40 are from donation completed but are not linked, so I updated the database with this tool.

The rest are donations coming from a Subscription that the user didn't finish, so we don't have any way to link that to a Donation.

There are also some other Payments with the same, TransactionKey and EasyPayPaymentId because they were multiple try from the user, but one of the is succeed and the rest and not completed. We can deleted those if you want.

tiagonmas commented 1 year ago

Thanks! Should we add a field to Payments and Donations to indicate it was a "subscription" payment/donation ?

guerrerotook commented 1 year ago

There is already a column in the subscription table, InitialDonationId that link what was the initial donation.