Last active
December 30, 2015 22:39
-
-
Save sidharrell/7895923 to your computer and use it in GitHub Desktop.
fix eway response message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // replaces gateways/eway/ewaypaymentprocess.php lines 87-97 | |
| if ($eway_settings['use_sandbox']) { | |
| echo '<h3 style="color:#ff0000;" title="Payments will not be processed">' . __('Debugging / Sandbox output', 'event_espresso') . '</h3><br />'; | |
| echo "Response code = " . $responsecode; | |
| echo "\nResponse = "; | |
| var_dump($response); | |
| echo '<h3 style="color:#ff0000;" title="Payments will not be processed">' . __('End of Debugging / Sandbox output (this will go away when you switch to live transactions)', 'event_espresso') . '</h3>'; | |
| $subject = 'Instant Payment Notification - Gateway Variable Dump'; | |
| $body = "An instant payment notification failed\n"; | |
| $body .= "from " . " on " . date('m/d/Y'); | |
| $body .= " at " . date('g:i A') . "\n\nDetails:\n"; | |
| $body .= $response; | |
| wp_mail($payment_data['contact'], $subject, $body); | |
| } else { | |
| echo 'There was a problem processing your transaction<br>'; | |
| $responsemessage = fetch_data($response, '<TrxnResponseMessage>', '</TrxnResponseMessage>'); | |
| echo 'eWay reports that: ' . $responsemessage; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment