Basic Stripe PHP question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am starting to work with Credit card processing and stripe

I am working with their documentation...

https://stripe.com/docs/api#create_charge

The code below will create a charge...

Stripe Basic PHP question:

from the example below... How do I display on the page, the result of the active charge just created in php?

Q: is there some return response variable that I can echo in php?

---

<?php
  require_once('./config.php');

  $token  = $_POST['stripeToken'];

  $customer = \Stripe\Customer::create(array(
      'email' => 'customer@xxxxxxxxxxx <mailto:customer@xxxxxxxxxxx>',
      'card'  => $token
  ));

  $charge = \Stripe\Charge::create(array(
      'customer' => $customer->id,
      'amount'   => 5000,
      'currency' => 'usd'
  ));

  echo ??VAR??? -  ??????? how can I show the return response variable ;
?>


--
Thanks,
Dave - DealTek
dealtek@xxxxxxxxx
[db-17]


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux