Billing with Stripe i have a form and i submit information and place the order following error has occured....
Unexpected error communicating with Stripe. If this problem persists, let us know at [email protected]. (Network error [errno 77]: error setting certificate verify locations: CAfile: C:\xampp\htdocs\PhpProject2\app\Lib\Stripe/../data/ca-certificates.crt CApath: none )
my controller action code
if(!empty($this->request->data)){
$email = $this->request->data['email'];
$credit_card = $this->request->data['card_number'];
$expire_month = $this->request->data['expiration_month'];
$expire_year = $this->request->data['expiration_year'];
$cvc = $this->request->data['cvc'];
//require_once('./lib/Stripe.php');
require_once "./../lib/Stripe.php";
Stripe::setApiKey("sk_test_KEY");
$token = Stripe_Token::create(array(
"card" => array(
"number" => $credit_card,
"exp_month" => $expire_month,
"exp_year" => $expire_year,
"cvc" => $cvc)));
and my view
<?php
echo $this->Form->create(false, array('action' => 'index'));
echo $this->Form->input('email', array('id' => 'email'));
echo $this->Form->input('card_number');
$options = array('1' => 'January', '2' => 'February', '3' => 'March', '4' => 'April',
'5' =>'May', '6' => 'June', '7' => 'July', '8' => 'August', '9' => 'September',
'10' => 'October',
'11' => 'November', '12' => 'December');
$start_year =array('1'=>2013,'2'=>2014,'3'=>2015,'4'=>2016,
'5'=>2017,'6'=>2018,'7'=>2019,'8'=>2020,'9'=>2021);
echo $this->Form->input('expiration_month', array('type' => 'select', 'options' => $options));
echo $this->Form->input('cvc');
echo $this->Form->end('place order', array('controller' => 'stripes', 'action' => 'index'));
?>
any help will appreciated
The customer must use another card or method of payment. processing_error. An error occurred while processing the card. The payment needs to be attempted again. If it still can't be processed, try again later.
card_decline_rate_limit_exceeded. This card has been declined too many times. You can try to charge this card again after 24 hours. We suggest reaching out to your customer to make sure they have entered all of their information correctly and that there are no issues with their card.
Not sure, but your code might be working. The issue is they require encrypted communication accomplished by certificate files which you either haven't set (in the library itself, SDKs often work like this) when using the library or the path is unparseable (mixed forward / and back \ slashes).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With