tradefurniturecompany / site

tradefurniturecompany.co.uk (Magento 2)
https://upwork.com/fl/mage2pro
2 stars 1 forks source link

PayPal responds on `GetExpressCheckoutDetails` with the error 10002 («You do not have permissions to make this API call») #179

Closed dmitrii-fediuk closed 4 years ago

dmitrii-fediuk commented 4 years ago

Similar to https://github.com/tradefurniturecompany/site/issues/18

{
    "errors": [
        {
            "code": "10002",
            "message": "You do not have permissions to make this API call (#10002: Authentication/Authorization Failed)."
        }
    ],
    "Mage2.PRO": {
        "mage2pro/core": "6.7.5",
        "Magento": "2.3.2",
        "PHP": "7.1.32",
        "Referer": "https://www.paypal.com/webapps/hermes?flow=1-P&ulReturn=true&token=EC-60B94231WT913422M&useraction=commit&country.x=GB&locale.x=en_GB",
        "URL": "https://www.tradefurniturecompany.co.uk/paypal/express/return/?token=EC-60B94231WT913422M&PayerID=BP4A7L9XRNAG6"
    },
    "request": {
        "BUTTONSOURCE": "Magento_Cart_Community",
        "METHOD": "GetExpressCheckoutDetails",
        "SUBJECT": "paypal@furnituretrade.co.uk",
        "TOKEN": "EC-60B94231WT913422M",
        "VERSION": "72.0"
    },
    "response": {
        "ACK": "Failure",
        "BUILD": "54737185",
        "CORRELATIONID": "f92198b5bec6d",
        "L_ERRORCODE0": "10002",
        "L_LONGMESSAGE0": "You do not have permissions to make this API call",
        "L_SEVERITYCODE0": "Error",
        "L_SHORTMESSAGE0": "Authentication/Authorization Failed",
        "TIMESTAMP": "2020-07-22T11:24:13Z",
        "VERSION": "72.0"
    }
}
Location:    vendor/magento/module-paypal/Model/Api/Nvp.php:1259
Callee:      df_log_l
*****************1******************
Location:    vendor/magento/module-paypal/Model/Api/Nvp.php:845
Callee:      Magento\Paypal\Model\Api\Nvp::call
*****************2******************
Location:    vendor/magento/module-paypal/Model/Express/Checkout.php:619
Callee:      Magento\Paypal\Model\Api\Nvp::callGetExpressCheckoutDetails
*****************3******************
Location:    vendor/magento/module-paypal/Controller/Express/AbstractExpress/ReturnAction.php:32
Callee:      Magento\Paypal\Model\Express\Checkout::returnFromPaypal
*****************4******************
Location:    vendor/magento/framework/Interception/Interceptor.php:58
Callee:      Magento\Paypal\Controller\Express\AbstractExpress\ReturnAction::execute
*****************5******************
Location:    vendor/magento/framework/Interception/Interceptor.php:138
Callee:      Magento\Paypal\Controller\Express\ReturnAction::___callParent
*****************6******************
Location:    vendor/magento/framework/Interception/Interceptor.php:153
Callee:      Magento\Paypal\Controller\Express\ReturnAction::Magento\Framework\Interception\{closure}
*****************7******************
Location:    generated/code/Magento/Paypal/Controller/Express/ReturnAction/Interceptor.php:26
Callee:      Magento\Paypal\Controller\Express\ReturnAction::___callPlugins
*****************8******************
Location:    vendor/magento/framework/App/Action/Action.php:108
Callee:      Magento\Paypal\Controller\Express\ReturnAction::execute
*****************9******************
Location:    vendor/magento/framework/Interception/Interceptor.php:58
Callee:      Magento\Framework\App\Action\Action::dispatch
*****************10*****************
Location:    vendor/magento/framework/Interception/Interceptor.php:138
Callee:      Magento\Paypal\Controller\Express\ReturnAction::___callParent
*****************11*****************
Location:    vendor/magento/framework/Interception/Interceptor.php:153
Callee:      Magento\Paypal\Controller\Express\ReturnAction::Magento\Framework\Interception\{closure}
*****************12*****************
Location:    generated/code/Magento/Paypal/Controller/Express/ReturnAction/Interceptor.php:39
Callee:      Magento\Paypal\Controller\Express\ReturnAction::___callPlugins
*****************13*****************
Location:    vendor/magento/framework/App/FrontController.php:159
Callee:      Magento\Paypal\Controller\Express\ReturnAction::dispatch
*****************14*****************
Location:    vendor/magento/framework/App/FrontController.php:99
Callee:      Magento\Framework\App\FrontController::processRequest
*****************15*****************
Location:    vendor/magento/framework/Interception/Interceptor.php:58
Callee:      Magento\Framework\App\FrontController::dispatch
*****************16*****************
Location:    vendor/magento/framework/Interception/Interceptor.php:138
Callee:      Magento\Framework\App\FrontController::___callParent
*****************17*****************
Location:    vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:94
Callee:      Magento\Framework\App\FrontController::Magento\Framework\Interception\{closure}
*****************18*****************
Location:    vendor/magento/framework/Interception/Interceptor.php:135
Callee:      Magento\Store\App\FrontController\Plugin\RequestPreprocessor::aroundDispatch
*****************19*****************
Location:    vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:73
Callee:      Magento\Framework\App\FrontController::Magento\Framework\Interception\{closure}
*****************20*****************
Location:    vendor/magento/framework/Interception/Interceptor.php:135
Callee:      Magento\PageCache\Model\App\FrontController\BuiltinPlugin::aroundDispatch
*****************21*****************
Location:    vendor/magento/framework/Interception/Interceptor.php:153
Callee:      Magento\Framework\App\FrontController::Magento\Framework\Interception\{closure}
*****************22*****************
Location:    generated/code/Magento/Framework/App/FrontController/Interceptor.php:26
Callee:      Magento\Framework\App\FrontController::___callPlugins
*****************23*****************
Location:    vendor/magento/framework/App/Http.php:137
Callee:      Magento\Framework\App\FrontController::dispatch
*****************24*****************
Location:    vendor/magento/framework/App/Bootstrap.php:261
Callee:      Magento\Framework\App\Http::launch
*****************25*****************
Location:    pub/index.php:40
Callee:      Magento\Framework\App\Bootstrap::run
dmitrii-fediuk commented 4 years ago

The request part seems to be invalid:

"request": {
    "BUTTONSOURCE": "Magento_Cart_Community",
    "METHOD": "GetExpressCheckoutDetails",
    "SUBJECT": "paypal@furnituretrade.co.uk",
    "TOKEN": "EC-60B94231WT913422M",
    "VERSION": "72.0"
}

The specification says that such request should contain the USER, PWD, and SIGNATURE, and it does not mention the BUTTONSOURCE and SUBJECT fields: developer.paypal.com/docs/archive/express-checkout/integration-jsv4/ec-get-payment-details/#request

dmitrii-fediuk commented 4 years ago

The following configuration fields are empty for the website:

01