@@ 31-55 (lines=25) @@ | ||
28 | */ |
|
29 | protected $stub; |
|
30 | ||
31 | public function setUp() |
|
32 | { |
|
33 | parent::setUp(); |
|
34 | ||
35 | $this->stub = new CompletePurchaseRequestStub(); |
|
36 | $stub = $this->stub; |
|
37 | ||
38 | $httpRequest = new HttpRequest([], [ |
|
39 | 'ik_co_id' => $stub->purse, |
|
40 | 'ik_trn_id' => $stub->transactionId, |
|
41 | 'ik_desc' => $stub->description, |
|
42 | 'ik_am' => $stub->amount, |
|
43 | 'ik_cur' => $stub->currency, |
|
44 | 'ik_inv_prc' => $stub->time, |
|
45 | 'ik_sign' => $stub->sign, |
|
46 | 'ik_inv_st' => $stub->state, |
|
47 | ]); |
|
48 | ||
49 | $this->request = new CompletePurchaseRequest($this->getHttpClient(), $httpRequest); |
|
50 | $this->request->initialize([ |
|
51 | 'purse' => $stub->purse, |
|
52 | 'signAlgorithm' => $stub->signAlgorithm, |
|
53 | 'signKey' => $stub->signKey, |
|
54 | ]); |
|
55 | } |
|
56 | ||
57 | public function testGetData() |
|
58 | { |
@@ 30-52 (lines=23) @@ | ||
27 | */ |
|
28 | protected $stub; |
|
29 | ||
30 | public function setUp() |
|
31 | { |
|
32 | parent::setUp(); |
|
33 | ||
34 | $stub = $this->stub = new OldCompletePurchaseRequestStub(); |
|
35 | ||
36 | $httpRequest = new HttpRequest([], [ |
|
37 | 'ik_shop_id' => $stub->purse, |
|
38 | 'ik_payment_id' => $stub->transactionId, |
|
39 | 'ik_payment_desc' => $stub->description, |
|
40 | 'ik_payment_amount' => $stub->amount, |
|
41 | 'ik_payment_timestamp' => $stub->time, |
|
42 | 'ik_sign_hash' => $stub->sign, |
|
43 | 'ik_payment_state' => $stub->state, |
|
44 | ]); |
|
45 | ||
46 | $this->request = new OldCompletePurchaseRequest($this->getHttpClient(), $httpRequest); |
|
47 | $this->request->initialize([ |
|
48 | 'purse' => $stub->purse, |
|
49 | 'signAlgorithm' => $stub->signAlgorithm, |
|
50 | 'signKey' => $stub->signKey, |
|
51 | ]); |
|
52 | } |
|
53 | ||
54 | public function testGetData() |
|
55 | { |