当前位置: 动力学知识库 > 问答 > 编程问答 >

php - PayPal IPN post array missing values

问题描述:

I'm trying to receive the IPN data from a simple PAY request using chained payments however when I try to access the post array through $_POST its missing key/value pairs.

I know that all of the data is being sent over because I can receive it all (as an array 'string' separated by ampersands) by using the file_get_contents("php://input") function.

The string being returned looks something this this:

transaction[0].is_primary_receiver=true&transaction[0].id_for_sender_txn=6MD****55453N&log_default_shipping_address_in_transaction=false&transaction[0].receiver=m***[email protected]&action_type=PAY...

When accessing the data through $_POST, it omits

transaction => array(

array(

is_primary_receiver => true,

id_for_sender_txn => 6MD...)

)

)

why is it acting this way?

If it can't be avoided, is there a way to turn the array string into a proper multidimensional array? I've tried using

explode('&', $array) but I get left with key/value pairs such as transaction(0).is_primary_receiver => true which is obviously not the way the data is intended to be stored.

Thanks

分享给朋友:
您可能感兴趣的文章:
随机阅读: