PHP - Decoding data sent from paypal into friendly readable format -
i have basic php paypal script works fine (i'm working on sandbox)
my issue response paypal unreadable , cannot therefore use want i.e update database
here's i'm getting:
array ( [token] => ec%xxxxx0t [billingagreementacceptedstatus] => 0 [checkoutstatus] => paymentactioncompleted [timestamp] => 2015%2d05%2d15t08%3a23%3a58z [ack] => success [version] => 109%2e0 [build] => 16684246 [email] => mymail%40gmail%2ecom [payerstatus] => verified [firstname] => myfname [lastname] => mylname [countrycode] => [shiptoname] => fname%20lname [shiptostreet] => 1%20main%20st [shiptocity] => san%20jose [shiptostate] => ca [shiptozip] => 95131 [shiptocountrycode] => [shiptocountryname] => united%20states [addressstatus] => confirmed [currencycode] => usd [amt] => 96%2e00 .........
as shown i'm getting above response instance, cannot store timestamp in database in such format: [timestamp] => 2015%2d05%2d15t08%3a23%3a58z or email this: [email] => mymail%40gmail%2ecom
i've tried using utf8 so:
header('content-type: text/html; charset=utf-8');
but doesn't seem help
how can decode response i'm receiving paypal friendly readable format?
you have use urldecode()
function it.
for example :
$data = "mymail%40gmail%2ecom"; echo urldecode($data);
output :
mymail@gmail.com
Comments
Post a Comment