buckaroo-it / Magento2_GraphQL

Repository containing the Magento 2 GraphQL plugin by Buckaroo
MIT License
1 stars 1 forks source link

buckarooPaymentTransactionStatus #16

Closed raoulguillermo closed 1 year ago

raoulguillermo commented 1 year ago

Hi,

When i run the buckarooPaymentTransactionStatus mutation i get the following message : "The current user cannot perform operations on this order"

Do i have to pass any specific headers to this call? This only happens when placing an order as a loggedin user.

raoulguillermo commented 1 year ago

I found the following : resolve function in ProcessTransactionOutput.php

When dimming line 116 to 120 it seems to work.

    // if ($context->getUserId() !== (int)$order->getCustomerId()) {
    //     throw new GraphQlAuthorizationException(
    //         __('The current user cannot perform operations on this order')
    //     );
    // }
harli91 commented 1 year ago

Hello @raoulguillermo you need the access token generated by generateCustomerToken migration in order to securely access the graphQl data, the generated token is a bearer token so you need a authorization header send with the graphQl request

Buckaroo-Rens commented 1 year ago

Ticket closed.