Skip to content

Commit 6e2a435

Browse files
author
Konstantinos Christofilos
committed
Merge branch 'nightly' into subscriptions
2 parents 750da4f + adeb5da commit 6e2a435

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,40 @@ $response = $gateway->purchase([
4848
For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)
4949
repository.
5050

51+
## Driver specific usage
52+
### Create customer
53+
54+
```php
55+
$customer = $gateway->createCustomer([
56+
'customerData' => [
57+
'id' => 1,
58+
'firstName' => 'John',
59+
'lastName' => 'Doe'
60+
]
61+
])->send();
62+
```
63+
You can find full list of options [here](https://developers.braintreepayments.com/reference/request/customer/create/php).
64+
65+
###Find Customer (By id)
66+
67+
```php
68+
$customer = $gateway->findCustomer(1)->send();
69+
```
70+
You can find full list of options [here](https://developers.braintreepayments.com/reference/request/customer/find/php)
71+
72+
###Create subscription
73+
74+
```php
75+
$subscription = $gateway->createSubscription([
76+
'subscriptionData' => [
77+
'paymentMethodToken' => 'payment_method_token',
78+
'planId' => 'weekly',
79+
'price' => '30.00'
80+
]
81+
])->send();
82+
```
83+
You can find full list of options [here](https://developers.braintreepayments.com/reference/request/subscription/create/php)
84+
5185
## Support
5286

5387
If you are having general issues with Omnipay, we suggest posting on

0 commit comments

Comments
 (0)