隐藏

paypal IPN and PDT

发布:2016/12/23 1:11:39作者:管理员 来源:本站 浏览次数:1623

paypal IPN and PDT 相关文档说明:

https://developer.paypal.com/docs/classic/ipn/gs_IPN/

https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNTesting/

https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNPDTAnAlternativetoIPN/

https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/

中文介绍:

http://ppdev.ebay.cn/files/developer/PayPal_PDT_Token_CHN.pdf

http://wenku.baidu.com/link?url=Fgv-l09iCnGQGDuMgdTT94c8YiwuqLEB5qT8tfzBseRdlGICHXsD00N_Zx9q5vbFdydQPXlQFRssgI65ac_4g0RzBHygsWU8V7f5cKjo8AW


PDT:Auto Return for Website Payments brings your buyers back to your website immediately after payment completion. Auto Return applies to PayPal Website Payments, including Buy Now, Subscriptions, and Shopping Cart. Learn More。

如果是网站按钮方式付款,PDT通知的url也可以用表单的return值设置,会被按钮设置中第三部设置的成功返回的url覆盖。


IPN:Instant Payment Notification (IPN)

You have turned on the IPN feature. You can view your IPNs on the IPN History page. If necessary, you can resend IPN messages from that page. For more information on using and troubleshooting this feature, read more about Instant Payment Notification (IPN).

Your listener must respond to every IPN message it gets, whether you take action on it or not. If you do not respond, PayPal assumes the IPN was not received and re-sends it. Further, PayPal continues to re-send the message periodically until your listener responds, although the interval between retries increases with each attempt. An IPN will be resent for up to four days, with a maximum of 15 retries.

IPN可以通过模拟器触发,针对网站按钮方式付款,可以被表单的notify_url覆盖。



处理PDT关键是获取 PayPal 交易流水号 tx , 另外需要token。如果是IPN 和 PDT 是互补的关系,IPN优点:可以获取各种通知,会重发,The maximum number of retries is 15。缺点:异步,延迟。PDT实时,但是只能获取付款完成的通知。


测试方法:

PHP程序测试,使用paypal的sanbox环境测试。

安装php


安装curl

wget http://curl.haxx.se/download/curl-7.39.0.zip
unzip curl-7.39.0.zip
cd curl-7.39.0
configure
make
make install


安装curl扩展

../../../php/bin/phpize

./configure  --with-php-config=../../../php/bin/php-config
make
make install

生成 /home/pig/php/lib/php/extensions/no-debug-non-zts-20131226/curl.so

复制,修改php.ini

cp /home/pig/php-5.6.3/php.ini-development /home/pig/php/lib/php.ini

extension=curl.so


测试curl扩展安装是否成功
/home/pig/php/bin/php -r "var_dump(curl_init());"
resource(4) of type (curl)


安装openssl扩展,否则fopensocket不支持ssl

cd php-5.6.3/ext/openssl/
mv config0.m4 config.m4
/home/pig/php/bin/phpize
./configure --with-php-config=/home/pig/php/bin/php-config
make
make install

修改php.ini, 加上extension=openssl.so


检查openssl扩展是否装好:

/home/dog/php/bin/php -r 'var_dump(fsockopen("tls://www.sandbox.paypal.com", 443, $errno, $errstr, 30));'
resource(4) of type (stream)


启动server:

/home/pig/php/bin/php -S 0.0.0.0:5000 -t ./


配置nginx:

         location ^~ /paytest/ {
             proxy_pass_header Server;
             proxy_set_header Host $http_host;
             proxy_redirect off;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Scheme $scheme;
             proxy_pass http://localhost:5000;
         }

-----------------------------------------------------------------------------------------------------------------------------------------------------------


运用paypal的sandbox环境测试paypent,测试IPN和PDT,思路是写一个程序部署到外网环境,把请求的参数全部记录到日志里面,然后过程一目了然。


  1. <?php  
  2. error_reporting(7);  
  3. ini_set("display_errors", 1);  
  4. date_default_timezone_set('PRC');  
  5.   
  6. define("DEBUG", 1);  
  7. define("USE_SANDBOX", 1);  
  8. define("LOG_FILE""./ipn.log");  
  9.   
  10. $act$_REQUEST['act'];  
  11.   
  12. if($act== 'ok'){  
  13.     p('ok');  
  14.     if(isset($_GET['tx'])){  
  15.       $tx = $_GET['tx'];  
  16.       $data= get_payment_data($tx);  
  17.        p('pdt'$data);  
  18.     }  
  19. }  
  20.   
  21. elseif($act== 'err'){  
  22.     p('err');  
  23. }  
  24.   
  25. elseif($act== 'ipn'){  
  26.     p('ipn');  
  27.     header('HTTP/1.1 200 OK');   
  28.     // Read POST data  
  29.     // reading posted data directly from $_POST causes serialization  
  30.     // issues with array data in POST. Reading raw POST data from input stream instead.  
  31.     $raw_post_data = file_get_contents('php://input');  
  32.     $raw_post_array = explode('&'$raw_post_data);  
  33.     $myPost = array();  
  34.     foreach ($raw_post_array as $keyval) {  
  35.         $keyval = explode ('='$keyval);  
  36.         if (count($keyval) == 2)  
  37.             $myPost[$keyval[0]] = urldecode($keyval[1]);  
  38.     }  
  39.     // read the post from PayPal system and add 'cmd'  
  40.     $req = 'cmd=_notify-validate';  
  41.     if(function_exists('get_magic_quotes_gpc')) {  
  42.         $get_magic_quotes_exists = true;  
  43.     }  
  44.     foreach ($myPost as $key => $value) {  
  45.         if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {  
  46.             $value = urlencode(stripslashes($value));  
  47.         } else {  
  48.             $value = urlencode($value);  
  49.         }  
  50.         $req .= "&$key=$value";  
  51.     }  
  52.   
  53.     // Post IPN data back to PayPal to validate the IPN data is genuine  
  54.     // Without this step anyone can fake IPN data  
  55.   
  56.     if(USE_SANDBOX == true) {  
  57.         $paypal_url = "https://www.sandbox.paypal.com/cgi-bin/webscr";  
  58.     } else {  
  59.         $paypal_url = "https://www.paypal.com/cgi-bin/webscr";  
  60.     }  
  61.   
  62.     $ch = curl_init($paypal_url);  
  63.     if ($ch == FALSE) {  
  64.         return FALSE;  
  65.     }  
  66.   
  67.     curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);  
  68.     curl_setopt($ch, CURLOPT_POST, 1);  
  69.     curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);  
  70.     curl_setopt($ch, CURLOPT_POSTFIELDS, $req);  
  71.     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);  
  72.     curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);  
  73.     curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);  
  74.   
  75.     if(DEBUG == true) {  
  76.         curl_setopt($ch, CURLOPT_HEADER, 1);  
  77.         curl_setopt($ch, CURLINFO_HEADER_OUT, 1);  
  78.     }  
  79.   
  80.     // CONFIG: Optional proxy configuration  
  81.     //curl_setopt($ch, CURLOPT_PROXY, $proxy);  
  82.     //curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);  
  83.   
  84.     // Set TCP timeout to 30 seconds  
  85.     curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);  
  86.     curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));  
  87.   
  88.     // CONFIG: Please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path  
  89.     // of the certificate as shown below. Ensure the file is readable by the webserver.  
  90.     // This is mandatory for some environments.  
  91.   
  92.     //$cert = __DIR__ . "./cacert.pem";  
  93.     //curl_setopt($ch, CURLOPT_CAINFO, $cert);  
  94.   
  95.     $res = curl_exec($ch);  
  96.     if (curl_errno($ch) != 0) // cURL error  
  97.         {  
  98.         if(DEBUG == true) {      
  99.             error_log(date('[Y-m-d H:i e] '). "Can't connect to PayPal to validate IPN message: " . curl_error($ch) . PHP_EOL, 3, LOG_FILE);  
  100.         }  
  101.         curl_close($ch);  
  102.         exit;  
  103.   
  104.     } else {  
  105.             // Log the entire HTTP response if debug is switched on.  
  106.             if(DEBUG == true) {  
  107.                 error_log(date('[Y-m-d H:i e] '). "HTTP request of validation request:". curl_getinfo($ch, CURLINFO_HEADER_OUT) ." for IPN payload: $req" . PHP_EOL, 3, LOG_FILE);  
  108.                 error_log(date('[Y-m-d H:i e] '). "HTTP response of validation request: $res" . PHP_EOL, 3, LOG_FILE);  
  109.             }  
  110.             curl_close($ch);  
  111.     }  
  112.   
  113.     // Inspect IPN validation result and act accordingly  
  114.   
  115.     // Split response headers and payload, a better way for strcmp  
  116.     $tokens = explode("\r\n\r\n", trim($res));  
  117.     $res = trim(end($tokens));  
  118.   
  119.     if (strcmp ($res"VERIFIED") == 0) {  
  120.         // check whether the payment_status is Completed  
  121.         // check that txn_id has not been previously processed  
  122.         // check that receiver_email is your PayPal email  
  123.         // check that payment_amount/payment_currency are correct  
  124.         // process payment and mark item as paid.  
  125.   
  126.         // assign posted variables to local variables  
  127.         //$item_name = $_POST['item_name'];  
  128.         //$item_number = $_POST['item_number'];  
  129.         //$payment_status = $_POST['payment_status'];  
  130.         //$payment_amount = $_POST['mc_gross'];  
  131.         //$payment_currency = $_POST['mc_currency'];  
  132.         //$txn_id = $_POST['txn_id'];  
  133.         //$receiver_email = $_POST['receiver_email'];  
  134.         //$payer_email = $_POST['payer_email'];  
  135.           
  136.         if(DEBUG == true) {  
  137.             error_log(date('[Y-m-d H:i e] '). "Verified IPN: $req ". PHP_EOL, 3, LOG_FILE);  
  138.         }  
  139.     } else if (strcmp ($res"INVALID") == 0) {  
  140.         // log for manual investigation  
  141.         // Add business logic here which deals with invalid IPN messages  
  142.         if(DEBUG == true) {  
  143.             error_log(date('[Y-m-d H:i e] '). "Invalid IPN: $req" . PHP_EOL, 3, LOG_FILE);  
  144.         }  
  145.     }  
  146. }  
  147.   
  148. elseif($act== 'return'){  
  149.     p('return');  
  150. }  
  151.   
  152. else{  
  153.   
  154. print <<<EOT  
  155. <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">  
  156. <input type="hidden" name="cmd" value="_s-xclick">  
  157. <input type="hidden" name="hosted_button_id" value="PVL538Z86ED9N">  
  158. <input type="hidden" name="uid" value="678">  
  159. <input type="image" src="https://www.sandbox.paypal.com/en_US/C2/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">  
  160. <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">  
  161. </form>  
  162.   
  163.   
  164. EOT;  
  165. }  
  166.   
  167.   
  168. function p($name$var= null){  
  169.     $tdate('Y-m-d H:i:s');  
  170.     $name$name.".txt";  
  171.     if($var== null){  
  172.         file_put_contents($name, var_export($_REQUEST, true)."\n".$t."\n\n\n", FILE_APPEND);  
  173.     }else{  
  174.         file_put_contents($name, var_export($var, true)."\n".$t."\n\n\n", FILE_APPEND);  
  175.     }  
  176. }  
  177.   
  178. /** 
  179.  * Get PayPal Payment Data 
  180.  * Read more at http://ethanblog.com/tech/webdev/php-for-paypal-payment-data-transfer.html 
  181.  * @param   $tx Transaction ID 
  182.  * @return      PayPal Payment Data or FALSE 
  183.  */  
  184. function get_payment_data($tx)  
  185. {  
  186.     // PDT Identity Token  
  187.     $at_token = 'cwO4mbBZybR0-fbijkszjeoeTxe9XB16HjuvvdbmDIBOTTxuNxDBzKwBpp8';  
  188.   
  189.     // Init cURL  
  190.     $request = curl_init();  
  191.   
  192.     // Set request options  
  193.     curl_setopt_array($requestarray  
  194.         (  
  195.             CURLOPT_URL => 'https://www.sandbox.paypal.com/cgi-bin/webscr',  
  196.             CURLOPT_POST => TRUE,  
  197.             CURLOPT_POSTFIELDS => http_build_query(array  
  198.                 (  
  199.                     'cmd' => '_notify-synch',  
  200.                     'tx' => $tx,  
  201.                     'at' => $at_token,  
  202.                     )),  
  203.             CURLOPT_RETURNTRANSFER => TRUE,  
  204.             CURLOPT_HEADER => FALSE//,  
  205.             // CURLOPT_SSL_VERIFYPEER => TRUE,  
  206.             // CURLOPT_CAINFO => 'cacert.pem',  
  207.             ));  
  208.   
  209.     // Execute request and get response and status code  
  210.     $response = curl_exec($request);  
  211.     $status   = curl_getinfo($request, CURLINFO_HTTP_CODE);  
  212.   
  213.     // Close connection  
  214.     curl_close($request);  
  215.   
  216.     // Validate response  
  217.     if($status == 200 AND strpos($response'SUCCESS') === 0)  
  218.     {  
  219.         // Remove SUCCESS part (7 characters long)  
  220.         $response = substr($response, 7);  
  221.   
  222.         // Urldecode it  
  223.         $response = urldecode($response);  
  224.   
  225.         // Turn it into associative array  
  226.         preg_match_all('/^([^=\r\n]++)=(.*+)/m'$response$m, PREG_PATTERN_ORDER);  
  227.         $response = array_combine($m[1], $m[2]);  
  228.   
  229.         // Fix character encoding if needed  
  230.         if(isset($response['charset']) AND strtoupper($response['charset']) !== 'UTF-8')  
  231.         {  
  232.             foreach($response as $key => &$value)  
  233.             {  
  234.                 $value = iconv($response['charset'], 'UTF-8'$value);  
  235.             }  
  236.   
  237.             $response['charset_original'] = $response['charset'];  
  238.             $response['charset'] = 'UTF-8';  
  239.         }  
  240.   
  241.         // Sort on keys  
  242.         ksort($response);  
  243.   
  244.         // Done!  
  245.         return $response;  
  246.     }  
  247.   
  248.     return FALSE;  
  249. }  


