Closed SanderVanLeeuwen closed 4 years ago
@MollieRick ?
We could add an include to get the remainderDetails in the same way as from the normal API.
It would be something like v2/payments/tr_xxxxx?include=details.remainderDetails
.
Nice one, I'll put it on our backlog.
I added an include to the Get payment endpoint. You will get the details when you add details.remainderDetails
as value for the include
query parameter.
@sandervanhooft Do you need to change something in the client for this?
I’ll check tomorrow :)
@MollieRick It's missing the remainderDetails
under the gift card specific details.
@willemstuursma In my opinion not necessary since its not there by default. The QR-code is also not there for iDEAL, Bancontact, and Bank transfer.
Hmm I think it would be an improvement - I'll open an issue with the documentation so we can pick it up later.
It seems the client doesn't need modification. I've tested this and it doesn't trow an error:
mollie()->payments->get("tr_UJcqgAjsNc", [
'include' => 'details.remainderDetails',
]);
Note:
xinclude
). The value however does not trigger an error if inexistent/misspelled (i.e. details.remainderDetailsXYZ
). Not sure if this is by design?@sandervanhooft you can create gift card payments in test mode!
@willemstuursma Are you sure? I've enabled a few in the Dashboard, but to no avail.
I'll close this issue. The initial issue is solved :)
👍 Also, the test-gift-cards-issue is not really high priority (not to me anyway).
@sandervanhooft maybe you didn't save the page. It works just fine now.
Thanks for the addition. Is it by any chance possible to include those details directly when calling settlements/*settlementId*/payments
? I'm now performing multiple calls (1. fetch settlement, 2. then settlement payments and then 3. individual payments when the remainderDetails are required) where the third call could be eliminated by including the remainderDetails directly.
I'm already happy with the current changes though, so 'no' is a good enough answer here ;)
When a payment is partially paid with giftcards, the
remainderMethod
specifies the payment method used to pay the remaining amount. However, I can't fetch any additional details about the used method. For example in case of a PayPal transaction, the PayPal reference which is normally accessible throughdetails.paypalReference
.The Mollie dashboard does show some of this information (reference, consumer name / email, etc.) so it must be available somewhere. Could this be provided through the API?
Some background info; for accounting purposes we match the paypalReference in Mollie settlements to the same reference supplied by PayPal in an outpayment. This works fine for normal PayPal transactions, but in this particular case it does not because of the missing details.