Skip to content

Commit

Permalink
Update README (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe authored Apr 4, 2020
1 parent 4768ab4 commit fc7daf4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ If you use Composer, these dependencies should be handled automatically. If you
Simple usage looks like:

```php
\Stripe\Stripe::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
$customer = \Stripe\Customer::create([
$stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
$customer = $stripe->customers->create([
'description' => 'example customer',
'email' => 'email@example.com',
'payment_method' => 'pm_card_visa',
Expand Down Expand Up @@ -125,7 +125,7 @@ end up there instead of `error_log`:
You can access the data from the last API response on any object via `getLastResponse()`.

```php
$customer = \Stripe\Customer::create([
$customer = $stripe->customers->create([
'description' => 'example customer',
]);
echo $customer->getLastResponse()->headers['Request-Id'];
Expand All @@ -149,12 +149,12 @@ one that uses [Stripe Connect][connect], it's also possible to set a
per-request key and/or account:

```php
$customers = \Stripe\Customer::all([],[
$customers = $stripe->customers->all([],[
'api_key' => 'sk_test_...',
'stripe_account' => 'acct_...'
]);

\Stripe\Customer::retrieve("cus_123456789", [
$stripe->customers->retrieve('cus_123456789', [
'api_key' => 'sk_test_...',
'stripe_account' => 'acct_...'
]);
Expand Down

0 comments on commit fc7daf4

Please sign in to comment.