File tree Expand file tree Collapse file tree 8 files changed +21
-16
lines changed Expand file tree Collapse file tree 8 files changed +21
-16
lines changed Original file line number Diff line number Diff line change 3131 "psr-4" : { "Omnipay\\ Braintree\\ " : " src/" }
3232 },
3333 "require" : {
34- "omnipay/common" : " ~2.0 " ,
34+ "omnipay/common" : " ^3 " ,
3535 "braintree/braintree_php" : " ^2.39|^3.0"
3636 },
3737 "require-dev" : {
38- "omnipay/tests" : " ~2.0 "
38+ "omnipay/tests" : " ^3 "
3939 },
4040 "extra" : {
4141 "branch-alias" : {
Original file line number Diff line number Diff line change 55use Omnipay \Common \AbstractGateway ;
66use Braintree_Gateway ;
77use Braintree_Configuration ;
8- use Guzzle \Http \ClientInterface ;
8+ use Omnipay \ Common \Http \ClientInterface ;
99use Symfony \Component \HttpFoundation \Request as HttpRequest ;
1010/**
1111 * Braintree Gateway
Original file line number Diff line number Diff line change 22
33namespace Omnipay \Braintree ;
44
5- use DateTime ;
6- use DateTimeZone ;
75use Omnipay \Common \Helper ;
86use Symfony \Component \HttpFoundation \ParameterBag ;
97
Original file line number Diff line number Diff line change 22
33namespace Omnipay \Braintree ;
44
5- use DateTime ;
6- use DateTimeZone ;
75use Omnipay \Common \Helper ;
86use Symfony \Component \HttpFoundation \ParameterBag ;
97
Original file line number Diff line number Diff line change 33namespace Omnipay \Braintree \Message ;
44
55use Braintree_Gateway ;
6- use Guzzle \Http \ClientInterface ;
6+ use Omnipay \ Common \Http \ClientInterface ;
77use Omnipay \Common \Exception \InvalidRequestException ;
88use Symfony \Component \HttpFoundation \Request as HttpRequest ;
99use Omnipay \Common \Message \AbstractRequest as BaseAbstractRequest ;
Original file line number Diff line number Diff line change 11<?php
22namespace Omnipay \Braintree \Message ;
33
4- use Omnipay \Common \Message \ResponseInterface ;
5-
64/**
75 * Authorize Request
86 *
Original file line number Diff line number Diff line change 11<?php
2+
23namespace Omnipay \Braintree \Message ;
34
45/**
56 * Find Customer Request
6- *
77 * @method CustomerResponse send()
88 */
99class FindCustomerRequest extends AbstractRequest
@@ -16,13 +16,14 @@ public function getData()
1616 /**
1717 * Send the request with specified data
1818 *
19- * @param mixed $data The data to send
20- * @return CustomerResponse
19+ * @param mixed $data
20+ *
21+ * @return \Omnipay\Braintree\Message\CustomerResponse|\Omnipay\Common\Message\ResponseInterface
2122 */
2223 public function sendData ($ data )
2324 {
2425 $ response = $ this ->braintree ->customer ()->find ($ this ->getCustomerId ());
2526
2627 return $ this ->response = new CustomerResponse ($ this , $ response );
2728 }
28- }
29+ }
Original file line number Diff line number Diff line change 66
77/**
88 * Update PaymentMethod Request
9- *
109 * @method Response send()
1110 */
1211class UpdatePaymentMethodRequest extends AbstractRequest
@@ -28,11 +27,12 @@ public function getData()
2827 * Send the request with specified data
2928 *
3029 * @param mixed $data The data to send
30+ *
3131 * @return ResponseInterface
3232 */
3333 public function sendData ($ data )
3434 {
35- $ response = $ this ->braintree ->paymentMethod ()->update ($ data ['token ' ], $ data[ ' options ' ] );
35+ $ response = $ this ->braintree ->paymentMethod ()->update ($ data ['token ' ], $ data );
3636
3737 return $ this ->createResponse ($ response );
3838 }
@@ -47,6 +47,16 @@ public function setPaymentMethodToken($value)
4747 return $ this ->setParameter ('token ' , $ value );
4848 }
4949
50+ /**
51+ * @param $value
52+ *
53+ * @return \Omnipay\Common\Message\AbstractRequest
54+ */
55+ public function setMakeDefault ($ value )
56+ {
57+ return $ this ->setOptions (['makeDefault ' => (bool ) $ value ]);
58+ }
59+
5060 /**
5161 * @param array $options
5262 *
You can’t perform that action at this time.
0 commit comments