- While using the PHP client library for a custom ecommerce integration, you can create invoices correctly but the $_POST superglobal appears to be empty when reading an IPN or other postback from the BitPay network.
- There is a quirk in the way PHP handles pure JSON responses in a post request and attempting to access elements of the $_POST superglobal will not retrieve any of the post information. To work around this, you must use
file_get_contents("php://input")to read the post data directly. This is the method used in the official BitPay PHP library which you can download here: https://github.com/bitpay/php-bitpay-client.
- All known versions of PHP at this time.