Support

Home Forums Event Espresso Premium Worldpay integration

Worldpay integration

Posted: December 6, 2012 at 3:24 am

Viewing 13 reply threads


Marc Kilian

December 6, 2012 at 3:24 am

Can anybody help me with the Worlpay integration?
I am concerned about

  1. on the config page it says for the installation id, it is typically payment@yourdomain.com -> nope, my installation ID is a 6-digit number
  2. there are 3 passwords set in Worldpay (Info servlet, payment response, MD5 secret), but I can’t find any place in the payment gateway to configure at least the payment response password.
  3. The Worldpay gateway responds with 3 distinct errors in a list, namely the installation Id field is empty or contains invalid characters, the protocol is wrong (a secure protocol needs to be used), the installation number is wrong.

Help anybody?


Josh

  • Support Staff

December 7, 2012 at 4:42 pm

Hi Marc,

You can enter the 6-digit installation ID in the WorldPay Installation ID. The Event Espresso WorldPay gateway settings box doesn’t have fields to place passwords in them, and I don’t recall ever needing to set these up on any of the sites we’ve configured with WorldPay thus far.

Can you try entering the 6-digit installation ID in the field in the Event Espresso payment settings?


Marc Kilian

December 7, 2012 at 5:02 pm

Hi Josh,
Thanks for your message.
Yes, that’s what I did and it came up with this strange behavior. Is it possible that it is because we are running in test mode?
Best
Marc


Josh

  • Support Staff

December 7, 2012 at 5:08 pm

Are you using a test installation ID when you’re in test mode?


Marc Kilian

December 7, 2012 at 5:10 pm

Yep.


Josh

  • Support Staff

December 7, 2012 at 5:21 pm

When you log into your account interface, is the Installation Integration setup in Test mode or Production?

Also, is the payment response URL set in the Payment response settings?


Marc Kilian

December 8, 2012 at 2:58 pm

The install is in test mode. The payment response is set, but I am honestly uncertain what would be the correct setting.


Josh

  • Support Staff

December 10, 2012 at 7:48 am

Hi Marc,

If you look at the WorldPay box in Event Espresso>Payment settings, there will be a Relay Response URL highlighted within a yellow box. This is the page that should be set in your Worldpay account.


Marc Kilian

December 10, 2012 at 7:59 am

Set correctly. It says now (Worldpay): “directed a test request to a live system”, and asks me if I want to forward the request. In eventespresso, I have test mode enabled though.


Marc Kilian

December 11, 2012 at 10:15 am

Josh,
I’ve now a bit more understanding of the gateway implementation and identified the source of the initial issue.
When in test mode (sandbox config in settings), the gateway still uses the secure.worldpay.com host, and that doesn’t work. I have therefore changed enableTestMode() to change the gateway URL to the correct one for the sandbox. Now the sandbox call works fine.
Best
Marc

public function enableTestMode() {
    $this->testMode = TRUE;
    $this->gatewayUrl = 'https://secure-test.worldpay.com/wcc/purchase';
}


Marc Kilian

December 11, 2012 at 1:37 pm

Josh,
There are a couple of issues left, that need to be addressed. Please advise how to best resolve them quickly:
1. Dynamic callback URL from Worldpay gateway.
We do need the dynamic callback capability from Worldpay, because we have several points in our site where calls to Worldpay are made, i.e. events (eventespresso), store, membership subscriptions. Hence we need to hand off the hidden value MC_callback to Worldpay. I have tried to addField in prepareSubscription in the world pay gateway code, but that doesn’t work, probably because the strings are getting URLified. I have now added that field in the gateway submission code, and that works. Dirty solution working for us, but not generally advisable. Plus with every code change we further complicate the upgrade process for further releases.
2. We need to capture the full address data
on our website (if the member isn’t logged in and we know it from the record), and we have to hand over all these data to the gateway. If we don’t implement this way, the user has to re-enter all the data into worldpay. Any solution for this?
Thanks
Marc


Josh

  • Support Staff

December 11, 2012 at 3:58 pm

Hi Marc,

You can make modifications to the files in the /gateways/worldpay and copy the entire worldpay gateway folder to /wp-content/uploads/espresso/gateways. Event Espresso checks there first, so it will allow for your customized gateway to not be overwritten on an update.

I’ll need to check in with the developer of the WorldPay gateway to see if it’s possible to hand over address info to WorldPay. The other gateways already do this, and I’m wondering if there is a reason why the WorldPay gateway doesn’t have this feature.


Marc Kilian

December 13, 2012 at 3:48 am

Ok, Josh, we NEARLY fixed this. There are all fields we need that come into the gateway function espresso_display_worldpay, except the attendant country. Now, country being part of the questions, is there an easy way to fix this, i.e. have country handed over as an input data? I mean, you’re doing this with other question fields as well, apparently. If that is not going to work, what would be the proper SQL code, to get the country out of the database, with which select and WHERE clause?


Josh

  • Support Staff

December 13, 2012 at 3:06 pm

I see what you’re saying. The country answer gets stored in events_answer, where the other items like address and phone get stored in events_attendee. My mySQL chops are not to the point where I could give you advice on how to add Country to the query, but I think what you’re looking for is in the espresso_prepare_payment_data_for_gateways function in /gateways/process_payments.php

Viewing 13 reply threads

The support post ‘Worldpay integration’ 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.

Event Espresso