Hi. How can we help?

PayPal Payments

03 Jan 2020 in: Troubleshooting

PayPal

If for some reason your are not able to process paypal payments, here are few thing to check:

  1. Make sure your paypal email address is correct (case sensitive).
  2. Make sure your hosting firewall is not blocking access to PayPal IP address.
  3. Take a look at any error logs located in /gateways/paypal/ folder.
  4. For paypal sandbox testing environment, make sure you have two accounts one as seller, and the other as buyer.
  5. Open up /gateways/paypal/ipn.php with any text editor and make sure that line 23 and 24 look like in picture below.

To further debug paypal, you can add custom file log. Same file as in above, this time around line 20 insert piece of code as in below.

      /* only for debuggin purpose. Create logfile.txt and chmot to 0777*/
      ob_start();
      echo '<pre>';
      print_r($_POST);
      echo '</pre>';
      $logInfo = ob_get_contents();
      ob_end_clean();

      $file = fopen('logfile.txt', 'a');
      fwrite($file, $logInfo);
      fclose($file);

Run another transaction and this time check for logfile.txt

Once done debugging, dont forget to remove log piece of code.