paynl / nodejs-sdk

Pay.nl nodejs sdk
6 stars 7 forks source link

Instore.getTransactionStatus() gives 404 #16

Closed nvanoost closed 4 years ago

nvanoost commented 4 years ago

The Instore.getTransactionStatus() returns an HTML 404 body instead of a proper JSON result. Because of the HTML document, the JSON parser will thrown an error.

Unexpected token < in JSON at position 0

Full response:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Page Not Found</title>

        <!-- Fonts -->
        <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">

        <!-- Styles -->
        <style>
            html, body {
                background-color: #fff;
                color: #636b6f;
                font-family: 'Raleway', sans-serif;
                font-weight: 100;
                height: 100vh;
                margin: 0;
            }

            .full-height {
                height: 100vh;
            }

            .flex-center {
                align-items: center;
                display: flex;
                justify-content: center;
            }

            .position-ref {
                position: relative;
            }

            .content {
                text-align: center;
            }

            .title {
                font-size: 36px;
                padding: 20px;
            }
        </style>
    </head>
    <body>
        <div class="flex-center position-ref full-height">
            <div class="content">
                <div class="title">
                    Sorry, the page you are looking for could not be found.                </div>
            </div>
        </div>
    </body>
</html>

This function is giving this problem for some time, but it was working perfectly.

woutse commented 4 years ago

Thanks for your message! We'll look into it.

woutse commented 4 years ago

I've tested it and seems to work fine on my end. Could you please email me at support@pay.nl then we'll dig deeper into the issue. Add 'webshop' to the subject and it will come straight to me:)