Skip to content

Commit

Permalink
Fix JSON does not parse correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
nurasto committed Feb 6, 2018
1 parent ab35d80 commit 15fbdf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Veritrans/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Veritrans_Notification {

public function __construct($input_source = "php://input")
{
$raw_notification = json_decode(file_get_contents($input_source), true);
$raw_notification = json_decode(stripslashes(trim(file_get_contents($input_source), '"')), true);
$status_response = Veritrans_Transaction::status($raw_notification['transaction_id']);
$this->response = $status_response;
}
Expand Down

4 comments on commit 15fbdf3

@PandhuWibowo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ini ngubah di package nya beneran?

@nurasto
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package apa?

@IndraSubroto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manambahkan sintaks nya dimana kak? apakah di Controllernya atau dimananya?

@nurasto
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IndraSubroto ubahnya di dalam package nya. Dulu saya nggak PR karena mungkin ini hanya masalah lokal saja.

Sepertinya midtrans ada repo baru, yang ini udah di archive. Cek yang baru saja di https://github.com/Midtrans/midtrans-php

Please sign in to comment.