Page MenuHomePhabricator

Donation Form Currency Issue PayPal USD/CNY
Closed, ResolvedPublic

Description

A donor in Zendesk #1150435 & Civi cid=35973901 attempted to donate via PayPal in CNY.

Our donation form https://donate.wikimedia.org/w/index.php?title=Special:LandingPage&uselang=en&country=CN indicates that a donation made from China via PayPal will actually process in USD. (This is common for us as we do offer PayPal in USD only in other countries such as Columbia, Uruguay, Argentina, Brazil, and Chile.)

However, we made test donations from https://donate.wikimedia.org/w/index.php?title=Special:LandingPage&uselang=en&country=CN and https://donate.wikimedia.org/w/index.php?title=Special:LandingPage&uselang=en&country=CN&utm_medium=Waystogive&utm_source=Waystogive&utm_campaign=C11_Waystogive and discovered that if you select an amount in CNY and then select PayPal, the amount and currency do not change in response to the payment method changing.

Paypal 2.png (257×378 px, 10 KB)

The test donation processed as 100 CNY according to Civi and the TY email, but processed as 100 USD according to PayPal and the tester’s bank.

Below are the transaction details from the tester's CID 26220292
Source CNY 100.00
Received August 18th, 2022 4:04 PM
Net Amount $14.74
Transaction ID BRAINTREE DHJHBNNHY3RPB25FZJEWMXI3OGC
Invoice Reference 127517100.1

Below is the email the tester received from PayPal showing the donation was processed in USD:

PayPal confirm 1.png (582×541 px, 134 KB)

Below is a screenshot of the tester's bank balance showing it was processed in USD:

Screen Shot 2022-08-18 at 1.14.57 PM.png (181×792 px, 30 KB)

A second example. Tester in CID 51202551 used this donation form: https://donate.wikimedia.org/w/index.php?title=Special:LandingPage&uselang=en&country=CN. Selected 20 CNY from the form > PayPal > PayPal receipt shows donation of $20 USD. Civi again shows donation of 20 CNY with a USD equivalent of "$2.95".

test 2.png (143×1 px, 28 KB)

Civi indicates that the donor (CID 35973901) donated via PayPal in both CNY and USD:

screenshot 6.png (148×1 px, 32 KB)

It seems there is an error on the CN form for donations made via PayPal. Is it possible that PayPal has collected donations in USD for donors choosing CNY and we haven't received the full amount?

The Gateway in Civi for these donations also show as "Braintree", rather than "PayPal_EC", so maybe this behavior is caused by an old integration?

braintree.png (218×375 px, 12 KB)

Can we also confirm that refunds performed from the transactions in Civi will return all of the funds to donors?

Event Timeline

I refunded my test donation 127517100.1 and the PayPal console performed the refund in USD

Hi @AMJohnson and @MBeat33, very sorry about this. The donor was routed to the new Braintree form because the current PayPal gateway doesn't have CN as a supported country.

Braintree doesn't support charging in anything except USD yet. We thought it was only available to testers who went directly to the Braintree form, but it looks like we were wrong.

I have disabled Braintree in production for now, so nobody else should get there by mistake. Before we enable it for more testing, I will update the GatewayChooser logic to make sure nobody else gets sent there by mistake.

Also, I will look for other donors who got routed to Braintree and were charged in USD while the form might have shown some other currency.

Many thanks for the context + followup, @Ejegg

Thanks for the quick reply Elliott! No worries from us happy we know the cause. :)

We're trying to figure out which of the donors donations we should refund in PayPal both transactions show as USD in PayPal and only one offers a refund option.

Donor Cid is 35973901, If you look up donor's email in PayPal you will see the two transaction ID's noted below:

PayPal Transaction ID: 48534604KF370972A shows as $100 USD in PayPal and Civi. It appears PayPal will allow us to refund this one as normal.
Paypal Transaction ID: 3WH79498MX067305T show as as $100 USD in Paypal but 100 CNY in Civi. PayPal doesn't offer the ability to refund this transaction and mentions authorization and billing agreement which we don't typically see? (screenshot below)

Paypal auth.png (134×659 px, 19 KB)

I did a search for donations in Civi tagged with gateway braintree and non-USD. These additional CIDs came up:
56622468
56622799
51202551
35973901
54657717
All were CNY charged as USD

Ooh, just saw the difficulty with the refunds. We may need to do the refunds via the new Braintree console. I'll look at that.

Yeah, we can do the refund from braintree console, and at the same time should we update our braintree_gateway/config/currencies.yaml to only USD until multi-currency is enabled? @Ejegg

image.png (574×644 px, 50 KB)
. @MBeat33 I see the transaction in the Braintree console. Shall I refund it? It shows as $100 USD. Which is 678.58 Yen. So we will over refund this person by the looks of it. I don't see the option of a partial refund.

I just refunded the biggest one, at $745.68 for CID 56622468. It showed a success status after the refund, but when I search transactions in the Braintree console it still shows up as Settled.

@Ejegg Can you please let us know when the refund for the donor with cid=3597390, goes through so we can let him know? Thank you!

@Ejegg Can you please let us know when the refund for the donor with cid=3597390, goes through so we can let him know? Thank you!

I believe you mean 35973901 which is 100usd donation at 8/12, I just refund from the braintree console.
Refund Information
Refund Transaction IDhqm70x70
Refund Amount $100.00 USD
Refund StatusSettling
Refund Date08/19/2022 11:57 AM PDT

I just refunded the biggest one, at $745.68 for CID 56622468. It showed a success status after the refund, but when I search transactions in the Braintree console it still shows up as Settled.

Yeah, Braintree use Settled for both donation and refund status, the payment is fully refunded now

Thank you for your help @Ejegg & @AnnWF!

I have one more question for you when you get a chance on a few of those additional CID's you located.

For the following three CID's listed below could you confirm if the donations have been refunded? Only one of the CID's is showing the USD donation refunded in Civi. If not could we issue refunds for these additional CIDs and then our team can reach out to the donors and let them know?

  • CID 56622799 (doesn't show as refunded in civi)
  • CID 35973901 (does show as refunded in civi)
  • CID 54657717 (doesn't show as refunded in civi)

Thanks for your help!

Hey @Ejegg - Just a friendly ping on @AMJohnson's question above as donors are waiting on responses. Thanks!

May I also add a Braintree console refund request for

Transaction ID BRAINTREE DHJHBNNHY3RPB25FZJEWMXI3OGC / Invoice Reference 127517100.1

Thank you!

Should we do full refund for those transactions or partially refund? Please confirm, I can issue the refund from Braintree console then.

For the one I just added, a full refund would be great as it was a test donation.

Looks like someone has just refunded that one @MBeat33. I tried to refund it and got the error 'Refund was declined by the processor' then saw the reason for the decline was 'Already Refunded'.

I guess the lesson is that in the Braintree console it's tricky to see what's been refunded, but if you do try to double-refund something it won't do any harm.

Ahh, perhaps it was refunded via the PayPal console? The refund does not show up anywhere in the Braintree console.

Thank you Elliott and Ann.

I guess the lesson is that in the Braintree console it's tricky to see what's been refunded

Good to know! The console doesn't recognize Braintree Transaction IDs, but checking now it does recognize Invoice Reference #s.

Hi @AMJohnson and @krobinson

CID 56622799 - I just issued a refund now in the Braintree console
CID 35973901 - Refund shows in Braintree console issued on Aug 19th
CID 54657717 - I just issued a refund now in the Braintree console

Unfortunately the Civi records are still a bit of a mess, as most of them have duplicate records - one Braintree/CNY and one PayPal/USD. We'll try to weed out those duplicates too.

OK, I think I have deleted all of the incorrectly-recorded CNY donations from Civi. I double checked that all of the USD amounts for those donations have been refunded and that the refunds made it to Civi.

Thanks so much for your help @Ejegg! Each of the donors in the CID's you identified above have been notified.

Thanks @Ejegg.

Currently if donors select PayPal on the Chinese donation form they see this:

Screenshot 2022-08-29 at 08.19.01.png (1×2 px, 321 KB)

This doesn't feel like an ideal donor experience.

Whilst we don't actively campaign in China, we do receive organic donations year round, and we'll continue to field questions around this.

Can we remove PayPal from the China landing page until we have a long-term fix? cc @Pcoombe / @EMartin / @TSkaff

Also, could payments confirm if this is unique to China, or if the Braintree integration could affect other currencies that we should look at? Thanks!

I've removed PayPal from the China donatewiki form - diff

@krobinson. We don't have multi-curency setup yet with Paypal through Braintree yet. This was enabled in error and shouldn't be the donor experience of other currencies. It has been disabled from recurrence.

@krobinson we CAN add China to the list of supported countries for PayPal, though. I guess fr-tech was under the impression we weren't allowed to raise funds there, but if it's just a case of not campaigning we can easily route organic donors to a form. We would send them to the PayPal Express Checkout form for now, until the Braintree integration has multi-currency support and is better tested.

@EMartin. any objection to turning on CN for the PayPal Express Checkout form?

@Ejegg No objection to enable CN for PP express form.

Change 827613 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Allow PayPal donations from China

https://gerrit.wikimedia.org/r/827613

XenoRyet set Final Story Points to 1.
XenoRyet changed Final Story Points from 1 to 2.

Change 827613 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] GatewayChooser: Route China to PayPal gateways

https://gerrit.wikimedia.org/r/827613

Change 827613 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] GatewayChooser: Route China to PayPal gateways

https://gerrit.wikimedia.org/r/827613