Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
Add more info about transaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
popiazaza committed Feb 21, 2017
1 parent feeed9f commit 84248cb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions example.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
//Get transaction report id.
$tran_report = $tran->reportID;
if($tran_type == $report_type_want && $tran_report > $last_report){
$tran_reportID = $tran->reportID;
$tran_reportID = $tran->reportID; // 12345678
//Get full report.
$full_report = $wallet->get_report($tran_reportID);
//Get information from transaction.
$tran_amount = $full_report->amount;
$tran_from = $full_report->ref1;
$tran_message = $full_report->personalMessage->value;
echo '['.$tran_reportID.'] '.$tran_amount.'฿ '.$tran_type.' from '.$tran_from.' with message: '.$tran_message.'<br>';
//Ex. [12345678] 1500฿ from 0812345678 with message test
$tran_amount = $full_report->amount; // 1234
$tran_from = $full_report->ref1; // 0812345678
$tran_message = $full_report->personalMessage->value; // message
$tran_date = $full_report->section4->column1->cell1->value; // 31/01/17 23:59
$tran_id = $full_report->section4->column2->cell1->value; // 1234567890
//(Later)Do stuff.
}
}
Expand All @@ -62,6 +62,8 @@
/*
Get lastest transaction report number of 'creditor'
Note: Different transaction type may use different report id group.
ReportID is a unique id for your own account,
but transaction id is the same for both sender and reciver account.
*/
$last_report = $tran->reportID;
break;
Expand Down

0 comments on commit 84248cb

Please sign in to comment.