Just a quick one for any worldpay.module (payment gateway for credit/debit cards in the uk) users out there...I've just updated it to automate the callback..

I'm looking for a few testers to give it a run before udating the "live" module.....it's in my sandbox at the moment.

  1. please only use on a test 4.7 site. I've tested it myself.and it works well, but, I always tend to err on the side of caution..
  2. go to ADMINISTER -> STORE ->SETTINGS -> WORLDPAY, set it to test mode and enable the callback.
  3. change the callback url on the worldpay.com account to be www.yoursite.com/worldpay_callback
  4. setup a few products. it works with downloads/memberships (non-shippable products) and shippable products.

things to do;

(1) improve the look of the processed/cancelled pages once it's been tested.

Notes: I have left in some debug information at the very bottom of the cancelled/processed page for reference only..that's what worldpay spits back at Drupal.

Test VISA credit card Number: 4444333322221111
(no security number needed to do a test)
Expiry date (mm/yy): up to 7 years from today

thanks..

Dub

Comments

robertdouglass’s picture

Your timing couldn't have been better. I'll be testing in about a week and will report back any problems. Rock on.

- Robert Douglass

-----
My Drupal book: Building Online Communities with Drupal, phpBB and WordPress

Dublin Drupaller’s picture

no worries Rob..

appreciate the help with testing it.

known problem: when worldpay initiates the callback, it does it from their server...so when the drupal Payment completed! or Payment cancelled! page is displayed, the user appears to be not logged in.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

killes@www.drop.org’s picture

Just had a quick look: The module needs to be protected from malicious people. Currently you could send invoices to just about everybody. It also needs to be made translatable.
--
Drupal services
My Drupal services

Dublin Drupaller’s picture

Thanks killes

good point re: invoices. I will add in a check to make sure the response is coming from the worldpay server.

Ditto for the translatable comment. Will add it to the things to do.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

Dublin Drupaller’s picture

Hi Killes,

I have updated the Worldpay.module in my sandbox with the following:

security check - Worldpay don't give out their IP addresses, so I added in a reverse DNS look up to see if the worldpay_callback is *really* coming from the Worldpay server. typing www.example.com/worldpay_callback will trigger the worldpay server validation check fail.

translatability - I have added in new options for setting a custom message for payment complete, order cancelled and for when the worldpay server validation check fails. Musch easier to translate now.

debug option - I have added a debug option on the admin/store/settings/worldpay page to assist site admins when testing.

If anyone who is using an earlier version gets a chance, I'd appreciate some testers to help confirm it's working as it should. I have tested it rigorously on a test site, but I'd prefer if I had a second/third confirmation...

here are the key list of tests:

- purchase test for shippable item
This completes the payment, but, does not complete the order, i.e. when you click on admin/store, you should see a new item added to the "item needing action" list.

- purchase test for non shippable item (e.g. file downloads)
This completes the payment and when the next cron run is made, the order will be completed and when you click on MY FILES (as an example) your file will be there, ready to download.

- purchase test for membership (paid subscriptions)
This completes the payment and when the next cron run is made, the order will be completed and when you click on admin/submanage you should see the membership order completed.

- cancel test
This should return a PAYMENT CANCELLED page.

NOTES:

  1. Because the worldpay_call processing happens on the Worldpay server, the user will be logged out for the duration. I haven't worked out how to mask that...so I recommend you configure blocks to be hidden for the "worldpay_callback" page. So login/navigation/shopping cart and other blocks relevant to Authenticated Users are hidden.

    To do that, you goto ADMIN/BLOCKS and click on CONFIGURE. You should see an option to SHOW ON ALL PAGES EXCEPT THE FOLLOWING PAGES. Paste worldpay_callback into the text area provided. That will hide LOGIN and other blocks.

  2. Also, because the payment processing happens on the Worldpay server, some normal one-line function calls don't work..hence the extra fiddling with the code, such as the variation on variable_get ('variable_name', 'default') which is normally one line..ditto for theming the output.
  3. While I have done a lot of tests on the the Worldpay.module in my sandbox, please only use on a test site for the moment, until it's been comitted to the contributions /folder/.

Cheers

Dub

EDITED:

P.S. WORLDPAY Test VISA credit card Number: 4444333322221111
(no security number needed to do a test)
Expiry date (mm/yy): up to 7 years from today

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

killes@www.drop.org’s picture

Thanks, that seems to be a solid solution. Looking forward to testing it.
--
Drupal services
My Drupal services

Dublin Drupaller’s picture

Thanks for the message Killes.

I've had feedback from 1 or 2 Drupallers who have tested it and indicated that it works okay.

I plan to update the worldpay.module with the new updates this weekend, so if you get a chance, I'd appreciate it if you could get back to me and let me know what you think.

cheers

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

Dublin Drupaller’s picture

Hi Guys,

thanks for all those who tested the new updates to the Worldpay.module...I have comitted the changes to the module which can be now be found in the CVS repository and will appear in the Drupal 4.7 download of ecommerce within a few hours, when the site re-indexes updated modules.

Thanks again for helping to test it out guys...

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate