0

The Paysafe API was working perfectly fine in localhost, I was able to complete payment to Netbanx. I started to integrate the system on the website. I have a page for billing information, then a page for card payment where I use paysafe.js to create a token.

Then, I use PHP to get response from the server. This works in local. But online, this last part where I try to settle a payment, I get an error 500. I think it could be because the server is not using HTTPS. I want to know if it's possible that the error 500 is coming from the fact we don't have HTTPS or if it's something else?

P.S: It's complicated to access to the server because of bureaucracy, I don't want to make all the process if it's sure it's not that!

Thank you!

P.S.: I also tried using curl instead, and the response was bool(false).

 require_once("config.php");
  use Paysafe\Environment;
  use Paysafe\PaysafeApiClient;
  use Paysafe\CardPaymentService;
  use Paysafe\CardPayments\Authorization;

  $client = new PaysafeApiClient($paysafeApiKeyId, $paysafeApiKeySecret, Environment::TEST, $paysafeAccountNumber);
  $info = new Authorization(array(
     //PAYMENT ARRAY (Getting POST variable from previous page)
  ));

  $response = $client->cardPaymentService()->authorize($info);
  $statut = $response->status;
Regolith
  • 2,944
  • 9
  • 33
  • 50

1 Answers1

0

That Environment::TEST obviously does not match the production environment (or host-name).

Just enable PHP error reporting for your IP only, in order not to possibly leak any details.

Also check the console there (if any), if that host if even authorized to access the API.

I mean, HTTP500 is an error description just alike "it does not work".

Martin Zeitler
  • 1
  • 19
  • 155
  • 216