| @@ -136,8 +136,10 @@ | ||
| 136 | 136 | 'source' => 'paypal', |
| 137 | 137 | 'amount_quantity' => ! empty( $primary_payment_amount_quantity ) ? intval( $primary_payment_amount_quantity ) : '', |
| 138 | 138 | 'detailed_product_info' => maybe_serialize( $detailed_product_info ), |
| 139 | 139 | 'paypal_business_email' => sanitize_email( $el_settings['better_payment_paypal_business_email'] ), |
| 140 | + // The PayPal environment the order was sent to; the IPN must come from the same one. | |
| 141 | + 'paypal_mode' => 'yes' === $el_settings['better_payment_paypal_live_mode'] ? 'live' : 'sandbox', | |
| 140 | 142 | // Persisted so the async PayPal IPN can rebuild the e-mail body + on/off toggle. |
| 141 | 143 | 'email_settings' => Handler::extract_email_settings( $el_settings ), |
| 142 | 144 | ]; |
| 143 | 145 | |