perf: PayPal记录: 显示webhook的账户

webht/payment
Lei OT 12 months ago
parent a53984540c
commit 00299e79d0

@ -206,17 +206,22 @@ class Note_model extends CI_Model {
"pay@trippest.com" => "Trippest", // business":"pay@trippest.com"
"pays@chinahighlights.com" => "", // "CHT",
"paypal@chinahighlights.com" => "2", // "CHT",
"ycc@hainatravel.com" => "dev",
"0" => "unknown",
);
public function set_fundsource(&$ele)
{
$ele->fundsource = "";
$raw = json_decode($ele->pn_memo);
$business = isset($raw->business) ? $raw->business : (isset($raw->receiver_email) ? $raw->receiver_email : '0');
$business = isset($raw->business) ? $raw->business : (isset($raw->receiver_email) ? $raw->receiver_email : '');
$business = (isset($raw->GAI_API->payee) && isset($raw->GAI_API->payee->email_address)) ? $raw->GAI_API->payee->email_address : $business;
$business = $business ? $business : '0';
if ($this->code_fundsource[$business]) {
$ele->fundsource = $this->code_fundsource[$business];
}
if ( ! isset($raw->ipn_track_id) && (isset($raw->id) && strpos($raw->id, "WH-") === 0)) {
$is_webhook = ! isset($raw->ipn_track_id) && (isset($raw->id) && strpos($raw->id, "WH-") === 0);
if ($is_webhook && $business === '0') {
$ele->fundsource = '';
}
$ele->parent_txn_id = isset($raw->parent_txn_id) ? $raw->parent_txn_id : '';

@ -55,6 +55,7 @@
.unknown-color{background-color: dimgray; }
.cht-color {background-color: #A31022;}
.trippest-color {background-color: #E83201;}
.dev-color {background-color: #00A2E8;}
</style>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary trigger_export_btn hidden-xs" data-toggle="modal" data-target="#exampleModal">

Loading…
Cancel
Save