g2a-official / integration-api-client

PHP client for purchasing products on g2a.com
MIT License
14 stars 5 forks source link

Client error: `POST https://api.g2a.com/v1/order` resulted in a `403 Forbidden` #4

Open m4aax16 opened 4 years ago

m4aax16 commented 4 years ago

Hi, I integrate the official g2a library successfully to my Laravel-Project. Importing the product information to the database worked great. The inventory and prices can be easily compared with my script. But on execute order script I get following error :

g2a_err

`$config = new \G2A\IntegrationApi\Model\Config( env('G2A_EMAIL'), env('G2A_CLIENT_API_URL'), env('G2A_CLIENT_ID'), env('G2A_CLIENT_SECRET') );

$g2aApiClient = new \G2A\IntegrationApi\Client($config);

$request = new G2A\IntegrationApi\Request\OrderAddRequest($g2aApiClient);

    $request
        ->setProductId('10000000788011')
        ->setCurrency('USD')
        ->call();

    return $response = $request->getResponse();`

I already found out from the previous thread that it could be due to the g2a credit. But If I want to add a credit card on G2A Pay as full verified merchant I get this error :

"Something went wrong, please contact with our SupportHub!".

So, what am I doing wrong ?

m4aax16 commented 4 years ago

I get the response with issues, because my credit card wasn't added to my merchant account.