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 31
31
"psr-4" : { "Omnipay\\ Braintree\\ " : " src/" }
32
32
},
33
33
"require" : {
34
- "omnipay/common" : " ~2.0 " ,
34
+ "omnipay/common" : " ^3 " ,
35
35
"braintree/braintree_php" : " ^2.39|^3.0"
36
36
},
37
37
"require-dev" : {
38
- "omnipay/tests" : " ~2.0 "
38
+ "omnipay/tests" : " ^3 "
39
39
},
40
40
"extra" : {
41
41
"branch-alias" : {
Original file line number Diff line number Diff line change 5
5
use Omnipay \Common \AbstractGateway ;
6
6
use Braintree_Gateway ;
7
7
use Braintree_Configuration ;
8
- use Guzzle \Http \ClientInterface ;
8
+ use Omnipay \ Common \Http \ClientInterface ;
9
9
use Symfony \Component \HttpFoundation \Request as HttpRequest ;
10
10
/**
11
11
* Braintree Gateway
Original file line number Diff line number Diff line change 2
2
3
3
namespace Omnipay \Braintree ;
4
4
5
- use DateTime ;
6
- use DateTimeZone ;
7
5
use Omnipay \Common \Helper ;
8
6
use Symfony \Component \HttpFoundation \ParameterBag ;
9
7
Original file line number Diff line number Diff line change 2
2
3
3
namespace Omnipay \Braintree ;
4
4
5
- use DateTime ;
6
- use DateTimeZone ;
7
5
use Omnipay \Common \Helper ;
8
6
use Symfony \Component \HttpFoundation \ParameterBag ;
9
7
Original file line number Diff line number Diff line change 3
3
namespace Omnipay \Braintree \Message ;
4
4
5
5
use Braintree_Gateway ;
6
- use Guzzle \Http \ClientInterface ;
6
+ use Omnipay \ Common \Http \ClientInterface ;
7
7
use Omnipay \Common \Exception \InvalidRequestException ;
8
8
use Symfony \Component \HttpFoundation \Request as HttpRequest ;
9
9
use Omnipay \Common \Message \AbstractRequest as BaseAbstractRequest ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
namespace Omnipay \Braintree \Message ;
3
3
4
- use Omnipay \Common \Message \ResponseInterface ;
5
-
6
4
/**
7
5
* Authorize Request
8
6
*
Original file line number Diff line number Diff line change 1
1
<?php
2
+
2
3
namespace Omnipay \Braintree \Message ;
3
4
4
5
/**
5
6
* Find Customer Request
6
- *
7
7
* @method CustomerResponse send()
8
8
*/
9
9
class FindCustomerRequest extends AbstractRequest
@@ -16,13 +16,14 @@ public function getData()
16
16
/**
17
17
* Send the request with specified data
18
18
*
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
21
22
*/
22
23
public function sendData ($ data )
23
24
{
24
25
$ response = $ this ->braintree ->customer ()->find ($ this ->getCustomerId ());
25
26
26
27
return $ this ->response = new CustomerResponse ($ this , $ response );
27
28
}
28
- }
29
+ }
Original file line number Diff line number Diff line change 6
6
7
7
/**
8
8
* Update PaymentMethod Request
9
- *
10
9
* @method Response send()
11
10
*/
12
11
class UpdatePaymentMethodRequest extends AbstractRequest
@@ -28,11 +27,12 @@ public function getData()
28
27
* Send the request with specified data
29
28
*
30
29
* @param mixed $data The data to send
30
+ *
31
31
* @return ResponseInterface
32
32
*/
33
33
public function sendData ($ data )
34
34
{
35
- $ response = $ this ->braintree ->paymentMethod ()->update ($ data ['token ' ], $ data[ ' options ' ] );
35
+ $ response = $ this ->braintree ->paymentMethod ()->update ($ data ['token ' ], $ data );
36
36
37
37
return $ this ->createResponse ($ response );
38
38
}
@@ -47,6 +47,16 @@ public function setPaymentMethodToken($value)
47
47
return $ this ->setParameter ('token ' , $ value );
48
48
}
49
49
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
+
50
60
/**
51
61
* @param array $options
52
62
*
You can’t perform that action at this time.
0 commit comments