mollie / mollie-api-php

Mollie API client for PHP
http://www.mollie.com
BSD 2-Clause "Simplified" License
552 stars 191 forks source link

Giftcard details missing / overwritten when remainder is paid with Applepay #455

Closed SanderVanLeeuwen closed 4 years ago

SanderVanLeeuwen commented 4 years ago

Not exactly a bug in the PHP SDK, but can't find a (public) bugtracker for API bugs so I'll just leave this here ;)

When the remainder of a giftcard transaction (VVV for example) is paid with Applepay, the payment details are details from the remainder method instead of the original payment method.

For example, payment tr_JpvEeBvazy contains info about the used giftcard (voucher numbers, amounts, remainder details, etc.) in the details as expected. But payment tr_gRpfq5MVCr doesn't contain any details about the primary (giftcard) payment, but provides the remainder details instead.

This seems to work fine for any other remainder payment method, only Applepay is... different ;)

sandervanhooft commented 4 years ago

@willemstuursma (ApplePay)?

SanderVanLeeuwen commented 4 years ago

Any progress on this?

sandervanhooft commented 4 years ago

I’ll set a reminder to ping Willem this Monday

willemstuursma commented 4 years ago

Hi @SanderVanLeeuwen.

When pulling this payment from our API, I see that the remainderMethod is now correctly reported as creditcard and the details of all the gift cards used are present in the details object.

I guess there could be some timing issue. When exactly are you retrieving the details from the API? Is that on the webhook call or at some other point in time?

SanderVanLeeuwen commented 4 years ago

Could it be something PHP client specific after all then? Because a simple call like $client->payments->get('tr_gRpfq5MVCr') consistently gives the wrong result with creditcard details in the details object.

SanderVanLeeuwen commented 4 years ago

But then the curl call curl -X GET https://api.mollie.com/v2/payments/tr_gRpfq5MVCr gives the same incorrect result, so it doesn't seem client specific.

willemstuursma commented 4 years ago

Hi @SanderVanLeeuwen, we've found the problem. It only affected Apple Pay as you noticed.

We'll roll out a fix early this week.

willemstuursma commented 4 years ago

This has been resolved for new payments.

SanderVanLeeuwen commented 4 years ago

Thnx for fixing it. However, is it also possible to fix this for older payments? In our case we use this data to book payments into the correct ledger and, for this specific example, split this payment into the part settled by Mollie and the part settled by the giftcard provider. It would be very nice to properly do so for historical payments, as we now have some inconsistencies in our administration.

willemstuursma commented 4 years ago

@SanderVanLeeuwen, yes we can fix it. Please send a list of tokens to my email willem@mollie.com and I'll make sure it is taken care of next week.

SanderVanLeeuwen commented 4 years ago

Cool! It took me a while reply but just mailed you the faulty transactions. Thanks again for fixing it :)