php - Cant create customer in Stripe after getting token -


after following "using checkout , php" documentation line line have working except last part.

my code reads

<?php require_once('config.php');  $token  = $_post['stripetoken'];  $customer = \stripe\customer::create(array(   'email' => 'customer@example.com',   'source'  => $token ));  echo '<h1>successfully charged $50.00!</h1>'; ?> 

everything works great can var_dump on token , see working fine, issue customer array. have tried using stripe_customer instead of \stripe\customer still isn't working.

a few things might have note downloaded files manually , i'm using mamp dont think thats problem i'm able receive tokens, stops working add customer array.

here config.php file

<?php require_once('../stripe/init.php');  $stripe = array(  "secret_key"      => "test",  "publishable_key" => test" );  \stripe\stripe::setapikey($stripe['secret_key']); ?> 

figured out, tls update problem. after updating mamp worked.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -