Skip to content

Commit

Permalink
fixed for 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dgvai committed Apr 22, 2020
1 parent f5a33c8 commit bd7235b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Changelog

Initial Release
## 1.0.2 Minor
- Fixed minor bugs in refund process
- Updated documentation

## 1.0.1 Minor
- Fixed Documentation

## 1.0.0 Initial Release
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,11 @@ Also you can call for Refund Request and check Refund State

public function refund($bankID)
{
/**
* SSLCommerz::refund($bank_trans_id, $amount [,$reason])
*/

$refund = SSLCommerz::refund($bankID,$refund_amount);
$refund = json_decode($refund);

if($refund->status)
{
Expand Down Expand Up @@ -169,7 +172,6 @@ Also you can call for Refund Request and check Refund State
public function check_refund_status($refID)
{
$refund = SSLCommerz::query_refund($refID);
$refund = json_decode($refund);

if($refund->status)
{
Expand Down Expand Up @@ -209,7 +211,6 @@ Also you can query for your Transaction based on the Transaction ID you provided
public function get_transaction_status($trxID)
{
$query = SSLCommerz::query_transaction($trxID);
$query = json_decode($query);

if($query->status)
{
Expand Down
6 changes: 3 additions & 3 deletions src/SSLCommerz.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public static function refund(string $bank_tran_id, $refund_amount, $refund_rema
$answer = ['status' => true, 'refund_state' => $output->status, 'ref_id' => $output->refund_ref_id, 'output' => $output];
}

return json_encode($answer);
return json_decode(json_encode($answer));

}
catch(RequestException $ex)
Expand Down Expand Up @@ -284,7 +284,7 @@ public static function query_refund($ref_id)
$answer = ['status' => true, 'refund_state' => $output->status, 'ref_id' => $output->refund_ref_id, 'output' => $output];
}

return json_encode($answer);
return json_decode(json_encode($answer));

}
catch(RequestException $ex)
Expand Down Expand Up @@ -340,7 +340,7 @@ public static function query_transaction($trxid)
$answer = ['status' => true, 'output' => $output];
}

return json_encode($answer);
return json_decode(json_encode($answer));

}
catch(RequestException $ex)
Expand Down

0 comments on commit bd7235b

Please sign in to comment.