Skip to content

Commit

Permalink
Some base examples added.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterborodatyy committed Apr 2, 2017
1 parent d3b5cc2 commit 74926c0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/charge.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

$mintance = new \Mintance\Mintance('API_KEY');

$mintance->charge(100, [
'currency' => 'USD',
'products' => [
[
'id' => 10,
'quantity' => 2
]
]
]);
5 changes: 5 additions & 0 deletions examples/simple-event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

$mintance = new \Mintance\Mintance('API_KEY');

$mintance->track('Register');
11 changes: 11 additions & 0 deletions examples/track-custom-people-id.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

$people_id = rand(1, 100); // Id from e-commerce site.

$mintance = new \Mintance\Mintance('API_KEY');

$mintance->people->setIdentifier($people_id);

$mintance->track('Add to Cart', [
'product_id' => 1
]);

0 comments on commit 74926c0

Please sign in to comment.