输出如下:

[pig@ip-10-236-139-149 paytest]$ cat ok.txt
array (
  'act' => 'ok',
  'tx' => '8NG39315CL727724E',
  'st' => 'Completed',
  'amt' => '55.90',
  'cc' => 'USD',
  'cm' => '',
  'item_number' => '',
)
2014-12-06 20:41:43


[pig@ip-10-236-139-149 paytest]$ cat pdt.txt
array (
  'address_city' => 'Shanghai',
  'address_country' => 'China',
  'address_country_code' => 'CN',
  'address_name' => 'Buyer Test',
  'address_state' => 'Shanghai',
  'address_status' => 'unconfirmed',
  'address_street' => 'NO 1 Nan Jin Road',
  'address_zip' => '200000',
  'btn_id' => '3042078',
  'business' => 'xxx.2013.03-facilitator@gmail.com',
  'charset' => 'UTF-8',
  'charset_original' => 'gb2312',
  'custom' => '',
  'discount' => '0.00',
  'first_name' => 'Test',
  'handling_amount' => '0.00',
  'insurance_amount' => '0.00',
  'item_name' => 'sandbox_item111',
  'item_number' => '',
  'last_name' => 'Buyer',
  'mc_currency' => 'USD',
  'mc_fee' => '2.20',
  'mc_gross' => '55.90',
  'payer_email' => 'xxx2013.03-buyer@gmail.com',
  'payer_id' => 'JARYJK2TES6C6',
  'payer_status' => 'unverified',
  'payment_date' => '04:26:00 Dec 06, 2014 PST',
  'payment_fee' => '2.20',
  'payment_gross' => '55.90',
  'payment_status' => 'Completed',
  'payment_type' => 'instant',
  'protection_eligibility' => 'Eligible',
  'quantity' => '1',
  'receiver_email' => 'yxw.2013.03-facilitator@gmail.com',
  'receiver_id' => '2XP27KEMUVN8A',
  'residence_country' => 'CN',
  'shipping' => '10.00',
  'shipping_discount' => '0.00',
  'shipping_method' => 'Default',
  'tax' => '0.90',
  'transaction_subject' => '',
  'txn_id' => '8NG39315CL727724E',
  'txn_type' => 'web_accept',
)
2014-12-06 20:41:44



