checkout / checkout-magento2-plugin

Checkout.com Magento 2 official extension
MIT License
32 stars 33 forks source link

GrahpQL QuouteId Int Required but String Exists #460

Closed alitopaloglu closed 2 years ago

alitopaloglu commented 3 years ago

When using default graphql to get customer cart id, magento gives you a masked quote id. This plugin checks qoute id if its masked and if yes converts back it to integer for internal use. This is ok.

But,

V3 rest endpoint that handles quote id param is set to integer on interface, but it must be a string.

getter and setters must be same as well.

I have a masked string, got it from default magento graphql but i can not use this masked string as quoteid in plugin v3 interface

Also as an additional issue PaymentResponseInterface expects integer as order_id to return but vendor/checkoutcom/magento2/Model/Api/V3.php which is implementing this interface returns order->getIncrementId() as order_id which is a string, not integer.

I think it must return order->getEntityId() but its deprecated by magento, so interface must be updated to return string as for order->getIncrementId()