eileenmcnaughton / nz.co.fuzion.omnipaymultiprocessor

Omnipay Multi Processor Payment Processor For CiviCRM
Other
13 stars 44 forks source link

Worldpay payment gateway #84

Open michael-chaplin-gmcvo opened 5 years ago

michael-chaplin-gmcvo commented 5 years ago

Not an issue with existing code...just wondering if anyone's written a Worldpay payment gateway for this extension?

eileenmcnaughton commented 5 years ago

There is an omnipay plugin in the extension - I don't know how easy it is to get going but you would need to add an mgd file (which creates an entry in the civicrm_payment_processor table when you install the extension) - here is text from another file

it looks like the class would be omnipay_WorldPay or omnipay_WorldPay_Json

*

russ-manta commented 4 years ago

For anyone looking in here, the Worldpay mgd file is pretty straightforward and very similar to the Mollie one. Copy the Mollie mgd file file in the Metadata directory and create a new one named _omnipayWorldPay.mgd.php and then modify the parameters as follows

return [
  [
    'name' => 'OmniPay - WorldPay',
    'entity' => 'payment_processor_type',
    'params' => array(
      'version' => 3,
      'title' => 'OmniPay - WorldPay',
      'name' => 'omnipay_WorldPay',
      'description' => 'Omnipay WorldPay Payment Processor',
      'user_name_label' => 'Installation ID',
      'password_label' => 'unused',
      'signature_label' => 'unused',
      'class_name' => 'Payment_OmnipayMultiProcessor',
      'url_site_default' => 'https://secure.worldpay.com/wcc/purchase',
      'url_api_default' => 'https://secure.worldpay.com/wcc/purchase',
      'billing_mode' => 4,
      'payment_type' => 1,
    ),
  ]
];
eileenmcnaughton commented 4 years ago

@russ-manta - do you want to PR it in?

eileenmcnaughton commented 4 years ago

Although this 'url_site_default' looks like a test value....

russ-manta commented 4 years ago

Ah yes my bad, have changed that url now. I've done fairly limited testing so would want to do a bit more before PR ing it in