I implemented a Paypal HTML button (payment and subscription) to direct the client to the Paypal site to make a payment. Also, I pass the invoice # as a parameter. According to the following documents, invoice is a pass-through variable.
https://developer.paypal.com/docs/paypal-payments-standard/integration-guide/Appx-websitestandard-htmlvariables/# https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/archive/PP_subscriptions.pdf
In fact, I do receive all parameters (including invoice) as a POST call when testing on my sandbox account. However, when I test on live payments (non-sandbox account), the invoice is not received. However, I receive other payment information such as item_number, custom, transaction id, etc. Also, with live payments, the information is passed through a GET call instead of a POST call.
In summary, why do I receive the invoice parameter from sandbox payments but not with live payments.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" class="message">
<input type="hidden" name="return" value="<%= (request.isSecure() ? "https" : "http") + "://" + request.getServerName() + "/upgradepayment" %>">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="hosted_button_id" value="...">
<input type="hidden" name="business" value="...">
<input type="hidden" name="item_name" value="...">
<input type="hidden" name="notify_url" value="..."
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="a3" value="...">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<input type="hidden" name="invoice" value="...">
<input type="hidden" name="custom" value="...">
<input type="hidden" name="item_number" value="...">
<input id="ok" type="submit" name="submit" value="Pay and Subscribe with PayPal" alt="PayPal - The safer, easier way to pay online" title="PayPal - The safer, easier way to pay online">
</form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" class="message">
<input type="hidden" value="<%= (request.isSecure() ? "https" : "http") + "://" + request.getServerName() + "/upgradepayment" %>" name="return">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="...">
<input type="hidden" name="item_name" value="...">
<input type="hidden" name="amount" value="...">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="CA">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="hidden" name="invoice" value="...">
<input type="hidden" name="custom" value="...">
<input type="hidden" name="item_number" value="...">
<input id="ok" type="submit" name="submit" value="Pay with PayPal" alt="PayPal - The safer, easier way to pay online" title="PayPal - The safer, easier way to pay online">
</form>
edit: I receive the information about subscriptions with instant payment notification (IPN)