@@ -14,7 +14,7 @@ class CompletePurchaseResponseTest extends TestCase
14
14
15
15
private $ token = '' ;
16
16
private $ description = 'Test Transaction long description ' ;
17
- private $ transactionId = 'S4hVo7z6XZQ3yDUyHyUJD7 ' ;
17
+ private $ transactionId = 'someTransactionId ' ;
18
18
private $ transactionReference = 'S4hVo7z6XZQ3yDUyHyUJD7 ' ;
19
19
private $ status = InvoiceStatus::Complete;
20
20
private $ amount = '14.01 ' ;
@@ -41,9 +41,9 @@ public function testSuccess()
41
41
$ invoice = new Invoice ($ this ->amount , $ this ->currency );
42
42
$ invoice ->setFullNotifications (true );
43
43
$ invoice ->setItemDesc ($ this ->description );
44
- $ invoice ->setPosData (json_encode (['posData ' => []]));
44
+ $ invoice ->setPosData (json_encode (['posData ' => [' u ' => $ this -> transactionId ]]));
45
45
$ invoice ->setStatus ($ this ->status );
46
- $ invoice ->setId ($ this ->transactionId );
46
+ $ invoice ->setId ($ this ->transactionReference );
47
47
$ response = new CompletePurchaseResponse ($ this ->request , $ invoice );
48
48
49
49
$ this ->assertTrue ($ response ->isSuccessful ());
@@ -52,7 +52,7 @@ public function testSuccess()
52
52
$ this ->assertSame ($ this ->transactionId , $ response ->getTransactionId ());
53
53
$ this ->assertSame ($ this ->transactionReference , $ response ->getTransactionReference ());
54
54
$ this ->assertSame ('14.01 ' , $ response ->getAmount ());
55
- $ this ->assertStringContainsString ($ this ->transactionId , $ response ->getPayer ());
55
+ $ this ->assertStringContainsString ($ this ->transactionReference , $ response ->getPayer ());
56
56
$ this ->assertSame ($ this ->currency , $ response ->getCurrency ());
57
57
}
58
58
}
0 commit comments