There’s a way to make this happen with the PayPal and Stripe gateways along with the Meta key box.
Basically how this works with the PayPal and Stripe gateways is you enter an alternate payment ID in the event’s Event Meta box.
You can modify the WorldPay gateway to do use the same feature. If you look in /gateways/worldpay/worldpay_vars.php you’ll find the line where the WorldPay ID pulls in the WorldPay Installation ID setting (to set the instID field) on line 21:
//Check for an alternate WorldPay account
if (isset($event_meta['worldpay_id']) && !empty($event_meta['worldpay_id']) && filter_var($event_meta['worldpay_id'], FILTER_VALIDATE_EMAIL) != FALSE) {
//Alternate WorldPay ID - using the worldpay_id meta key field.
$my_worldpay_id = $event_meta['worldpay_id'];
} else {
$my_worldpay_id = empty($worldpay_settings['worldpay_id']) ? '' : $worldpay_settings['worldpay_id'];
}
then change the instID field to use your new variable:
$myworldpay->addField('instId', $my_worldpay_id);
What will happen is the default payment account will be used for events where no worldpay_id key is entered. The events that have a valid Worldpay Installation ID entered as the value for the worldpay_id key will use the alternate account.
Hope that helps!
Viewing 1 reply thread
The support post ‘Different payment gateways for different events’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.