@@ -31,18 +31,36 @@ public function setUp()
3131 $ this ->gateway ->setPassword ('123qweASD/ ' );
3232 }
3333
34+ public function testCompletePurchase ()
35+ {
36+ $ this ->options = [
37+ 'orderId ' => '98976534 ' ,
38+ 'amount ' => "10 " ,
39+ 'currency ' => 'TRY ' ,
40+ 'cavv ' => 'jCm0m+u/0hUfAREHBAMBcfN+pSo= ' ,
41+ 'eci ' => '02 ' ,
42+ 'xid ' => 'RszfrwEYe/8xb7rnrPuh6C9pZSQ= ' ,
43+ 'md ' => 'G1YfkxEZ8Noemg4MRspO20vEiXaEk51APnDVEz+WRaZCdQ8gq+3XJRSTiNWDuZUhrvpkP7r3mk+BGumU6GL2XP/NFyczbI+2dQi8uS/etyI0QcvcFd2NGhLBsDNYfOwILnzLqvoyienmWkZy1a5I/w== ' ,
44+ 'mdStatus ' => '1 ' ,
45+ 'clientIp ' => '10.241.19.2 '
46+ ];
47+
48+ /** @var CompletePurchaseResponse $response */
49+ $ response = $ this ->gateway ->completePurchase ($ this ->options )->send ();
50+ $ this ->assertTrue ($ response ->isSuccessful ());
51+ }
3452
3553 public function testPurchase ()
3654 {
3755 $ this ->options = [
3856 'card ' => $ this ->getCardInfo (),
39- 'orderId ' => '1085204111 ' ,
40- 'amount ' => "3.50 " ,
57+ 'orderId ' => '98976534 ' ,
58+ 'amount ' => "10 " ,
4159 'currency ' => 'TRY ' ,
4260 'returnUrl ' => "https://eticaret.garanti.com.tr/destek/postback.aspx " ,
4361 'cancelUrl ' => "https://eticaret.garanti.com.tr/destek/postback.aspx " ,
4462 'installment ' => "" ,
45- 'paymentMethod ' => '' ,
63+ 'paymentMethod ' => '3d ' ,
4664 'clientIp ' => '10.241.19.2 ' ,
4765 'secureKey ' => '12345678 '
4866 ];
@@ -53,25 +71,6 @@ public function testPurchase()
5371 }
5472
5573
56- public function testCompletePurchase ()
57- {
58- $ this ->options = [
59- 'orderId ' => '424569 ' ,
60- 'amount ' => "3 " ,
61- 'currency ' => 'TRY ' ,
62- 'cavv ' => 'jCm0m+u/0hUfAREHBAMBcfN+pSo= ' ,
63- 'eci ' => '02 ' ,
64- 'xid ' => 'RszfrwEYe/8xb7rnrPuh6C9pZSQ= ' ,
65- 'md ' => 'SbEsOKX7ObDWDySsIxdAWk+S+OBRqtO9JhbzBb2vwcwJ7nw4PmXWPaXT2zLq3Mz4hAI7F3GTIgCh4F8EC2l0LMYOr9yaA8G0yq3hudtek3FZtMRuxD29rUwF3a10zd3fQI/tSTSHkMdiT5kjKRC4Eg== ' ,
66- 'mdStatus ' => '1 ' ,
67- 'clientIp ' => '172.18.0.1 '
68- ];
69-
70- /** @var CompletePurchaseResponse $response */
71- $ response = $ this ->gateway ->completePurchase ($ this ->options )->send ();
72- $ this ->assertTrue ($ response ->isSuccessful ());
73- }
74-
7574 public function testCapture ()
7675 {
7776 $ this ->options = [
0 commit comments