cancel
Showing results for 
Search instead for 
Did you mean: 

Sandbox environment works but live does not - only changing live/sandbox email and address?

Highlighted
New Community Member

Sandbox environment works but live does not - only changing live/sandbox email and address?

I have run tests through the sandbox and all completed perfectly. The sandbox sends the IPN to the correct page and all is processed and captured in the database.

 

However when I change to live I only change these settings and then it fails:

 

Checkout page:
<form action="https://www.paypal.com/us/cgi-bin/webscr" method="post" id="billing_form"> <!-- live -->
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <!-- testing --> 

 

<input type="hidden" name="business" value="liveemail-com" /><!-- live -->
<input type="hidden" name="business" value="test_biztest-com" /><!-- testing --> 


IPN Page
$ch = curl_init('https://ipnpb.paypal.com/cgi-bin/webscr'); // live
$ch = curl_init('https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'); //testing

 

if (($receiver_email=='liveemail-com')&&($payment_currency=='GBP')&&($payment_amount==$total)){  //LIVE 
if (($receiver_email=='test_biztest-com')&&($payment_currency=='GBP')&&($payment_amount==$total)){ //TEST

 

I have been pulling my hair trying to find any typos etc but nothing.

Tags (3)
1 REPLY 1
Contributor

Re: Sandbox environment works but live does not - only changing live/sandbox email and address?

So I have been troubleshooting and it seems that the business email I specify on the checkout page:

<input type="hidden" name="business" value="business email address" />

Does not get carried across with the IPN response as the $receiver_email.

We are using an account with a number of verified alias emails. The $receiver_email that Paypal sends back in the IPN response seems to be the accounts primary email address.

BUT it has a strange format:
If this is my accounts primary email:

something@email-com

Paypal seems to list the $receiver_email as:

something+paypal@email-com

So if I want to run a check before processing the order eg:

if (($receiver_email=='something@email-com')&&($payment_currency=='GBP')&&($payment_amount==$total)){

Process order

}

This is where it seems to be failing - as the receiver_email is different.


Am I being silly and overlooked something?

Tags (2)