|
@@ -652,11 +652,17 @@ function __construct(){
|
|
|
// $headerA = curl_getinfo($ch)
|
|
// $headerA = curl_getinfo($ch)
|
|
|
|
|
|
|
|
$a = json_decode($res,true);
|
|
$a = json_decode($res,true);
|
|
|
-
|
|
|
|
|
if(!isset($a['transactions']))
|
|
if(!isset($a['transactions']))
|
|
|
{
|
|
{
|
|
|
return array('g'=>0);exit;
|
|
return array('g'=>0);exit;
|
|
|
}
|
|
}
|
|
|
|
|
+ $tmp_pay_list = [];
|
|
|
|
|
+ foreach ($a['transactions'] as $v){
|
|
|
|
|
+ if(stripos($v['gateway'],'gift_card') === false){
|
|
|
|
|
+ $tmp_pay_list[] = $v;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ $a['transactions'] = $tmp_pay_list;
|
|
|
if(count($a['transactions']) < 2){
|
|
if(count($a['transactions']) < 2){
|
|
|
if($a['transactions'][0]['gateway'] == 'Klarna' ){
|
|
if($a['transactions'][0]['gateway'] == 'Klarna' ){
|
|
|
return array('g'=>1,'d'=>$a['transactions'][0]['payment_id'],'protection_eligibility'=>"");
|
|
return array('g'=>1,'d'=>$a['transactions'][0]['payment_id'],'protection_eligibility'=>"");
|
|
@@ -689,11 +695,6 @@ function __construct(){
|
|
|
return array('g'=>1,'d'=>$end_info['payment_id'],'protection_eligibility'=>"");
|
|
return array('g'=>1,'d'=>$end_info['payment_id'],'protection_eligibility'=>"");
|
|
|
}elseif(stripos($end_info['gateway'],'Airwallex') !== false){
|
|
}elseif(stripos($end_info['gateway'],'Airwallex') !== false){
|
|
|
return array('g'=>1,'d'=>$end_info['payment_id'],'protection_eligibility'=>"");
|
|
return array('g'=>1,'d'=>$end_info['payment_id'],'protection_eligibility'=>"");
|
|
|
- }elseif(stripos($end_info['gateway'],'gift_card') !== false){
|
|
|
|
|
- $tram_list = $a['transactions'];
|
|
|
|
|
- $tram_list = array_reverse($tram_list);
|
|
|
|
|
- $end_info = $tram_list[1];
|
|
|
|
|
- return array('g'=>1,'d'=>$end_info['payment_id'],'protection_eligibility'=>"");
|
|
|
|
|
}
|
|
}
|
|
|
else{
|
|
else{
|
|
|
$a['transactions'] = array_reverse($a['transactions']);
|
|
$a['transactions'] = array_reverse($a['transactions']);
|