| @@ -298,8 +298,10 @@ | ||
| 298 | 298 | 'source' => 'paypal', |
| 299 | 299 | 'amount_quantity' => ! empty( $primary_payment_amount_quantity ) ? intval( $primary_payment_amount_quantity ) : '', |
| 300 | 300 | 'detailed_product_info' => maybe_serialize( $detailed_product_info ), |
| 301 | 301 | 'paypal_business_email' => sanitize_email( $el_settings['better_payment_paypal_business_email'] ), |
| 302 | + // The PayPal environment the order was sent to; the IPN must come from the same one. | |
| 303 | + 'paypal_mode' => 'yes' === $el_settings['better_payment_paypal_live_mode'] ? 'live' : 'sandbox', | |
| 302 | 304 | // Persisted so the async PayPal IPN can rebuild the e-mail body + on/off toggle. |
| 303 | 305 | 'email_settings' => Handler::extract_email_settings( $el_settings ), |
| 304 | 306 | ); |
| 305 | 307 | |