opencollective / opencollective

We're tracking all our Issues, RFCs and a few other documents in this repository.
https://opencollective.com
MIT License
2.02k stars 371 forks source link

Use Funds as the payment source for Gift Cards #4358

Open Betree opened 3 years ago

Betree commented 3 years ago

We moved Salesforce from the Organization type to Fund. In the process, we've deleted the Prepaid payment method that served as the source for their internal gift cards. As a result, some users are prevented to use them and get an error like "Gift Card source Payment method available".

The ideal fix would be to update the SourcePaymentMethodId for these gift cards to use the account payment method (aka the budget). However, while trying to reproduce a similar use case in a test environment, I faced this issue:

Cannot use the Open Collective payment method if not active.

The root cause is this line. Here, we're considering order.fromCollective as the contributor, while the budget we want to look at is order.paymentMethod.collective.

We should:

Betree commented 2 years ago

We're going to prioritize this in the next few weeks to answer a use case.

poohlaga commented 1 year ago

@Betree & @BenJam

The current implementation of gift cards is causing headaches for accounting purposes because

  1. funds come in to OSC ledger (looks like OSC income) example - https://opencollective.com/opensource/contributions/664073
  2. funds leave via collective ledger (expenses not attributed to OSC but to buysellads) example - https://opencollective.com/buysellads/transactions

From an accounting standpoint these don't match and makes it looks like OSC should have more money that we can not account for.

If this ticket is to treat giftcards more like funds so the income is held on the fund/collective balance, can we move this ticket forward?

znarf commented 1 year ago

@poohlaga In the case of buysellads, there is no Gift Cards involved, it's only a Prepaid Payment Method. So, this doesn't look related to the original ticket @Betree created