|
@@ 178-183 (lines=6) @@
|
| 175 |
|
// Validate the IPN. |
| 176 |
|
$api_response = wp_remote_post( give_get_paypal_redirect(), $remote_post_vars ); |
| 177 |
|
|
| 178 |
|
if ( is_wp_error( $api_response ) ) { |
| 179 |
|
give_record_gateway_error( __( 'IPN Error', 'give' ), sprintf( /* translators: %s: Paypal IPN response */ |
| 180 |
|
__( 'Invalid IPN verification response. IPN data: %s', 'give' ), json_encode( $api_response ) ) ); |
| 181 |
|
|
| 182 |
|
return; // Something went wrong. |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
if ( 'VERIFIED' !== $api_response['body'] ) { |
| 186 |
|
give_record_gateway_error( __( 'IPN Error', 'give' ), sprintf( /* translators: %s: Paypal IPN response */ |
|
@@ 185-190 (lines=6) @@
|
| 182 |
|
return; // Something went wrong. |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
if ( 'VERIFIED' !== $api_response['body'] ) { |
| 186 |
|
give_record_gateway_error( __( 'IPN Error', 'give' ), sprintf( /* translators: %s: Paypal IPN response */ |
| 187 |
|
__( 'Invalid IPN verification response. IPN data: %s', 'give' ), json_encode( $api_response ) ) ); |
| 188 |
|
|
| 189 |
|
return; // Response not okay. |
| 190 |
|
} |
| 191 |
|
}// End if(). |
| 192 |
|
|
| 193 |
|
// Check if $post_data_array has been populated. |