I'm trying to process stripe payments through Apple Pay but keep getting this error:
Error Domain=com.stripe.lib Code=50 "There was an error communicating with your payment backend" UserInfo={NSLocalizedDescription=There was an error communicating with your payment backend}
Checking payments log on Stripe though it is coming back as 200 OK
The payments don't seem to appear on stripe however so I'm wondering why this error comes about. Included my backend PHP below:
<?php
require('../vendor/autoload.php');
\Stripe\Stripe::setApiKey("SECRET KEY");
token ID submitted by the form: $token = $_POST['stripeToken']; $mount
= $_POST['amount'];
if($token == "" || $amount == ""){
echo "No Token or Amount Set" return;
}
$charge = \Stripe\Charge::create(array( "amount" => $amount, "currency" => "gbp", "description" => "Example charge", "source"
=> $token, ));
>
EDIT
After a bit more digging I found that the status code return was 500. How would I go about debugging this? Is this common?