-
Notifications
You must be signed in to change notification settings - Fork 850
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* renamed NewExample to ExampleTemplate and added comments * added file comments to other examples * renamed stripe_webhook_handler to ThinEventWebhookHandler for clarity * changed verbiage in readme
- Loading branch information
1 parent
a5ee770
commit 2b237f1
Showing
5 changed files
with
68 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/** | ||
* This is a template for defining new examples. It is not intended to be used directly. | ||
* | ||
* <describe what this example does> | ||
* | ||
* In this example, we: | ||
* - <key step 1> | ||
* - <key step 2 | ||
* - ... | ||
* | ||
* <describe assumptions about the user's stripe account, environment, or configuration; | ||
* or things to watch out for when running> | ||
*/ | ||
require 'vendor/autoload.php'; // Make sure to include Composer's autoload file | ||
// Use this require statement to import the SDK from this repo folder | ||
// require '../init.php'; | ||
|
||
class ExampleTemplate | ||
{ | ||
private $apiKey; | ||
|
||
public function __construct($apiKey) | ||
{ | ||
$this->apiKey = $apiKey; | ||
} | ||
|
||
public function doSomethingGreat() | ||
{ | ||
echo "Hello World\n"; | ||
// $client = new \Stripe\StripeClient($this->apiKey); | ||
} | ||
} | ||
|
||
// Usage | ||
$apiKey = '{{API_KEY}}'; | ||
|
||
$example = new ExampleTemplate($apiKey); | ||
$example->doSomethingGreat(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
examples/stripe_webhook_handler.php → examples/ThinEventWebhookHandler.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters