Skip to content
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

InitiateAuthentication returning 502 Bad Gateway for MasterCard requests #50

Open
Rauce opened this issue Jun 9, 2021 · 4 comments
Open

Comments

@Rauce
Copy link

Rauce commented Jun 9, 2021

As part of the InitiateAuthentication step, the SDK posts the following to https://api.globalpay-ecommerce.com/3ds2/authentications

{
    "request_timestamp": "2021-06-08T10:10:10.296390",
    "authentication_source": "BROWSER",
    "authentication_request_type": "PAYMENT_TRANSACTION",
    "message_category": "PAYMENT_AUTHENTICATION",
    "message_version": "2.2.0",
    "server_trans_id": "10a06654-4a02-40bd-801b-b85f25749b1d",
    "merchant_id": "***",
    "account_id": "internet",
    "challenge_request_indicator": "NO_PREFERENCE",
    "challenge_notification_url": "https://www.example.com/3ds2Challenge.ashx",
    "method_url_completion": "YES",
    "merchant_contact_url": "https://www.example.com/support",
    "card_detail": {
        "number": "5434298060861502",
        "scheme": "MC",
        "expiry_month": "01",
        "expiry_year": "24",
        "full_name": "TEST TESTER"
    },
    "order": {
        "amount": "9900",
        "currency": "GBP",
        "id": "4f398f54-ac7b-404a-811a-e11d35a5f4e7",
        "address_match_indicator": "false",
        "date_time_created": "2021-06-08T10:10Z"
    },
    "payer": {
        "email": "test@example.com",
        "billing_address": {
            "line1": "1 Ann Street",
            "line2": "",
            "city": "Belfast",
            "postal_code": "BT1 1AA",
            "country": "826"
        },
        "mobile_phone": {
            "country_code": "44",
            "subscriber_number": "7712322343"
        }
    },
    "browser_data": {
        "accept_header": "*/*",
        "color_depth": "TWENTY_FOUR_BITS",
        "ip": "XX.XX.XX.XX",
        "java_enabled": false,
        "javascript_enabled": false,
        "language": "en-gb",
        "screen_height": 1440,
        "screen_width": 2560,
        "challenge_window_size": "FULL_SCREEN",
        "timezone": "-1",
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15"
    }
}

And gets the following back:

502 Bad Gateway
{
    "error_description": "The Authentication Response is invalid, indicates an error occurred or no response was returned.",
    "error_detail": "The request should be considered as not authenticated."
}

This is happening for ALL MasterCard attempts according to my logs.

It works fine when changing the line "scheme": "MC" to "scheme": "VISA". Although the card number is not a Visa, it at least gets an intelligible response:

{
    "server_trans_id": "10a06654-4a02-40bd-801b-b85f25749b1d",
    "acs_trans_id": "1f8f5814-d31e-4d0c-b46a-a05328ce396c",
    "ds_trans_id": "1f8f5814-d31e-4d0c-b46a-a05328ce396c",
    "acs_rendering_type": {},
    "status": "AUTHENTICATION_FAILED",
    "status_reason": "NO_CARD_RECORD",
    "authentication_source": "BROWSER",
    "message_category": "PAYMENT_AUTHENTICATION",
    "message_version": "2.2.0",
    "acs_reference_number": "VISA.V 17 0003",
    "whitelist_status": "WHITELIST_STATUS_UNKNOWN"
}

Is there something about the request/SDK that needs changed for MasterCard attempts? I've tried many tweaks but always receive the same 502 response.

@rxp-developers
Copy link

rxp-developers commented Jun 9, 2021 via email

@kosnkow
Copy link

kosnkow commented Jun 9, 2021

having the same issue

Status Code: BadGateway - {
"error_description" : "The Authentication Response is invalid, indicates an error occurred or no response was returned.",
"error_detail" : "The request should be considered as not authenticated."
}

@markmcgookin
Copy link

We are seeing this exact same thing, but it's not in the simulator @rxp-developers it's live, we are seeing this in production and it's stopping our master card payments going through 3DS in the LIVE environment.

@gribunin
Copy link

Having the same error (The request should be considered as not authenticated) when trying to make a recurring charge with the previously saved authenticated data and saved card/customer:

                RecurringPaymentMethod card = new RecurringPaymentMethod(priorAuthenticationData.StoredCustomerReference, priorAuthenticationData.StoredCardReference);

                threeDSecureData = Secure3dService.InitiateAuthentication(card, threeDSecureData)
                    .WithCurrency(_currency)
                    .WithAmount(request.Amount)
                    .WithMessageCategory(MessageCategory.PAYMENT_AUTHENTICATION)
                    .WithAuthenticationSource(AuthenticationSource.STORED_RECURRING)
                    .WithMerchantInitiatedRequestType(MerchantInitiatedRequestType.RECURRING_TRANSACTION)
                    .WithOrderCreateDate(DateTime.Now)
                    .WithPriorAuthenticationTransactionId(priorAuthenticationData.AcsTransactionId)
                    .WithPriorAuthenticationMethod((PriorAuthenticationMethod)Enum.Parse(typeof(PriorAuthenticationMethod), priorAuthenticationData.AuthMethod))
                    .WithPriorAuthenticationTimestamp(priorAuthenticationData.TransactionDate)
                    .Execute();

What does that error description means at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants