WorldPay - Payment gateway

  • Robyn Roberts
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago - 7 years 3 months ago #92676 by Robyn Roberts
WorldPay - Payment gateway was created by Robyn Roberts
I'm hoping someone can help me with this as I've burnt away many hours trying to find a solution and think I might be close?

The problem I am experiencing is that once a payment has been processed through WorldPay the "shopper response" (or redirect) only appears to be working so far until it experiences a 303 error and hangs.

I believe the reason for this 303 error is due to how the response from WorldPay is handled once it reaches the OS Services Booking component.

The shopper response url that you put in your WorldPay configuration is -
http://YOURDOMAING/index.php?option=com_osservicesbooking&task=defaul_paymentconfirm&payment_method=os_worldpay

This is the URL that WorldPay sends the data back to. From what I understand the data sent back from WorldPay reaches OS Services booking and as a result the component updates its database to log the transaction / book out the timeslot and send notification emails.

The last part of the process is for the component to redirect you to a page on your website informing the customer that the transaction has failed / succeeded.

To do this the component passes variables to create the url (this all appears to happen in the file... components > com_osservicesbooking > helpers > payment > omnipay.php starting around line 135)
Code:
protected function setPaymentSuccessUrl($id, $data = array()) { $Itemid = JFactory::getApplication()->input->get->getInt('Itemid',0); $this->paymentSuccessUrl = JRoute::_('index.php?option=com_osservicesbooking&task=defaul_paymentconfirm&Itemid=' . $Itemid, false, false); }
The way that the component handles this function appears to be via a 303 Redirect (see attachment screenshot).

WorldPay doesn't like this 303 Redirect and everything stops! However, from what I can understand WorldPay might pass this Url redirect if the route taken uses a Meta Refresh rather than the 303 redirect.

With that in mind I am hopeful that if the code can be edited to perform a Meta Refresh then everything should work?

Something like (my PHP skills are none existent)
Code:
protected function setPaymentSuccessUrl($id, $data = array()) { $Itemid = JFactory::getApplication()->input->get->getInt('Itemid',0); echo '<META HTTP-EQUIV="Refresh" Content="0; URL="'; $this->paymentSuccessUrl = JRoute::_('index.php?option=com_osservicesbooking&task=defaul_paymentconfirm&Itemid=' . $Itemid, false, false); echo '">'; }
(But that doesn't work!)

If ANYONE can help it would be very much appreciated
Attachments:
Last edit: 7 years 3 months ago by Robyn Roberts.

Please Log in or Create an account to join the conversation.

Moderators: Mr. Dam