@@ -31,17 +31,50 @@ public function setUp()
3131 $ this ->gateway ->setPassword ('123qweASD/ ' );
3232 }
3333
34+
35+ public function testCapture ()
36+ {
37+ $ this ->options = [
38+ 'card ' => $ this ->getCardInfo (),
39+ 'orderId ' => '90082020_324109 ' ,
40+ 'amount ' => "100 " ,
41+ 'currency ' => 'TRY ' ,
42+ 'installment ' => "" ,
43+ 'clientIp ' => '10.241.19.2 '
44+ ];
45+
46+ /** @var CaptureResponse $response */
47+ $ response = $ this ->gateway ->capture ($ this ->options )->send ();
48+ $ this ->assertTrue ($ response ->isSuccessful ());
49+ }
50+
51+ public function testAuthorize ()
52+ {
53+ $ this ->options = [
54+ 'card ' => $ this ->getCardInfo (),
55+ 'orderId ' => '90082020_324109 ' ,
56+ 'amount ' => "100 " ,
57+ 'currency ' => 'TRY ' ,
58+ 'installment ' => "" ,
59+ 'clientIp ' => '10.241.19.2 '
60+ ];
61+
62+ /** @var AuthorizeResponse $response */
63+ $ response = $ this ->gateway ->authorize ($ this ->options )->send ();
64+ $ this ->assertTrue ($ response ->isSuccessful ());
65+ }
66+
3467 public function testPurchase ()
3568 {
3669 $ this ->options = [
3770 'card ' => $ this ->getCardInfo (),
38- 'orderId ' => '43282041_14102 ' ,
71+ 'orderId ' => '89852041_14102 ' ,
3972 'amount ' => "10 " ,
4073 'currency ' => 'TRY ' ,
4174 'returnUrl ' => "https://eticaret.garanti.com.tr/destek/postback.aspx " ,
4275 'cancelUrl ' => "https://eticaret.garanti.com.tr/destek/postback.aspx " ,
4376 'installment ' => "" ,
44- 'paymentMethod ' => '' ,
77+ 'paymentMethod ' => '3d ' ,
4578 'clientIp ' => '10.241.19.2 ' ,
4679 'secureKey ' => '12345678 '
4780 ];
@@ -106,38 +139,6 @@ public function testRefund()
106139 }
107140
108141
109- public function testAuthorize ()
110- {
111- $ this ->options = [
112- 'card ' => $ this ->getCardInfo (),
113- 'orderId ' => '10082020_324109 ' ,
114- 'amount ' => "100 " ,
115- 'currency ' => 'TRY ' ,
116- 'installment ' => "" ,
117- 'clientIp ' => '10.241.19.2 '
118- ];
119-
120- /** @var AuthorizeResponse $response */
121- $ response = $ this ->gateway ->authorize ($ this ->options )->send ();
122- $ this ->assertTrue ($ response ->isSuccessful ());
123- }
124-
125- public function testCapture ()
126- {
127- $ this ->options = [
128- 'card ' => $ this ->getCardInfo (),
129- 'orderId ' => '10082020_324109 ' ,
130- 'amount ' => "100 " ,
131- 'currency ' => 'TRY ' ,
132- 'installment ' => "" ,
133- 'clientIp ' => '10.241.19.2 '
134- ];
135-
136- /** @var CaptureResponse $response */
137- $ response = $ this ->gateway ->capture ($ this ->options )->send ();
138- $ this ->assertTrue ($ response ->isSuccessful ());
139- }
140-
141142 /**
142143 * @return CreditCard
143144 */
0 commit comments