g2a-official / integration-api-client

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

Help with integration! #1

Closed guillermodoghel closed 5 years ago

guillermodoghel commented 5 years ago

I been doing some integration with G2A apis, and so far its been kind of painful.. Is any other documentation besides of this https://www.g2a.com/integration-api/documentation/export/ ?

There are a few things that I dont get it yet. for example:

-How do I make a reservation over a key until the checkout is complete? -How can I get all prices on a product (Not only the cheapest but the others) -How does exactly the payment works, when I make a call to /order/pay/:id, the payment is automatically done with the cards/founds I have set up on my wallet? -How can I set up a callback url to be informed when the payment is processed and I have my key ready? -How can I sandbox a full payment cycle, I always end up in "Order is not processed yet" status

Thanks in advance <3

g2a-official commented 5 years ago

Hi @guillermodoghel, We don't have other documentation, this is the only one.

Answering your questions:

  1. We don't support custom reservation. While creating new order inventory is reserved for 30 minutes.
  2. API doesn't return auctions but products. The cheapest auction is selected automatically while creating order. Currently you're not able to choose auction.
  3. By default API uses funds on customer wallet in G2A Pay. When the wallet has empty balance API tries to find funds in related credit card.
  4. API doesn't support communication by IPN. You have to use endpoint "Get order details" to check order status. When it is "processing" it means that order has been paid, "complete" keys are available to retrieve.
  5. You're right. We have some bug here. Will be fixed soon.