File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ $customer = $gateway->createCustomer([
62
62
```
63
63
You can find full list of options [ here] ( https://developers.braintreepayments.com/reference/request/customer/create/php ) .
64
64
65
- ###Find Customer (By id)
65
+ ###Find customer (By id)
66
66
67
67
``` php
68
68
$customer = $gateway->findCustomer(1)->send();
@@ -82,6 +82,23 @@ $subscription = $gateway->createSubscription([
82
82
```
83
83
You can find full list of options [ here] ( https://developers.braintreepayments.com/reference/request/subscription/create/php )
84
84
85
+ ###Cancel subscription
86
+
87
+ ``` php
88
+ $subscription = $gateway->cancelSubscription('id')->send();
89
+ ```
90
+ You can find full list of options [ here] ( https://developers.braintreepayments.com/reference/request/subscription/cancel/php )
91
+
92
+ ###Parse webhook notification
93
+
94
+ ``` php
95
+ $notification = $gateway->parseNotification([
96
+ 'bt_signature' => 'signature',
97
+ 'bt_payload' => 'payload'
98
+ ])->send();
99
+ ```
100
+ You can find full list of options [ here] ( https://developers.braintreepayments.com/guides/webhooks/parse/php )
101
+
85
102
## Support
86
103
87
104
If you are having general issues with Omnipay, we suggest posting on
Original file line number Diff line number Diff line change @@ -249,4 +249,19 @@ public function cancelSubscription($subscriptionId)
249
249
{
250
250
return $ this ->createRequest ('\Omnipay\Braintree\Message\CancelSubscriptionRequest ' , array ('id ' => $ subscriptionId ));
251
251
}
252
+
253
+ /**
254
+ * @param array $parameters
255
+ *
256
+ * @return \Braintree_WebhookNotification
257
+ *
258
+ * @throws \Braintree_Exception_InvalidSignature
259
+ */
260
+ public function parseNotification (array $ parameters = array ())
261
+ {
262
+ return \Braintree_WebhookNotification::parse (
263
+ $ parameters ['bt_signature ' ],
264
+ $ parameters ['bt_payload ' ]
265
+ );
266
+ }
252
267
}
You can’t perform that action at this time.
0 commit comments