[pig@ip-10-236-139-149 paytest]$ cat ipn.txt
array (
  'act' => 'ipn',
  'mc_gross' => '55.90',
  'protection_eligibility' => 'Eligible',
  'address_status' => 'unconfirmed',
  'payer_id' => 'JARYJK2TES6C6',
  'tax' => '0.90',
  'address_street' => 'NO 1 Nan Jin Road',
  'payment_date' => '04:49:05 Dec 06, 2014 PST',
  'payment_status' => 'Completed',
  'charset' => 'gb2312',
  'address_zip' => '200000',
  'first_name' => 'Test',
  'mc_fee' => '2.20',
  'address_country_code' => 'CN',
  'address_name' => 'Buyer Test',
  'notify_version' => '3.8',
  'custom' => '',
  'payer_status' => 'unverified',
  'business' => 'yxw.2013.03-facilitator@gmail.com',
  'address_country' => 'China',
  'address_city' => 'Shanghai',
  'quantity' => '1',
  'verify_sign' => 'A7SNeSYl88fJlq0RDkCQ4EljfLsAAMJ6OYFDH1nYVB0-NYyynmZyPh.1',
  'payer_email' => 'xxx.2013.03-buyer@gmail.com',
  'txn_id' => '61P15910PR196164M',
  'payment_type' => 'instant',
  'btn_id' => '3042078',
  'last_name' => 'Buyer',
  'address_state' => 'Shanghai',
  'receiver_email' => 'xxx2013.03-facilitator@gmail.com',
  'payment_fee' => '2.20',
  'shipping_discount' => '0.00',
  'insurance_amount' => '0.00',
  'receiver_id' => '2XP27KEMUVN8A',
  'txn_type' => 'web_accept',
  'item_name' => 'sandbox_item111',
  'discount' => '0.00',
  'mc_currency' => 'USD',
  'item_number' => '',
  'residence_country' => 'CN',
  'test_ipn' => '1',
  'shipping_method' => 'Default',
  'handling_amount' => '0.00',
  'transaction_subject' => '',
  'payment_gross' => '55.90',
  'shipping' => '10.00',
  'ipn_track_id' => '755ef8ff304e1',
)
2014-12-06 20:49:16


