简体   繁体   English

Google Checkout-如何从数组中提取信息

[英]google checkout - how can i extract info from array

I've recently been having issues with google checkout - i believe the customer ip address is no longer being returned in the response. 我最近在Google Checkout上遇到了问题-我相信响应中不再返回客户的IP地址。

However, i'm not sure how to view all parts of the array. 但是,我不确定如何查看数组的所有部分。 How can i capture the array in a string, which i can then email to myself to investgate all values being passed back. 我如何捕获字符串中的数组,然后可以通过电子邮件将其发送给自己,以调查传递回的所有值。

it used to be returned in: $data[$root]['risk-information']['ip-address']['VALUE'] 它曾经在以下位置返回:$ data [$ root] ['risk-information'] ['ip-address'] ['VALUE']

I've tried to var_dump $data and $root but $root gave blank email: 我试图var_dump $ data和$ root,但是$ root给了空白电子邮件:

$to = "*********";
    $from = "*******";
    $subject = "debugging GC";

    $messagecont = var_dump($data);

    $headers  = "From: ".$from."\r\n"; 
    $headers .= "Content-type: text/html\r\n"; 

    $success = mail($to, $subject, $messagecont, $headers); 
$messagecont = serialize($data);

这将以一种您稍后可以反序列化的格式发送回整个数组

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM