• Resolved justanotherdev

    (@justanotherdev)


    Hi

    I have been attempting to test a form using test card details but have been getting a 500 internal server error with little explanation. The server logs don’t show any record of an error and am not sure how to debug from here.

    Could you provide any advice about what might be causing the issue?

    Error screenshot if it helps.

    WordPress v4.2.10
    Gravity forms v1.9.19
    Gravity Forms eWay v2.2.2

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author webaware

    (@webaware)

    G’day justanotherdev,

    That screenshot tells me that your website hasn’t had the error, it happened at eWAY’s payment gateway. The error displayed means that the eWAY payment gateway itself returned error code 500, with the description “Internal Server Error”.

    Have you entered your API key and password, and Client Side Encryption key, for both the live and sandbox (test) gateways?

    https://go.eway.io/s/article/How-do-I-setup-my-Live-eWAY-API-Key-and-Password
    https://go.eway.io/s/article/How-do-I-set-up-my-Sandbox-API-Key-and-password

    Have you set “Use Sandbox” in your settings? (You can’t use the test card on the live gateway)

    Are you doing simple transactions, or recurring payment transactions?

    cheers,
    Ross

    Thread Starter justanotherdev

    (@justanotherdev)

    Thanks Ross. You’re tips helped. The issue was that the previous dev had modified the core files to load the API key via code rather than the backend.

    Plugin Author webaware

    (@webaware)

    What exactly did they modify? I’d like to know so that I can better diagnose this one if I see it again.

    cheers,
    Ross

    Thread Starter justanotherdev

    (@justanotherdev)

    They left a note that in case the plugin was updated to apply this filter:
    $this->options['customerID'] = apply_filters('get_eway_customer_id', $this->options['customerID']);

    Line added to \wp-content\plugins\gravityforms-eway\includes\class.GFEwayPlugin.php in protected function getEwayCredentials()

    add_filter('get_eway_customer_id', 'return_eway_id', 5, 1);
    function return_eway_id($x){
    	$post_id = $_GET['post_id'];
    	$eway_account_no = get_field('eway_account_number', $post_id);
    	return $eway_account_no;
    }
    Plugin Author webaware

    (@webaware)

    Right, it looks like you’re switching between different eWAY accounts based on a form selection. You’d probably find that the Pro version suits you better, because you can do that with feeds instead of having to hack the plugin each time there’s an update. And you can keep your eWAY customer ID private too, instead of putting it up there in your form(!)

    https://gfeway.webaware.net.au/
    https://gfeway.webaware.net.au/pro/create-a-feed/

    cheers,
    Ross

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘500 Internal Server Error from test payment’ is closed to new replies.