This module adds GraphQl support to the Ingenico Connect Module for Magento 2.
Please note that this module is currently in 0.x
-release and should
therefor be considered 'unstable'. This does not mean that the module will
not work as expected but that it's public API is not definitive yet.
This module adds an option to GraphQl to generate a consumer session that you can use with the Ingenico mobile and browser SDK's.
This module can be installed using Composer:
composer require ingenico-epayments/connect-extension-magento2-graphql
The following GraphQl query will create a consumer session with Ingenico:
{
ingenicoClientSession {
assetUrl
clientApiUrl
clientSessionId
customerId
invalidTokens
region
}
}
Example response:
{
"data": {
"ingenicoClientSession": {
"assetUrl": "https://assets.pay1.preprod.secured-by-ingenico.com/",
"clientApiUrl": "https://ams1.preprod.api-ingenico.com/client",
"clientSessionId": "ccf8ee1015944ab09e053411e683b43f",
"customerId": "11492-214bf4b4d0db4321a5e006e0ec6f080b",
"invalidTokens": null,
"region": "EU"
}
}
}
If you're making a request for a registered customer in Magento (a customer that is currently logged in), please make sure that you've generated a customer token and included it in the HTTP Headers.