mollie / magento2

Mollie Payments for Magento 2
https://www.mollie.com
Other
101 stars 53 forks source link

Payement fees are not present in GraphQL API #546

Closed vberthet closed 2 years ago

vberthet commented 2 years ago

Describe the new feature

Payement fees are not present in GraphQL API. GraphQL based checkout ( Like https://github.com/hyva-themes/magento2-react-checkout) cannot be aware of payment fees applied.

Describe the solution to be implemented

Export extensions attributes defined on CartInterface on CartPrices GraphQL type:

type CartPrices  @doc(description: "Contains details about the final price of items in the cart, including discount and tax information.") {
    mollie_payment_fee: MolliePaymentFee
}

type MolliePaymentFee 
{
    mollie_payment_fee: Money  @doc(description: "Mollie payment fee")
    base_mollie_payment_fee: Money  @doc(description: "Base mollie payment fee")
    mollie_payment_fee_tax: Money  @doc(description: "Mollie payment fee tax")
    base_mollie_payment_fee_tax: Money  @doc(description: "Base mollie payment fee tax")
}

Export fees configuration on MolliePaymentMethodMeta GraphQL type:

type MolliePaymentMethodMeta  @doc(description: "Contains mollie details about the Payment method.") {
    payement_fee: MolliePaymentFee  @doc(description: "Mollie payment fee")
}

Would also be great to have the ability to display fee calculation to customer by either:

Frank-Magmodules commented 2 years ago

HI @vberthet , thank you for opening this feature request! It's strange that this is not directly implemented right away in the Magento GraphQL scheme as it seems to be present in REST. We will take a look into this feature request and come back to you on this as soon as we can.

Frank-Magmodules commented 2 years ago

HI @vberthet ,

Good news; we've finished the implementation and this will be there in the next release!

Frank-Magmodules commented 2 years ago

HI @vberthet ,

We are happy to share that we've just released the new 2.16.0 version where we have added the Mollie payment fee to the GraphQL Cart Query. Thank you for opening this request and for the detailed issue report. We are closing this issue now but please feel free to reopen the issue if you need any help on this.