File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ public function deleteCard($cardId)
77
77
return $ this ->delete ("/payments/cards/ {$ cardId }" );
78
78
}
79
79
80
+ public function getHistoryRefunds ($ id )
81
+ {
82
+ return $ this ->get ("/payments/payment/ {$ id }/refunds " );
83
+ }
84
+
80
85
public function getPaymentInstruments ($ goid , $ currency )
81
86
{
82
87
return $ this ->get ("/eshops/eshop/ {$ goid }/payment-instruments/ {$ currency }" );
Original file line number Diff line number Diff line change 3
3
namespace GoPay ;
4
4
5
5
use PHPUnit \Framework \TestCase ;
6
+ use function PHPUnit \Framework \assertArrayNotHasKey ;
6
7
use function PHPUnit \Framework \assertNotEmpty ;
7
8
use function PHPUnit \Framework \assertArrayHasKey ;
8
9
use function PHPUnit \Framework \assertEquals ;
@@ -41,4 +42,21 @@ public function testRefundPayment()
41
42
42
43
echo print_r ($ response ->json , true );
43
44
}
45
+
46
+ public function testHistoryOfRefunds ()
47
+ {
48
+ {
49
+ $ cardId = 3178283550 ;
50
+
51
+ $ response = $ this ->gopay ->getHistoryRefunds ($ cardId );
52
+ $ responseBody = $ response ->json ;
53
+
54
+ echo print_r ($ responseBody , true );
55
+
56
+ assertNotEmpty ($ responseBody );
57
+ assertArrayNotHasKey ('errors ' , $ responseBody );
58
+
59
+ echo print_r ($ responseBody , true );
60
+ }
61
+ }
44
62
}
You can’t perform that action at this time.
0 commit comments