gopaycommunity / gopay-java-api

GoPay's JAVA SDK for Payments REST API
MIT License
10 stars 5 forks source link

Missing value "items" in response (standard payment) #4

Closed zarubto4 closed 8 years ago

zarubto4 commented 8 years ago

Sending object connector.createPayment(payment) acording documentation looks like

.
.
   "items":[  
        {  
            "name":"Tier 1 monthly",
            "amount":59900
        }
    ],
.
.

but function return object without items (array), but you have that in documentation.

{
  "id": 3042926640,
  "order_number": "2016-null",
  "state": "CREATED",
  "amount": 59900,
  "currency": "CZK",
  "payer": {
    "payment_instrument": "PAYMENT_CARD",
    "allowed_payment_instruments": [
      "PAYMENT_CARD",
      "PAYSAFECARD",
      "PAYPAL"
    ],
    "default_payment_instrument": "PAYMENT_CARD",
    "contact": {
      "email": "asdas@byuauh.com",
      "phone_number": "78978979879899",
      "city": "Prague",
      "street": "Karlovo Náměstí 17",
      "postal_code": "12000"
    }
  },
  "target": {
    "type": "ACCOUNT",
    "goid": 8449088054
  },
  "lang": "en",
  "gw_url": "https://gw.sandbox.gopay.com/gw/v3/64974739d8980243be65b799d8f81896"
}

fix the code or documentation

FSichinger commented 8 years ago

This behavior is correct, our web service is not supposed to send you back the "items" array.

zarubto4 commented 8 years ago

So fix documentation

FSichinger commented 8 years ago

Documentation at https://doc.gopay.com/en/?shell#standard-payment is correct as well.