Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Changed RedirectURLs to pointer from slice#4

Merged
pengux merged 1 commit intoleebenson:masterfrom
nazwa:hotfix/urls
Mar 20, 2015
Merged

Changed RedirectURLs to pointer from slice#4
pengux merged 1 commit intoleebenson:masterfrom
nazwa:hotfix/urls

Conversation

@nazwa
Copy link
Contributor

@nazwa nazwa commented Mar 20, 2015

Redirect urls are kept in a single struct, not a slice.

@nazwa
Copy link
Contributor Author

nazwa commented Mar 20, 2015

This is what comes back from a request with a slice:

2015/03/20 10:30:06 POST https://api.sandbox.paypal.com/v1/payments/payment: 400 Incoming JSON request does not map to API request

And response with a pointer:

{
    "intent": "sale",
    "payer": {
        "payment_method": "paypal",
        "payer_info": {
            "shipping_address": {
                "line1": "",
                "city": "",
                "country_code": ""
            }
        }
    },
    "transactions": [
        {
            "amount": {
                "currency": "GBP",
                "total": "10.00",
                "details": {
                    "subtotal": "10.00"
                }
            },
            "description": "Points"
        }
    ],
    "id": "PAY-5GS05962PW1226719KUF6WKA",
    "create_time": "2015-03-20T09:40:56Z",
    "state": "created",
    "update_time": "2015-03-20T09:40:56Z",
    "links": [
        {
            "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-5GS05962PW1226719KUF6WKA",
            "rel": "self",
            "method": "GET",
            "enctype": ""
        },
        {
            "href": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-8J9661131N9664043",
            "rel": "approval_url",
            "method": "REDIRECT",
            "enctype": ""
        },
        {
            "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-5GS05962PW1226719KUF6WKA/execute",
            "rel": "execute",
            "method": "POST",
            "enctype": ""
        }
    ]
}

pengux pushed a commit that referenced this pull request Mar 20, 2015
Changed RedirectURLs to pointer from slice
@pengux pengux merged commit b2645b0 into leebenson:master Mar 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants