errorBack("We couldn't process your card because it was declined. Your card issuer or bank sent us this message: " . $err["message"] . " That's all we know.");
} catch (\Stripe\Error\RateLimit $e) {
errorBack("We couldn't process your card because things are happening too fast. Please try again in a minute. (Error code: STRIPE_RATELIMIT)");
errorBack("We couldn't process your card because things are happening too fast. Please try again in a minute. Your card was not charged. (Error code: STRIPE_RATELIMIT)");
} catch (\Stripe\Error\InvalidRequest $e) {
errorBack("We couldn't process your card because of a technical issue. Please try again later. (Error code: STRIPE_INVREQ)");
errorBack("We couldn't process your card because of a technical issue. Please try again later. Your card was not charged. (Error code: STRIPE_INVREQ)");
} catch (\Stripe\Error\Authentication $e) {
errorBack("We can't connect to the card processor. Please try again later. (Error code: STRIPE_AUTH)");
errorBack("We can't connect to the card processor. Please try again later. Your card was not charged. (Error code: STRIPE_AUTH)");
} catch (\Stripe\Error\ApiConnection $e) {
errorBack("We can't connect to the card processor. Please try again later. (Error code: STRIPE_NOAPI)");
errorBack("We can't connect to the card processor. Please try again later. Your card was not charged. (Error code: STRIPE_NOAPI)");
} catch (\Stripe\Error\Base $e) {
errorBack("An unknown payment error occurred. Please try again later.");
errorBack("An unknown payment error occurred. Please try again later. Your card was not charged.");
} catch (Exception $e) {
errorBack("An unknown error occurred. Please try again later.");
errorBack("An unknown error occurred. Please try again later. Your card was not charged.");