Posted: June 26, 2013 at 10:24 am
|
Hi, Im trying to setup FirstData E4 Settings. I have created my payment page, set my transaction ID. They copied response url to payment page settings in FirstData. But when i click on button to pay it gives me an error: x_relay_url : Invalid x_relay_url. Must be the same as configured for the payment page I know the url is exactly the same, but im wondering if i copied it to right place. Can anyone help? Thanks Justin |
|
WordPress Version:3.5.1PHP Version:5.3.3MySQL Version:5.1.69Event Espresso Version:3.1.33.2 |
Hi Justin, Did you copy the URL that’s highlighted in the yellow box under “Relay Response URL” inside the FirstData E4 settings in Event Espresso>Payment settings? |
|
|
Yep copied exactly, double and triple checked i got the right one. I did notice its coming in as a query and not a pretty link /?type=firstdata_e4&page_id=89 Is this how its suppose to be, when i go to the link , it changes to /thanks?type=firstdata_e4 |
Hi Justin, There might be something to this. Normally it wouldn’t redirect like that. You could try changing the URL in the First Data account settings to use the pretty URL. I’ve seen a few cases (one being a site hosted on WPEngine) where the payment page was getting redirected to use the custom permalink. |
|
|
Updated all links in FirstData admin to pretty link and no joy. Is there anyway to statically set the relay link in Espresso? |
Yeah, you can replace what’s on line 40 of event-espresso/gateways/firstdata_e4/e4_vars.php. |
|
|
Hey Josh, I messed with some of the parameters a bit and i think im starting to connect the dots. I noticed there was a relay response section in my admin for auth.net which im not using. So i changed the code to completely remove x_relay_url and removed TRUE from x_relay_response <code> $myE4->addField('x_relay_response', ''); if ($firstdata_e4_settings['force_ssl_return']) { $home = str_replace("http://", "https://", home_url()); } else { $home = home_url(); } //$myE4->addField('x_relay_url', $home . '/?type=firstdata_e4&page_id=' . $org_options['return_url']);</code> Do you see any problems with this? Im not sure why those would be passed all the time unless they are needed for something which concerns me if this broke anything else? Thoughts? Justin |
|
Here is the readable version |
|
Hi Guys, So disabling that does get the payment to process but when it redirects back to the thanks page, it cant find the registration. Looking through the code i noticed two things: 1. In the admin it was returning variables as GET and your code is looking for $_POST. So i simply updated that in the admin of FirstData Payment Page. $myE4->addField(‘registration_id’, $registration_id); to e4_vars.php With that the payment gets processed sucessfully So im wondering if all this looks ok and if the code needs to be updated at all? Thanks Justin |
|
We are actually setting the $_REQUEST[‘registration_id’] in firstdata_e4/init.php: $temp_array = explode(' ', $_REQUEST['x_reference_3']); $_REQUEST['registration_id'] = $temp_array[0]; Can you clarify where you see us looking for $_POST variables? |
|
This is in /event-espresso/gateways/firstdata_e4/FirstDataE4.php, Line 94-96 in the validateIpn method. p |
|
Also that example you showed, the code was never making it to that. The thanks page was never finding the registration and getting stopped at i beleive event-espresso\includes\process-registration/payment_page.php. It wasnt finding a $REG_ID on line 372 which would send it into Line 383 and then do the wp_die at line 390 |
|
The init.php file used to get loaded when the function in payment_page.php ran, and it worked then. It looks like the init.php files are now getting loaded in a function added to the plugins_loaded hook. By the time it gets to the init hook, the values we added to the $_REQUEST variable are gone. I moved that code into the function espresso_transactions_firstdata_e4_get_attendee_id in e4_ipn.php, and it’s working again. Edit: This fix has been added to the 3.1.34-BETA version. the full fix I’ve put into this gist, for anyone who wants to add the fix to their copy of 3.1.33:
|
The support post ‘FirstData E4 [Error] Invalid x_relay_url. Must be the same as configured for the’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.