Skip to content

Commit

Permalink
change: rename ok_txn_amount to ok_txn_gross
Browse files Browse the repository at this point in the history
  • Loading branch information
bladeroot committed Aug 7, 2017
1 parent 7b060c6 commit e88fcfc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Message/CompletePurchaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getTransactionId()

public function getAmount()
{
return floatval($this->data['ok_txn_amount']);
return floatval($this->data['ok_txn_gross']);
}

public function getCurrency()
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/Message/CompletePurchaseRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class CompletePurchaseRequestTest extends TestCase
'ok_txn_payment_type' => 'instant',
'ok_txn_payment_method' => 'OKB',
'ok_txn_gross' => '68.71',
'ok_txn_amount' => 68.71,
'ok_txn_net' => '68.71',
'ok_txn_fee' => '0.00',
'ok_txn_currency' => 'USD',
Expand Down Expand Up @@ -87,7 +86,7 @@ public function testGetData()

$this->assertSame($this->description, $data['ok_item_1_name']);
$this->assertSame($this->transactionId, $data['ok_txn_id']);
$this->assertSame($this->amount, $data['ok_txn_amount']);
$this->assertSame($this->amount, $data['ok_txn_gross']);
$this->assertSame($this->timestamp, $data['ok_txn_datetime']);
$this->assertSame($this->purse, $data['ok_receiver']);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Message/CompletePurchaseResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testSuccess()
$response = new CompletePurchaseResponse($this->request, [
'ok_item_1_name' => $this->description,
'ok_receiver' => $this->purse,
'ok_txn_amount' => $this->amount,
'ok_txn_gross' => $this->amount,
'ok_txn_datetime' => $this->timestamp,
'ok_txn_id' => $this->transactionId,
'ok_txn_status' => $this->status,
Expand Down

0 comments on commit e88fcfc

Please sign in to comment.