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

500 Internal Server Error #28

Closed
krehak opened this issue May 10, 2018 · 1 comment
Closed

500 Internal Server Error #28

krehak opened this issue May 10, 2018 · 1 comment

Comments

@krehak
Copy link

krehak commented May 10, 2018

I have this code:

$gopay = GoPay\payments(array(
    'goid' => GOPAY_GOID,
    'clientId' => GOPAY_CLIENT_ID,
    'clientSecret' => GOPAY_CLIENT_SECRET,
    'isProductionMode' => false,
    'scope' => TokenScope::ALL,
    'language' => Language::SLOVAK,
    'timeout' => 30,
));

$response = $gopay->createPayment(array(
    'payer' => array(
        'default_payment_instrument' => PaymentInstrument::PAYMENT_CARD,
        'allowed_payment_instruments' => array(PaymentInstrument::PAYMENT_CARD, PaymentInstrument::GOPAY),
        'contact' => ...,
    ),
    'amount' => $total,
    'currency' => Currency::EUROS,
    'order_number' => $orderId,
    'order_description' => $orderName,
    'items' => ...,
    'lang' => 'sk',
    'callback' => array(
        'return_url' => CALLBACK_URL,
        'notification_url' => CALLBACK_URL
    )
));

This is what I get:

GoPay\Http\Response Object
(
    [rawBody:GoPay\Http\Response:private] => Server error: `POST https://gw.sandbox.gopay.com/api/payments/payment` resulted in a `500 Internal Server Error` response:
{"date_issued":"2018-05-10T11:06:52.208+0200","errors":[{"scope":"G","error_code":500}]}

    [statusCode] => 
    [json] => Array
        (
        )

    [status_code] => 500
)

What's wrong? There is nothing in the response telling me what I'm missing.

@gopayprovoz
Copy link
Contributor

Hello,
thank you for your message. Please send us complete dump of your request (without using variables) on e-mail integrace@gopay.cz.
Best regards

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

2 participants