[pig@ip-10-236-139-149 paytest]$ cat ipn.log
[2014-12-06 22:21 PRC] HTTP request of validation request:POST /cgi-bin/webscr HTTP/1.1
Host: www.sandbox.paypal.com
Accept: */*
Connection: Close
Content-Length: 1089
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue

 for IPN payload: cmd=_notify-validate&mc_gross=55.90&protection_eligibility=Eligible&address_status=unconfirmed&payer_id=JARYJK2TES6C6&tax=0.90&address_street=NO+1+Nan+Jin+Road&payment_date=06%3A21%3A54+Dec+06%2C+2014+PST&payment_status=Completed&charset=gb2312&address_zip=200000&first_name=Test&mc_fee=2.20&address_country_code=CN&address_name=Buyer+Test&notify_version=3.8&custom=&payer_status=unverified&business=yxw.2013.03-facilitator%40gmail.com&address_country=China&address_city=Shanghai&quantity=1&verify_sign=AUaxvSojqajxsiGA9qXfGuCulUctAIsI7u6BJGTRbntLsB6UI3lGIXb0&payer_email=yxw.2013.03-buyer%40gmail.com&txn_id=1TM13495A76848512&payment_type=instant&btn_id=3042078&last_name=Buyer&address_state=Shanghai&receiver_email=yxw.2013.03-facilitator%40gmail.com&payment_fee=2.20&shipping_discount=0.00&insurance_amount=0.00&receiver_id=2XP27KEMUVN8A&txn_type=web_accept&item_name=sandbox_item111&discount=0.00&mc_currency=USD&item_number=&residence_country=CN&test_ipn=1&shipping_method=Default&handling_amount=0.00&transaction_subject=&payment_gross=55.90&shipping=10.00&ipn_track_id=a6f9e0f859c1c
[2014-12-06 22:21 PRC] HTTP response of validation request: HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Sat, 06 Dec 2014 14:22:01 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Set-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=cHblkEi54DzGTLa5JlkZ5k5rwA9ZRS9I13Waw_UNEnN3n4qBax3-drCD_5VrYo1lvRJWmHQOPn7bYide5LEYmFvSQ-CEsd2RJH6JycTVU3-AiEY9dBVxSVYXMxP6eEtKoknENSGh-ppAYRKLbw40OnC7_FO57RDSBMB3ttpAXqan8xSmdvjcfpezvl3810OK51XEyiIkyXHYQiLTIVqDBJhpgPSAz5jcqGZSF-ZvJIXohmvOJekwuyAgf_R7-QmdEiZgjrG5-msjx2kn6ATUC4Cm-NFOsQgmKa0ecWhOgFEqzjgS8juVMHizUC786G3D0krGR0e5SLzNS9GwwzXk-fIkEzEO75dEoEre9VFK4TfMnygkrdtJV637BSwzqNYyULaF6dHFCTxeEeJ1Xrq9TI5sRssDxQdzcmfE8sCwKZ1L4bgH71CjkI0SU1i; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: cookie_check=yes; expires=Tue, 03-Dec-2024 14:22:02 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: navlns=0.0; expires=Mon, 05-Dec-2016 14:22:02 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: Apache=10.72.108.11.1417875722013081; path=/; expires=Mon, 28-Nov-44 14:22:02 GMT
Vary: Accept-Encoding,User-Agent
Connection: close
Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.WEB.1%26silo_version%3D880%26app%3Dslingshot%26TIME%3D168919892; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT
Set-Cookie: Apache=10.72.128.11.1417875721998036; path=/; expires=Mon, 28-Nov-44 14:22:01 GMT
Strict-Transport-Security: max-age=14400
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

VERIFIED
[2014-12-06 22:21 PRC] Verified IPN: cmd=_notify-validate&mc_gross=55.90&protection_eligibility=Eligible&address_status=unconfirmed&payer_id=JARYJK2TES6C6&tax=0.90&address_street=NO+1+Nan+Jin+Road&payment_date=06%3A21%3A54+Dec+06%2C+2014+PST&payment_status=Completed&charset=gb2312&address_zip=200000&first_name=Test&mc_fee=2.20&address_country_code=CN&address_name=Buyer+Test&notify_version=3.8&custom=&payer_status=unverified&business=yxw.2013.03-facilitator%40gmail.com&address_country=China&address_city=Shanghai&quantity=1&verify_sign=AUaxvSojqajxsiGA9qXfGuCulUctAIsI7u6BJGTRbntLsB6UI3lGIXb0&payer_email=yxw.2013.03-buyer%40gmail.com&txn_id=1TM13495A76848512&payment_type=instant&btn_id=3042078&last_name=Buyer&address_state=Shanghai&receiver_email=yxw.2013.03-facilitator%40gmail.com&payment_fee=2.20&shipping_discount=0.00&insurance_amount=0.00&receiver_id=2XP27KEMUVN8A&txn_type=web_accept&item_name=sandbox_item111&discount=0.00&mc_currency=USD&item_number=&residence_country=CN&test_ipn=1&shipping_method=Default&handling_amount=0.00&transaction_subject=&payment_gross=55.90&shipping=10.00&ipn_track_id=a6f9e0f859c1c