New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST Credit Cards - Log Adjustment #559

Closed
angelleye opened this Issue Sep 21, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@angelleye
Owner

angelleye commented Sep 21, 2016

It seems I am not seeing any request log in our REST log data..?? For example, here is what I'm seeing after running a transaction that failed:

09-21-2016 @ 15:20:40 - {"name":"VALIDATION_ERROR","details":[{"field":"payer.funding_instruments.credit_card.type","issue":"mc is invalid value. Supported values are VISA, MASTERCARD, AMEX, DISCOVER, MAESTRO, ELO, HIPER, SWITCH, JCB, HIPERCARD"}],"message":"Invalid request - see details","information_link":"https://developer.paypal.com/docs/api/#VALIDATION_ERROR","debug_id":"cacc0e996552f"}

I cannot see the request to verify what value was passed in for the card type, though.

Need to make sure we are logging both the request and the response in our log file. I would like it to look more like what PayPal offers in the developer dashboard...

METADATA

    "url": "/v1/payments/payment",
    "create_time": "2016-09-21T13:26:02Z",
    "additional_properties": {},
    "account_number": "2105816992787780572",
    "client_id": "AT8ML1vE5ek0KqDfSJ_57ZvSA9xCPD6CRBqXqOFLP8r6NPE47E1LH5WSkx1khndHxfPAfg78UvCirCcP",
    "id": "57e28a6a51bd6d5a7fd5407a"
}

---------------------------------

REQUEST

    "body": {
        "intent": "sale",
        "payer": {
            "payment_method": "credit_card",
            "funding_instruments": [
                {
                    "credit_card": {
                        "first_name": "Guy",
                        "last_name": "Gustafson",
                        "expire_month": "03",
                        "number": "xxxxxxxxxxxx1295",
                        "cvv2": "***",
                        "expire_year": 2018,
                        "type": "mc"
                    }
                }
            ]
        },
        "transactions": [
            {
                "item_list": {
                    "items": [
                        {
                            "currency": "USD",
                            "price": "19.95",
                            "name": "Navia (60 Capsules)",
                            "quantity": 1
                        }
                    ]
                },
                "amount": {
                    "currency": "USD",
                    "total": "26.46",
                    "details": {
                        "tax": "1.56",
                        "subtotal": "19.95",
                        "shipping": "4.95"
                    }
                },
                "description": "Payment description",
                "invoice_number": "57e28a699a737"
            }
        ]
    },
    "header": {
        "x-pp-ads-performed": "false",
        "content-length": "530",
        "x-pp-silover": "name=LIVE3.API.1&silo_version=880&app=platformapiserv&TIME=1787486807&HTTP_X_PP_AZ_LOCATOR=",
        "pp_geo_loc": "US",
        "paypal-request-id": "18069654266771641474464360918",
        "accept": "*/*",
        "client-auth": "No cert",
        "authorization": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxksne",
        "host": "api.paypal.com",
        "user-agent": "PayPalSDK/PayPal-PHP-SDK 1.6.4 (platform-ver=5.4.45; bit=64; os=Linux_2.6.32-673.26.1.lve1.4.15.el6.x86_64; machine=x86_64; crypto-lib-ver=1.0.1e-fips; curl=7.38.0)",
        "x-pp-idempotencyid": "880902495b609_1474464362",
        "x-slr-orig-script_uri": "https://api.paypal.com/v1/payments/payment",
        "paypal-partner-attribution-id": "AngellEYE_SP_WooCommerce",
        "x-pp-corrid": "880902495b609",
        "pp_remote_addr": "198.71.234.36",
        "content-type": "application/json",
        "x-pp-slingshot-targetapp": "platformapiserv"
    },
    "additional_properties": {},
    "method": "POST"
}

---------------------------------

RESPONSE

    "status": 400,
    "duration_time": 147,
    "body": {
        "message": "Invalid request. See details.",
        "information_link": "https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR",
        "details": [
            {
                "field": "payer.funding_instruments[0].credit_card.type",
                "issue": "Credit card type must be visa, mastercard, amex, jcb, or discover."
            }
        ],
        "name": "VALIDATION_ERROR",
        "debug_id": "880902495b609"
    },
    "additional_properties": {},
    "header": {
        "Content-Length": "338",
        "Content-Language": "*",
        "CORRELATION-ID": "880902495b609",
        "Date": "Wed, 21 Sep 2016 13:26:02 GMT",
        "Connection": "close",
        "Paypal-Debug-Id": "880902495b609",
        "PROXY_SERVER_INFO": "host=dcg12javapapi7852.dcg12.slc.paypalinc.com;threadId=477",
        "Content-Type": "application/json"
    }
}
Close

@angelleye angelleye added this to the 1.2.5 milestone Sep 21, 2016

@angelleye angelleye modified the milestones: 1.2.5, 1.3.0 Nov 2, 2016

@angelleye

This comment has been minimized.

Show comment
Hide comment
@angelleye

angelleye Nov 16, 2016

Owner

@kcppdevelopers I'm getting a small merge conflict trying to merge this into dev. Please take a look and resolve it for me.

Owner

angelleye commented Nov 16, 2016

@kcppdevelopers I'm getting a small merge conflict trying to merge this into dev. Please take a look and resolve it for me.

@kcppdevelopers

This comment has been minimized.

Show comment
Hide comment
@kcppdevelopers

kcppdevelopers Nov 16, 2016

Collaborator

I have merged into dev branch.

Collaborator

kcppdevelopers commented Nov 16, 2016

I have merged into dev branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment