Skip to content

Commit

Permalink
Merge pull request #30 from rizdaprasetya/travis-check
Browse files Browse the repository at this point in the history
Merge Travis check
  • Loading branch information
rizdaprasetya authored Jul 20, 2020
2 parents e56c040 + 0356795 commit 0a0198c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
composer.lock
composer.phar
vendor/
vendor/
.idea
2 changes: 1 addition & 1 deletion Midtrans/Snap.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function createTransaction($params)
)
);

if (array_key_exists('item_details', $params)) {
if (isset($params['item_details'])) {
$gross_amount = 0;
foreach ($params['item_details'] as $item) {
$gross_amount += $item['quantity'] * $item['price'];
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "midtrans/midtrans-php",
"description": "PHP Wrapper for Midtrans Payment API.",
"homepage": "https://midtrans.com",
"version": "2.3.0",
"version": "2.3.1",
"type": "library",
"license":"GPL-3.0",
"authors": [
Expand Down
3 changes: 2 additions & 1 deletion tests/MidtransCoreApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ public function testCharge()
$this->assertTrue(in_array('X-Override-Notification: https://example.com', $fields["HTTPHEADER"]));
}

public function testRealConnect()
public function testRealConnectWithInvalidKey()
{
Config::$serverKey = 'invalid-server-key';
$params = array(
'transaction_details' => array(
'order_id' => rand(),
Expand Down

0 comments on commit 0a0198c

Please sign in to comment.