Viincenttt / MollieApi

This project allows you to easily add the Mollie payment provider to your application.
MIT License
148 stars 85 forks source link

GiftcardPaymentResponse seems to be missing Details property #279

Closed rbaarda closed 1 year ago

rbaarda commented 1 year ago

It seems that most specific payment response classes have a Details property containing specific information about that type of payment. However in case of GiftcardPaymentResponse these properties seem to be directly located in the specific GiftcardPaymentResponse instead of in a Details property. The giftcard specific properties seem to be always null on my end. My guess is deserializing the response doesn't fill the specific properties.

The documentation at https://docs.mollie.com/reference/v2/payments-api/get-payment#payment-method-specific-response-parameters seems to be suggesting that the giftcard specific properties reside inside a details property.

This is how I try to get the specific information:

var result = await _paymentClient.GetPaymentAsync(paymentId, includeRemainderDetails: true);
if (result is GiftcardPaymentResponse giftCardResult)
{
   // giftCardResult specific properties are null here.
}
Viincenttt commented 1 year ago

Hi @rbaarda ,

Thanks for reporting this issue. I've looked at the Mollie documentation and it was indeed missing the details property. I've added a commit to fix this issue.

Kind regards, Vincent

rbaarda commented 1 year ago

Hi @Viincenttt,

Thank you for looking into this and fixing this. Do you have any idea when the next release will be? And will that contain this change?

Kind regards,

Robert

Viincenttt commented 1 year ago

This is now live in version 2.1.0.15: https://github.com/Viincenttt/MollieApi/releases/tag/2.1.0.15