paypalrealex-payments-api

Response from realex: No request type specified


I'd like to make test request for paypal payment with realex.

Request looks like:

curl -X POST \
  https://test.realexpayments.com/epage-remote.cgi \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/xml' \
  -H 'Postman-Token: b83626b9-9472-25d6-cb36-6143a480bf69' \
  -d '<?xml version="1.0" encoding="UTF-8"?><request type="payment-set" timestamp="20180222134621"><merchantid>realexsandbox</merchantid><account>internet</account><orderid>IgGjoyQSRXqRyIvG30S5zQ</orderid><amount currency="EUR">1001</amount><autosettle flag="1"/><sha1hash>1524dcf16adca3af772ff4d6a035dd3789d5a4e9</sha1hash><paymentmethod>paypal</paymentmethod><paymentmethoddetails><ReturnURL>https://www.example.com/success</ReturnURL><CancelURL>https://www.example.com/failure</CancelURL></paymentmethoddetails><sha1hash>2d630f0d401ee62c711db6ab37b79f2ad43f201e</sha1hash></request>'

Body looks fine, possibly endpoint https://test.realexpayments.com/epage-remote.cgi is not the right one, as I always get response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response timestamp="20180223104630">
    <result>503</result>
    <message>No request type specified</message>
</response>

Can anybody help me with that?


Solution

  • Thanks for your question. When testing PayPal please use the following endpoint: https://api.sandbox.realexpayments.com/epage-remote.cgi

    The test.realexpayments endpoint is just for quickly testing card payments when you don't have a Sandbox account.

    Best,

    Seán

    Realex Payments