Forum

Thread tagged as: Question, Shop
Sorry!

Debug Message
[22] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Matched page: /shop/thankyou, so not using routes.
Using master page: /templates/pages/shop/thankyou.php
[1] SELECT * FROM perch2_pages WHERE pagePath='/shop/thankyou' LIMIT 1
[28] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT locationID FROM perch2_shop_tax_locations WHERE locationIsHome=1 LIMIT 1
INSERT INTO perch2_shop_cart(memberID,locationID,currencyID,cartPricing,cartProperties) VALUES(NULL,'1',47,'standard','[]')
[1] SELECT * FROM perch2_shop_cart WHERE cartID=387
[1] SELECT * FROM perch2_shop_cart WHERE cartID=387
Runtime complete_payment for worldpay
Request time: 0.5839
Process time: 0.574
Memory: 5.1862

Just had a email from worldpay

Hi Anthony,

Thank you for your call earlier today.

Following our conversation please take note for these fields

"Payment Response URL" - This used for both collecting the POST data from our response into the backend of your grabaperch CMS system. It should also accommodate the redirection for the shopper. This usually based off our "transStatus" parameter Y = Successful C = Cancelled.

"Shopper Redirect URL" - This is specific to mobile pages only and is usually used for basic redirection once the payment is completed. Most shopping carts will simply want you to use the same as the Payment Response URL but if you have a specific mobile response then you can use this field.

Hope this helps.

Regards,

Alexander Dewison Gateway Technical Support Consultant

Drew McLellan

Drew McLellan 2638 points
Perch Support

When you get sent back to your site, does WorldPay add anything to the URL or post any parameters to the page?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are those parameters passed to the page when it's fetched from the server?

i cant see them on the page or in debug

Drew McLellan

Drew McLellan 2638 points
Perch Support

What do these output if you add them to the page?

<pre>
POST: 
<?php print_r($_POST); ?>
---------------------------------------------
GET:
<?php print_r($_GET); ?>
</pre>

Drew McLellan said:

What do these output if you add them to the page?

<pre>
POST: 
<?php print_r($_POST); ?>
---------------------------------------------
GET:
<?php print_r($_GET); ?>
</pre>
POST:
Array
(
    [country] => GB
    [authCost] => 200.00
    [msgType] => authResult
    [routeKey] => VISA-SSL
    [transId] => 3053278111
    [countryMatch] => S
    [rawAuthMessage] => cardbe.msg.authorised
    [authCurrency] => GBP
    [charenc] => UTF-8
    [compName] => HARBOUR CHALLANGE OEC LTD
    [rawAuthCode] => A
    [amountString] => £200.00
    [installation] => 1111374
    [currency] => GBP
    [tel] => 
    [fax] => 
    [lang] => en
    [countryString] => United Kingdom
    [email] => a.elleray1182@gmail.com
    [transStatus] => Y
    [_SP_charEnc] => UTF-8
    [amount] => 200.00
    [address] => 0
0

0
0
    [transTime] => 1470861947594
    [cost] => 200.00
    [town] => 0
    [address3] => 
    [address2] => 0
    [address1] => 0
    [cartId] => 187
    [postcode] => 0
    [ipAddress] => 94.192.120.84
    [cardType] => Visa
    [authAmount] => 200.00
    [MC_callback] => https://harbourchallenge.myboxproject.co.uk/shop/thankyou
    [authMode] => A
    [instId] => 1111374
    [displayAddress] => 0
0

0
0
    [AAV] => 00000
    [testMode] => 100
    [name] => Anthony Elleray
    [callbackPW] => live2008
    [region] => 0
    [AVS] => 1111
    [desc] => Order #187
    [authAmountString] => £200.00
)
---------------------------------------------
GET:
Array
(
    [msgType] => authResult
    [installation] => 1111374
)
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you try updating your perch_shop/lib/gategways/PerchShopGateway_worldpay.class.php file with the following?

<?php

class PerchShopGateway_worldpay extends PerchShopGateway_default
{
    protected $slug = 'worldpay';
    public $omnipay_name = 'WorldPay';

    public function set_credentials(&$Omnipay, $config)
    {
        if ($config['test_mode']) {
            $Omnipay->setInstallationId($config['test']['installationId']);
            $Omnipay->setAccountId($config['test']['accountId']);
            $Omnipay->setSecretWord($config['test']['secretWord']);
            $Omnipay->setCallbackPassword($config['test']['callbackPassword']);
            $Omnipay->setTestMode(true);
        }else{
            $Omnipay->setInstallationId($config['live']['installationId']);
            $Omnipay->setAccountId($config['live']['accountId']);
            $Omnipay->setSecretWord($config['live']['secretWord']);
            $Omnipay->setCallbackPassword($config['live']['callbackPassword']);
            $Omnipay->setTestMode(false);
        }
    }

    public function get_order_from_env($Orders, $get, $post)
    {
        if (isset($post['cartId'])) {
            return $Orders->find($post['cartId']);
        }
    }

    public function callback_looks_valid($get, $post)
    {
        if (isset($post['cartId']) && isset($post['transStatus']) && $post['transStatus'] == 'Y') {
            return true;
        }
        return false;
    }

    public function action_payment_callback($Order, $args, $gateway_opts)
    {
        $result = $this->complete_payment($Order, $args);
        PerchUtil::debug($result);
    }
}

Result from thankyou page

Sorry!

POST:
Array
(
    [country] => GB
    [authCost] => 50.00
    [msgType] => authResult
    [routeKey] => VISA-SSL
    [transId] => 3053297388
    [countryMatch] => S
    [rawAuthMessage] => cardbe.msg.authorised
    [authCurrency] => GBP
    [charenc] => UTF-8
    [compName] => HARBOUR CHALLANGE OEC LTD
    [rawAuthCode] => A
    [amountString] => £50.00
    [installation] => 1111374
    [currency] => GBP
    [tel] => 
    [fax] => 
    [lang] => en
    [countryString] => United Kingdom
    [email] => a.elleray1182@gmail.com
    [transStatus] => Y
    [_SP_charEnc] => UTF-8
    [amount] => 50.00
    [address] => 0
0

0
0
    [transTime] => 1470909096845
    [cost] => 50.00
    [town] => 0
    [address3] => 
    [address2] => 0
    [address1] => 0
    [cartId] => 190
    [postcode] => 0
    [ipAddress] => 94.192.120.84
    [cardType] => Visa
    [authAmount] => 50.00
    [MC_callback] => https://harbourchallenge.myboxproject.co.uk/shop/thankyou
    [authMode] => A
    [instId] => 1111374
    [displayAddress] => 0
0

0
0
    [AAV] => 00000
    [testMode] => 100
    [name] => Anthony Elleray
    [callbackPW] => live2008
    [region] => 0
    [AVS] => 1111
    [desc] => Order #190
    [authAmountString] => £50.00
)
---------------------------------------------
GET:
Array
(
    [msgType] => authResult
    [installation] => 1111374
)
Debug Message
[26] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Matched page: /shop/thankyou, so not using routes.
Using master page: /templates/pages/shop/thankyou.php
[1] SELECT * FROM perch2_pages WHERE pagePath='/shop/thankyou' LIMIT 1
[28] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT locationID FROM perch2_shop_tax_locations WHERE locationIsHome=1 LIMIT 1
INSERT INTO perch2_shop_cart(memberID,locationID,currencyID,cartPricing,cartProperties) VALUES(NULL,'1',47,'standard','[]')
[1] SELECT * FROM perch2_shop_cart WHERE cartID=405
[1] SELECT * FROM perch2_shop_cart WHERE cartID=405
Runtime complete_payment for worldpay
[1] SELECT * FROM perch2_shop_orders WHERE orderID='190' AND orderDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_currencies WHERE currencyID='47' LIMIT 1
Payment successful
UPDATE perch2_shop_orders SET orderGatewayRef='3053297388', orderUpdated='2016-08-11 10:51:39' WHERE orderID='190'
No ids to log.
UPDATE perch2_shop_orders_meta SET metaValue=last_insert_id(metaValue+1) WHERE id='last_invoice_number'
[1] SELECT last_insert_id()
UPDATE perch2_shop_orders SET orderInvoiceNumber='Order-80', orderUpdated='2016-08-11 10:51:39' WHERE orderID='190'
No ids to log.
Setting order status to paid
UPDATE perch2_shop_orders SET orderDynamicFields='{\"status\":\"paid\"}', orderStatus='paid', orderUpdated='2016-08-11 10:51:39' WHERE orderID='190'
No ids to log.
[1] SELECT * FROM perch2_shop_addresses WHERE addressID='514' AND addressDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_tax_locations WHERE locationDeleted IS NULL AND ((countryID=0 AND regionID IS NULL) OR locationIsDefault=1) ORDER BY locationIsDefault ASC LIMIT 1
Looking up missing property address_1
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property address_2
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property city
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property county
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property postcode
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
INSERT INTO perch2_shop_tax_exhibits(orderID,exhibitType,exhibitDetail,exhibitSource,locationID,countryID,exhibitDate) VALUES(190,'BILL_ADDRESS',', ','Customer','1','0','2016-08-11 09:51:39')
[1] SELECT * FROM perch2_shop_tax_exhibits WHERE exhibitID='493' LIMIT 1
No ids to log.
UPDATE perch2_shop_tax_exhibits SET orderID=190, exhibitType='BILL_ADDRESS', exhibitDetail=', ', exhibitSource='Customer', locationID='1', countryID='0', exhibitDate='2016-08-11 09:51:39' WHERE exhibitID='493'
No ids to log.
[1] SELECT * FROM perch2_shop_addresses WHERE addressID='515' AND addressDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_tax_locations WHERE locationDeleted IS NULL AND ((countryID=0 AND regionID IS NULL) OR locationIsDefault=1) ORDER BY locationIsDefault ASC LIMIT 1
Looking up missing property address_1
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property address_2
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property city
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property county
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property postcode
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
INSERT INTO perch2_shop_tax_exhibits(orderID,exhibitType,exhibitDetail,exhibitSource,locationID,countryID,exhibitDate) VALUES(190,'SHIP_ADDRESS',', ','Customer','1','0','2016-08-11 09:51:39')
[1] SELECT * FROM perch2_shop_tax_exhibits WHERE exhibitID='494' LIMIT 1
No ids to log.
UPDATE perch2_shop_tax_exhibits SET orderID=190, exhibitType='SHIP_ADDRESS', exhibitDetail=', ', exhibitSource='Customer', locationID='1', countryID='0', exhibitDate='2016-08-11 09:51:39' WHERE exhibitID='494'
No ids to log.
[1] SELECT * FROM perch2_shop_order_statuses WHERE statusKey='paid' AND statusActive=1 AND statusDeleted IS NULL
[1] SELECT * FROM perch2_shop_emails WHERE emailStatus=3 AND emailActive=1
Sending customer email
[1] SELECT * FROM perch2_shop_customers WHERE customerID='1' AND customerDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_members WHERE memberID='16' LIMIT 1
Using email template: /var/sites/h/harbourchallenge.myboxproject.co.uk/public_html/perch/templates/shop/emails/order_paid.html (html)
[1] SELECT * FROM perch2_shop_order_statuses WHERE statusKey='paid' AND statusDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_addresses WHERE addressID=515 AND addressDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
[1] SELECT * FROM perch2_shop_addresses WHERE addressID=514 AND addressDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
[1] SELECT * FROM perch2_shop_order_items WHERE orderID='190' ORDER BY itemID ASC
[1] SELECT * FROM perch2_shop_order_statuses WHERE statusKey='paid' AND statusDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_currencies WHERE currencyID=47 LIMIT 1
[1] SELECT * FROM perch2_shop_shippings WHERE shippingID=0 AND shippingDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_products WHERE productID=3 AND productDeleted IS NULL LIMIT 1
Looking up missing property sender_name
Looking up missing property sender_email
Building message with Perch template
[1] Using template: /templates/shop/emails/order_paid.html
Using sub-template: /templates/shop/emails/email.html
Using sub-template: /templates/shop/emails/_email_header.html
[1] Using sub-template: /templates/shop/emails/_email_footer.html
[28] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
SMTP Error: Could not authenticate.
[1] SELECT p.*, oi.itemQty FROM perch2_shop_order_items oi, perch2_shop_products p WHERE oi.productID = p.productID AND oi.orderID='190'
[1] SELECT * FROM perch2_shop_customers WHERE customerID='1' AND customerDeleted IS NULL LIMIT 1
UPDATE perch2_shop_products SET stock_level=0, productUpdated='2016-08-11 10:51:42' WHERE productID='3'
No ids to log.
[nil] SELECT * FROM perch2_shop_product_tags WHERE productID=3 AND tagDeleted IS NULL ORDER BY tagOrder ASC
[1] SELECT * FROM perch2_shop_currencies WHERE currencyActive=1 AND currencyID=47
UPDATE perch2_shop_orders SET orderExchangeRate=1, orderUpdated='2016-08-11 10:51:42' WHERE orderID='190'
No ids to log.
Omnipay\WorldPay\Message\CompletePurchaseResponse Object
(
    [request:protected] => Omnipay\WorldPay\Message\CompletePurchaseRequest Object
        (
            [liveEndpoint:protected] => https://secure.worldpay.com/wcc/purchase
            [testEndpoint:protected] => https://secure-test.worldpay.com/wcc/purchase
            [parameters:protected] => Symfony\Component\HttpFoundation\ParameterBag Object
                (
                    [parameters:protected] => Array
                        (
                            [installationId] => 1111374
                            [accountId] => HARBOURCHALLM1
                            [secretWord] => Ae931d957A23c10c0583c9d2bX$
                            [callbackPassword] => live2008
                            [testMode] => 1
                            [amount] => 50.00
                            [currency] => GBP
                        )

                )

            [httpClient:protected] => Guzzle\Http\Client Object
                (
                    [defaultHeaders:protected] => Guzzle\Common\Collection Object
                        (
                            [data:protected] => Array
                                (
                                )

                        )

                    [userAgent:protected] => Guzzle/3.9.3 curl/7.41.0 PHP/5.5.26
                    [config:Guzzle\Http\Client:private] => Guzzle\Common\Collection Object
                        (
                            [data:protected] => Array
                                (
                                    [curl.options] => Array
                                        (
                                            [78] => 60
                                            [10065] => /var/sites/h/harbourchallenge.myboxproject.co.uk/public_html/perch/addons/apps/perch_shop/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem
                                            [64] => 1
                                            [81] => 2
                                        )

                                )

                        )

                    [baseUrl:Guzzle\Http\Client:private] => 
                    [curlMulti:Guzzle\Http\Client:private] => 
                    [uriTemplate:Guzzle\Http\Client:private] => 
                    [requestFactory:protected] => Guzzle\Http\Message\RequestFactory Object
                        (
                            [methods:protected] => Array
                                (
                                    [getInstance] => 0
                                    [__construct] => 1
                                    [fromMessage] => 2
                                    [fromParts] => 3
                                    [create] => 4
                                    [cloneRequestWithMethod] => 5
                                    [applyOptions] => 6
                                    [visit_headers] => 7
                                    [visit_body] => 8
                                    [visit_allow_redirects] => 9
                                    [visit_auth] => 10
                                    [visit_query] => 11
                                    [visit_cookies] => 12
                                    [visit_events] => 13
                                    [visit_plugins] => 14
                                    [visit_exceptions] => 15
                                    [visit_save_to] => 16
                                    [visit_params] => 17
                                    [visit_timeout] => 18
                                    [visit_connect_timeout] => 19
                                    [visit_debug] => 20
                                    [visit_verify] => 21
                                    [visit_proxy] => 22
                                    [visit_cert] => 23
                                    [visit_ssl_key] => 24
                                )

                            [requestClass:protected] => Guzzle\Http\Message\Request
                            [entityEnclosingRequestClass:protected] => Guzzle\Http\Message\EntityEnclosingRequest
                        )

                    [eventDispatcher:protected] => Symfony\Component\EventDispatcher\EventDispatcher Object
                        (
                            [listeners:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                (
                                    [request.sent] => Array
                                        (
                                            [100] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => Guzzle\Http\RedirectPlugin Object
                                                                (
                                                                    [defaultMaxRedirects:protected] => 5
                                                                )

                                                            [1] => onRequestSent
                                                        )

                                                )

                                        )

                                    [request.clone] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => Guzzle\Http\RedirectPlugin Object
                                                                (
                                                                    [defaultMaxRedirects:protected] => 5
                                                                )

                                                            [1] => cleanupRequest
                                                        )

                                                )

                                        )

                                    [request.before_send] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => Guzzle\Http\RedirectPlugin Object
                                                                (
                                                                    [defaultMaxRedirects:protected] => 5
                                                                )

                                                            [1] => cleanupRequest
                                                        )

                                                )

                                        )

                                )

                            [sorted:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                (
                                )

                        )

                )

            [httpRequest:protected] => Symfony\Component\HttpFoundation\Request Object
                (
                    [attributes] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                )

                        )

                    [request] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                    [country] => GB
                                    [authCost] => 50.00
                                    [msgType] => authResult
                                    [routeKey] => VISA-SSL
                                    [transId] => 3053297388
                                    [countryMatch] => S
                                    [rawAuthMessage] => cardbe.msg.authorised
                                    [authCurrency] => GBP
                                    [charenc] => UTF-8
                                    [compName] => HARBOUR CHALLANGE OEC LTD
                                    [rawAuthCode] => A
                                    [amountString] => £50.00
                                    [installation] => 1111374
                                    [currency] => GBP
                                    [tel] => 
                                    [fax] => 
                                    [lang] => en
                                    [countryString] => United Kingdom
                                    [email] => a.elleray1182@gmail.com
                                    [transStatus] => Y
                                    [_SP_charEnc] => UTF-8
                                    [amount] => 50.00
                                    [address] => 0
0

0
0
                                    [transTime] => 1470909096845
                                    [cost] => 50.00
                                    [town] => 0
                                    [address3] => 
                                    [address2] => 0
                                    [address1] => 0
                                    [cartId] => 190
                                    [postcode] => 0
                                    [ipAddress] => 94.192.120.84
                                    [cardType] => Visa
                                    [authAmount] => 50.00
                                    [MC_callback] => https://harbourchallenge.myboxproject.co.uk/shop/thankyou
                                    [authMode] => A
                                    [instId] => 1111374
                                    [displayAddress] => 0
0

0
0
                                    [AAV] => 00000
                                    [testMode] => 100
                                    [name] => Anthony Elleray
                                    [callbackPW] => live2008
                                    [region] => 0
                                    [AVS] => 1111
                                    [desc] => Order #190
                                    [authAmountString] => £50.00
                                )

                        )

                    [query] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                    [msgType] => authResult
                                    [installation] => 1111374
                                )

                        )

                    [server] => Symfony\Component\HttpFoundation\ServerBag Object
                        (
                            [parameters:protected] => Array
                                (
                                    [CONTENT_LENGTH] => 850
                                    [CONTENT_TYPE] => application/x-www-form-urlencoded; charset=UTF-8
                                    [DOCUMENT_ROOT] => /var/sites/h/harbourchallenge.myboxproject.co.uk/public_html
                                    [GATEWAY_INTERFACE] => CGI/1.1
                                    [HTTP_HOST] => harbourchallenge.myboxproject.co.uk
                                    [HTTP_USER_AGENT] => WJHRO/1.0 (WorldPay Java HTTP Request Object)
                                    [HTTP_X_FORWARDED_FOR] => 195.35.90.68
                                    [PATH] => /bin
                                    [QUERY_STRING] => msgType=authResult&installation=1111374
                                    [REDIRECT_QUERY_STRING] => msgType=authResult&installation=1111374
                                    [REDIRECT_STATUS] => 200
                                    [REDIRECT_URL] => /shop/thankyou
                                    [REMOTE_ADDR] => 195.35.90.68
                                    [REMOTE_PORT] => 56013
                                    [REQUEST_METHOD] => POST
                                    [REQUEST_URI] => /shop/thankyou?msgType=authResult&installation=1111374
                                    [SCRIPT_FILENAME] => /var/sites/h/harbourchallenge.myboxproject.co.uk/public_html/perch/core/runway/start.php
                                    [SCRIPT_NAME] => /perch/core/runway/start.php
                                    [SERVER_ADDR] => 10.168.1.161
                                    [SERVER_ADMIN] => you@example.com
                                    [SERVER_NAME] => harbourchallenge.myboxproject.co.uk
                                    [SERVER_PORT] => 80
                                    [SERVER_PROTOCOL] => HTTP/1.0
                                    [SERVER_SIGNATURE] => 
                                    [SERVER_SOFTWARE] => Apache
                                    [PHP_SELF] => /perch/core/runway/start.php
                                    [REQUEST_TIME_FLOAT] => 1470909097.36
                                    [REQUEST_TIME] => 1470909097
                                    [argv] => Array
                                        (
                                            [0] => msgType=authResult&installation=1111374
                                        )

                                    [argc] => 1
                                )

                        )

                    [files] => Symfony\Component\HttpFoundation\FileBag Object
                        (
                            [parameters:protected] => Array
                                (
                                )

                        )

                    [cookies] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                )

                        )

                    [headers] => Symfony\Component\HttpFoundation\HeaderBag Object
                        (
                            [headers:protected] => Array
                                (
                                    [content-length] => Array
                                        (
                                            [0] => 850
                                        )

                                    [content-type] => Array
                                        (
                                            [0] => application/x-www-form-urlencoded; charset=UTF-8
                                        )

                                    [host] => Array
                                        (
                                            [0] => harbourchallenge.myboxproject.co.uk
                                        )

                                    [user-agent] => Array
                                        (
                                            [0] => WJHRO/1.0 (WorldPay Java HTTP Request Object)
                                        )

                                    [x-forwarded-for] => Array
                                        (
                                            [0] => 195.35.90.68
                                        )

                                )

                            [cacheControl:protected] => Array
                                (
                                )

                        )

                    [content:protected] => 
                    [languages:protected] => 
                    [charsets:protected] => 
                    [encodings:protected] => 
                    [acceptableContentTypes:protected] => 
                    [pathInfo:protected] => 
                    [requestUri:protected] => 
                    [baseUrl:protected] => 
                    [basePath:protected] => 
                    [method:protected] => 
                    [format:protected] => 
                    [session:protected] => 
                    [locale:protected] => 
                    [defaultLocale:protected] => en
                )

            [response:protected] => Omnipay\WorldPay\Message\CompletePurchaseResponse Object
 *RECURSION*
            [zeroAmountAllowed:protected] => 1
            [negativeAmountAllowed:protected] => 
        )

    [data:protected] => Array
        (
            [country] => GB
            [authCost] => 50.00
            [msgType] => authResult
            [routeKey] => VISA-SSL
            [transId] => 3053297388
            [countryMatch] => S
            [rawAuthMessage] => cardbe.msg.authorised
            [authCurrency] => GBP
            [charenc] => UTF-8
            [compName] => HARBOUR CHALLANGE OEC LTD
            [rawAuthCode] => A
            [amountString] => £50.00
            [installation] => 1111374
            [currency] => GBP
            [tel] => 
            [fax] => 
            [lang] => en
            [countryString] => United Kingdom
            [email] => a.elleray1182@gmail.com
            [transStatus] => Y
            [_SP_charEnc] => UTF-8
            [amount] => 50.00
            [address] => 0
0

0
0
            [transTime] => 1470909096845
            [cost] => 50.00
            [town] => 0
            [address3] => 
            [address2] => 0
            [address1] => 0
            [cartId] => 190
            [postcode] => 0
            [ipAddress] => 94.192.120.84
            [cardType] => Visa
            [authAmount] => 50.00
            [MC_callback] => https://harbourchallenge.myboxproject.co.uk/shop/thankyou
            [authMode] => A
            [instId] => 1111374
            [displayAddress] => 0
0

0
0
            [AAV] => 00000
            [testMode] => 100
            [name] => Anthony Elleray
            [callbackPW] => live2008
            [region] => 0
            [AVS] => 1111
            [desc] => Order #190
            [authAmountString] => £50.00
        )

)
Request time: 5.5183
Process time: 5.4876
Memory: 8.7775
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great - and is it all marked as paid and looking like it should?

That order got saved in the admin area

Drew McLellan said:

Ok, great - and is it all marked as paid and looking like it should?

yes all saved marked as paid

no idea why its saying sorry but does that with paypal too

Drew McLellan

Drew McLellan 2638 points
Perch Support

I can't deal with both at once.

In this case it's because the user viewing the result page is the WorldPay server and not the customer. perch_shop_order_successful() just won't work in this circumstance because it's a brand new request with no context.

I'll see if I can get the gateway to assign that context to make the behaviour consistent.

That is ok Paypal has been inconsistent for me for ages.

but thank you for your help with world pay

transactions are working as perfectly and sending emails like it should

Drew McLellan

Drew McLellan 2638 points
Perch Support

Give this one a try:

<?php

class PerchShopGateway_worldpay extends PerchShopGateway_default
{
    protected $slug = 'worldpay';
    public $omnipay_name = 'WorldPay';

    public function set_credentials(&$Omnipay, $config)
    {
        if ($config['test_mode']) {
            $Omnipay->setInstallationId($config['test']['installationId']);
            $Omnipay->setAccountId($config['test']['accountId']);
            $Omnipay->setSecretWord($config['test']['secretWord']);
            $Omnipay->setCallbackPassword($config['test']['callbackPassword']);
            $Omnipay->setTestMode(true);
        }else{
            $Omnipay->setInstallationId($config['live']['installationId']);
            $Omnipay->setAccountId($config['live']['accountId']);
            $Omnipay->setSecretWord($config['live']['secretWord']);
            $Omnipay->setCallbackPassword($config['live']['callbackPassword']);
            $Omnipay->setTestMode(false);
        }
    }

    public function get_order_from_env($Orders, $get, $post)
    {
        if (isset($post['cartId'])) {
            $Order = $Orders->find($post['cartId']);
            if ($Order) {
                PerchShop_Session::set('shop_order_id', $Order->id());
                return $Order;
            }   
        }
        return false;
    }

    public function callback_looks_valid($get, $post)
    {
        if (isset($post['cartId']) && isset($post['transStatus']) && $post['transStatus'] == 'Y') {
            return true;
        }
        return false;
    }

    public function action_payment_callback($Order, $args, $gateway_opts)
    {
        $result = $this->complete_payment($Order, $args);
        PerchUtil::debug($result);
    }
}

Looks like that worked

Thank you for your order!

POST:
Array
(
    [country] => GB
    [authCost] => 200.00
    [msgType] => authResult
    [routeKey] => VISA-SSL
    [transId] => 3053299354
    [countryMatch] => S
    [rawAuthMessage] => cardbe.msg.authorised
    [authCurrency] => GBP
    [charenc] => UTF-8
    [compName] => HARBOUR CHALLANGE OEC LTD
    [rawAuthCode] => A
    [amountString] => £200.00
    [installation] => 1111374
    [currency] => GBP
    [tel] => 
    [fax] => 
    [lang] => en
    [countryString] => United Kingdom
    [email] => a.elleray1182@gmail.com
    [transStatus] => Y
    [_SP_charEnc] => UTF-8
    [amount] => 200.00
    [address] => 0
0

0
0
    [transTime] => 1470910800516
    [cost] => 200.00
    [town] => 0
    [address3] => 
    [address2] => 0
    [address1] => 0
    [cartId] => 199
    [postcode] => 0
    [ipAddress] => 94.192.120.84
    [cardType] => Visa
    [authAmount] => 200.00
    [MC_callback] => https://harbourchallenge.myboxproject.co.uk/shop/thankyou
    [authMode] => A
    [instId] => 1111374
    [displayAddress] => 0
0

0
0
    [AAV] => 00000
    [testMode] => 100
    [name] => Anthony Elleray
    [callbackPW] => live2008
    [region] => 0
    [AVS] => 1111
    [desc] => Order #199
    [authAmountString] => £200.00
)
---------------------------------------------
GET:
Array
(
    [msgType] => authResult
    [installation] => 1111374
)
Debug Message
[26] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Matched page: /shop/thankyou, so not using routes.
Using master page: /templates/pages/shop/thankyou.php
[1] SELECT * FROM perch2_pages WHERE pagePath='/shop/thankyou' LIMIT 1
[28] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT locationID FROM perch2_shop_tax_locations WHERE locationIsHome=1 LIMIT 1
INSERT INTO perch2_shop_cart(memberID,locationID,currencyID,cartPricing,cartProperties) VALUES(NULL,'1',47,'standard','[]')
[1] SELECT * FROM perch2_shop_cart WHERE cartID=411
[1] SELECT * FROM perch2_shop_cart WHERE cartID=411
Runtime complete_payment for worldpay
[1] SELECT * FROM perch2_shop_orders WHERE orderID='199' AND orderDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_currencies WHERE currencyID='47' LIMIT 1
Payment successful
UPDATE perch2_shop_orders SET orderGatewayRef='3053299354', orderUpdated='2016-08-11 11:20:02' WHERE orderID='199'
No ids to log.
UPDATE perch2_shop_orders_meta SET metaValue=last_insert_id(metaValue+1) WHERE id='last_invoice_number'
[1] SELECT last_insert_id()
UPDATE perch2_shop_orders SET orderInvoiceNumber='Order-84', orderUpdated='2016-08-11 11:20:02' WHERE orderID='199'
No ids to log.
Setting order status to paid
UPDATE perch2_shop_orders SET orderDynamicFields='{\"status\":\"paid\"}', orderStatus='paid', orderUpdated='2016-08-11 11:20:02' WHERE orderID='199'
No ids to log.
[1] SELECT * FROM perch2_shop_addresses WHERE addressID='532' AND addressDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_tax_locations WHERE locationDeleted IS NULL AND ((countryID=0 AND regionID IS NULL) OR locationIsDefault=1) ORDER BY locationIsDefault ASC LIMIT 1
Looking up missing property address_1
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property address_2
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property city
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property county
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property postcode
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
INSERT INTO perch2_shop_tax_exhibits(orderID,exhibitType,exhibitDetail,exhibitSource,locationID,countryID,exhibitDate) VALUES(199,'BILL_ADDRESS',', ','Customer','1','0','2016-08-11 10:20:02')
[1] SELECT * FROM perch2_shop_tax_exhibits WHERE exhibitID='509' LIMIT 1
No ids to log.
UPDATE perch2_shop_tax_exhibits SET orderID=199, exhibitType='BILL_ADDRESS', exhibitDetail=', ', exhibitSource='Customer', locationID='1', countryID='0', exhibitDate='2016-08-11 10:20:02' WHERE exhibitID='509'
No ids to log.
[1] SELECT * FROM perch2_shop_addresses WHERE addressID='533' AND addressDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_tax_locations WHERE locationDeleted IS NULL AND ((countryID=0 AND regionID IS NULL) OR locationIsDefault=1) ORDER BY locationIsDefault ASC LIMIT 1
Looking up missing property address_1
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property address_2
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property city
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property county
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
Looking up missing property postcode
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
INSERT INTO perch2_shop_tax_exhibits(orderID,exhibitType,exhibitDetail,exhibitSource,locationID,countryID,exhibitDate) VALUES(199,'SHIP_ADDRESS',', ','Customer','1','0','2016-08-11 10:20:02')
[1] SELECT * FROM perch2_shop_tax_exhibits WHERE exhibitID='510' LIMIT 1
No ids to log.
UPDATE perch2_shop_tax_exhibits SET orderID=199, exhibitType='SHIP_ADDRESS', exhibitDetail=', ', exhibitSource='Customer', locationID='1', countryID='0', exhibitDate='2016-08-11 10:20:02' WHERE exhibitID='510'
No ids to log.
[1] SELECT * FROM perch2_shop_order_statuses WHERE statusKey='paid' AND statusActive=1 AND statusDeleted IS NULL
[1] SELECT * FROM perch2_shop_emails WHERE emailStatus=3 AND emailActive=1
Sending customer email
[1] SELECT * FROM perch2_shop_customers WHERE customerID='1' AND customerDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_members WHERE memberID='16' LIMIT 1
Using email template: /var/sites/h/harbourchallenge.myboxproject.co.uk/public_html/perch/templates/shop/emails/order_paid.html (html)
[1] SELECT * FROM perch2_shop_order_statuses WHERE statusKey='paid' AND statusDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_addresses WHERE addressID=533 AND addressDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
[1] SELECT * FROM perch2_shop_addresses WHERE addressID=532 AND addressDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_countries WHERE countryID='0' LIMIT 1
No country set for address
[1] SELECT * FROM perch2_shop_order_items WHERE orderID='199' ORDER BY itemID ASC
[1] SELECT * FROM perch2_shop_order_statuses WHERE statusKey='paid' AND statusDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_currencies WHERE currencyID=47 LIMIT 1
[1] SELECT * FROM perch2_shop_shippings WHERE shippingID=0 AND shippingDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_products WHERE productID=3 AND productDeleted IS NULL LIMIT 1
Looking up missing property sender_name
Looking up missing property sender_email
Building message with Perch template
[1] Using template: /templates/shop/emails/order_paid.html
Using sub-template: /templates/shop/emails/email.html
Using sub-template: /templates/shop/emails/_email_header.html
[1] Using sub-template: /templates/shop/emails/_email_footer.html
[28] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Sent email: "Thank you for your order" to a.elleray1182@gmail.com
[1] SELECT p.*, oi.itemQty FROM perch2_shop_order_items oi, perch2_shop_products p WHERE oi.productID = p.productID AND oi.orderID='199'
[1] SELECT * FROM perch2_shop_customers WHERE customerID='1' AND customerDeleted IS NULL LIMIT 1
UPDATE perch2_shop_products SET stock_level=0, productUpdated='2016-08-11 11:20:03' WHERE productID='3'
No ids to log.
[nil] SELECT * FROM perch2_shop_product_tags WHERE productID=3 AND tagDeleted IS NULL ORDER BY tagOrder ASC
[1] SELECT * FROM perch2_shop_currencies WHERE currencyActive=1 AND currencyID=47
UPDATE perch2_shop_orders SET orderExchangeRate=1, orderUpdated='2016-08-11 11:20:03' WHERE orderID='199'
No ids to log.
Omnipay\WorldPay\Message\CompletePurchaseResponse Object
(
    [request:protected] => Omnipay\WorldPay\Message\CompletePurchaseRequest Object
        (
            [liveEndpoint:protected] => https://secure.worldpay.com/wcc/purchase
            [testEndpoint:protected] => https://secure-test.worldpay.com/wcc/purchase
            [parameters:protected] => Symfony\Component\HttpFoundation\ParameterBag Object
                (
                    [parameters:protected] => Array
                        (
                            [installationId] => 1111374
                            [accountId] => HARBOURCHALLM1
                            [secretWord] => Ae931d957A23c10c0583c9d2bX$
                            [callbackPassword] => live2008
                            [testMode] => 1
                            [amount] => 200.00
                            [currency] => GBP
                        )

                )

            [httpClient:protected] => Guzzle\Http\Client Object
                (
                    [defaultHeaders:protected] => Guzzle\Common\Collection Object
                        (
                            [data:protected] => Array
                                (
                                )

                        )

                    [userAgent:protected] => Guzzle/3.9.3 curl/7.41.0 PHP/5.5.26
                    [config:Guzzle\Http\Client:private] => Guzzle\Common\Collection Object
                        (
                            [data:protected] => Array
                                (
                                    [curl.options] => Array
                                        (
                                            [78] => 60
                                            [10065] => /var/sites/h/harbourchallenge.myboxproject.co.uk/public_html/perch/addons/apps/perch_shop/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem
                                            [64] => 1
                                            [81] => 2
                                        )

                                )

                        )

                    [baseUrl:Guzzle\Http\Client:private] => 
                    [curlMulti:Guzzle\Http\Client:private] => 
                    [uriTemplate:Guzzle\Http\Client:private] => 
                    [requestFactory:protected] => Guzzle\Http\Message\RequestFactory Object
                        (
                            [methods:protected] => Array
                                (
                                    [getInstance] => 0
                                    [__construct] => 1
                                    [fromMessage] => 2
                                    [fromParts] => 3
                                    [create] => 4
                                    [cloneRequestWithMethod] => 5
                                    [applyOptions] => 6
                                    [visit_headers] => 7
                                    [visit_body] => 8
                                    [visit_allow_redirects] => 9
                                    [visit_auth] => 10
                                    [visit_query] => 11
                                    [visit_cookies] => 12
                                    [visit_events] => 13
                                    [visit_plugins] => 14
                                    [visit_exceptions] => 15
                                    [visit_save_to] => 16
                                    [visit_params] => 17
                                    [visit_timeout] => 18
                                    [visit_connect_timeout] => 19
                                    [visit_debug] => 20
                                    [visit_verify] => 21
                                    [visit_proxy] => 22
                                    [visit_cert] => 23
                                    [visit_ssl_key] => 24
                                )

                            [requestClass:protected] => Guzzle\Http\Message\Request
                            [entityEnclosingRequestClass:protected] => Guzzle\Http\Message\EntityEnclosingRequest
                        )

                    [eventDispatcher:protected] => Symfony\Component\EventDispatcher\EventDispatcher Object
                        (
                            [listeners:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                (
                                    [request.sent] => Array
                                        (
                                            [100] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => Guzzle\Http\RedirectPlugin Object
                                                                (
                                                                    [defaultMaxRedirects:protected] => 5
                                                                )

                                                            [1] => onRequestSent
                                                        )

                                                )

                                        )

                                    [request.clone] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => Guzzle\Http\RedirectPlugin Object
                                                                (
                                                                    [defaultMaxRedirects:protected] => 5
                                                                )

                                                            [1] => cleanupRequest
                                                        )

                                                )

                                        )

                                    [request.before_send] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => Guzzle\Http\RedirectPlugin Object
                                                                (
                                                                    [defaultMaxRedirects:protected] => 5
                                                                )

                                                            [1] => cleanupRequest
                                                        )

                                                )

                                        )

                                )

                            [sorted:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                (
                                )

                        )

                )

            [httpRequest:protected] => Symfony\Component\HttpFoundation\Request Object
                (
                    [attributes] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                )

                        )

                    [request] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                    [country] => GB
                                    [authCost] => 200.00
                                    [msgType] => authResult
                                    [routeKey] => VISA-SSL
                                    [transId] => 3053299354
                                    [countryMatch] => S
                                    [rawAuthMessage] => cardbe.msg.authorised
                                    [authCurrency] => GBP
                                    [charenc] => UTF-8
                                    [compName] => HARBOUR CHALLANGE OEC LTD
                                    [rawAuthCode] => A
                                    [amountString] => £200.00
                                    [installation] => 1111374
                                    [currency] => GBP
                                    [tel] => 
                                    [fax] => 
                                    [lang] => en
                                    [countryString] => United Kingdom
                                    [email] => a.elleray1182@gmail.com
                                    [transStatus] => Y
                                    [_SP_charEnc] => UTF-8
                                    [amount] => 200.00
                                    [address] => 0
0

0
0
                                    [transTime] => 1470910800516
                                    [cost] => 200.00
                                    [town] => 0
                                    [address3] => 
                                    [address2] => 0
                                    [address1] => 0
                                    [cartId] => 199
                                    [postcode] => 0
                                    [ipAddress] => 94.192.120.84
                                    [cardType] => Visa
                                    [authAmount] => 200.00
                                    [MC_callback] => https://harbourchallenge.myboxproject.co.uk/shop/thankyou
                                    [authMode] => A
                                    [instId] => 1111374
                                    [displayAddress] => 0
0

0
0
                                    [AAV] => 00000
                                    [testMode] => 100
                                    [name] => Anthony Elleray
                                    [callbackPW] => live2008
                                    [region] => 0
                                    [AVS] => 1111
                                    [desc] => Order #199
                                    [authAmountString] => £200.00
                                )

                        )

                    [query] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                    [msgType] => authResult
                                    [installation] => 1111374
                                )

                        )

                    [server] => Symfony\Component\HttpFoundation\ServerBag Object
                        (
                            [parameters:protected] => Array
                                (
                                    [CONTENT_LENGTH] => 856
                                    [CONTENT_TYPE] => application/x-www-form-urlencoded; charset=UTF-8
                                    [DOCUMENT_ROOT] => /var/sites/h/harbourchallenge.myboxproject.co.uk/public_html
                                    [GATEWAY_INTERFACE] => CGI/1.1
                                    [HTTP_HOST] => harbourchallenge.myboxproject.co.uk
                                    [HTTP_USER_AGENT] => WJHRO/1.0 (WorldPay Java HTTP Request Object)
                                    [HTTP_X_FORWARDED_FOR] => 195.35.90.68
                                    [PATH] => /bin
                                    [QUERY_STRING] => msgType=authResult&installation=1111374
                                    [REDIRECT_QUERY_STRING] => msgType=authResult&installation=1111374
                                    [REDIRECT_STATUS] => 200
                                    [REDIRECT_URL] => /shop/thankyou
                                    [REMOTE_ADDR] => 195.35.90.68
                                    [REMOTE_PORT] => 47621
                                    [REQUEST_METHOD] => POST
                                    [REQUEST_URI] => /shop/thankyou?msgType=authResult&installation=1111374
                                    [SCRIPT_FILENAME] => /var/sites/h/harbourchallenge.myboxproject.co.uk/public_html/perch/core/runway/start.php
                                    [SCRIPT_NAME] => /perch/core/runway/start.php
                                    [SERVER_ADDR] => 10.170.0.32
                                    [SERVER_ADMIN] => you@example.com
                                    [SERVER_NAME] => harbourchallenge.myboxproject.co.uk
                                    [SERVER_PORT] => 80
                                    [SERVER_PROTOCOL] => HTTP/1.0
                                    [SERVER_SIGNATURE] => 
                                    [SERVER_SOFTWARE] => Apache
                                    [PHP_SELF] => /perch/core/runway/start.php
                                    [REQUEST_TIME_FLOAT] => 1470910802.6
                                    [REQUEST_TIME] => 1470910802
                                    [argv] => Array
                                        (
                                            [0] => msgType=authResult&installation=1111374
                                        )

                                    [argc] => 1
                                )

                        )

                    [files] => Symfony\Component\HttpFoundation\FileBag Object
                        (
                            [parameters:protected] => Array
                                (
                                )

                        )

                    [cookies] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                )

                        )

                    [headers] => Symfony\Component\HttpFoundation\HeaderBag Object
                        (
                            [headers:protected] => Array
                                (
                                    [content-length] => Array
                                        (
                                            [0] => 856
                                        )

                                    [content-type] => Array
                                        (
                                            [0] => application/x-www-form-urlencoded; charset=UTF-8
                                        )

                                    [host] => Array
                                        (
                                            [0] => harbourchallenge.myboxproject.co.uk
                                        )

                                    [user-agent] => Array
                                        (
                                            [0] => WJHRO/1.0 (WorldPay Java HTTP Request Object)
                                        )

                                    [x-forwarded-for] => Array
                                        (
                                            [0] => 195.35.90.68
                                        )

                                )

                            [cacheControl:protected] => Array
                                (
                                )

                        )

                    [content:protected] => 
                    [languages:protected] => 
                    [charsets:protected] => 
                    [encodings:protected] => 
                    [acceptableContentTypes:protected] => 
                    [pathInfo:protected] => 
                    [requestUri:protected] => 
                    [baseUrl:protected] => 
                    [basePath:protected] => 
                    [method:protected] => 
                    [format:protected] => 
                    [session:protected] => 
                    [locale:protected] => 
                    [defaultLocale:protected] => en
                )

            [response:protected] => Omnipay\WorldPay\Message\CompletePurchaseResponse Object
 *RECURSION*
            [zeroAmountAllowed:protected] => 1
            [negativeAmountAllowed:protected] => 
        )

    [data:protected] => Array
        (
            [country] => GB
            [authCost] => 200.00
            [msgType] => authResult
            [routeKey] => VISA-SSL
            [transId] => 3053299354
            [countryMatch] => S
            [rawAuthMessage] => cardbe.msg.authorised
            [authCurrency] => GBP
            [charenc] => UTF-8
            [compName] => HARBOUR CHALLANGE OEC LTD
            [rawAuthCode] => A
            [amountString] => £200.00
            [installation] => 1111374
            [currency] => GBP
            [tel] => 
            [fax] => 
            [lang] => en
            [countryString] => United Kingdom
            [email] => a.elleray1182@gmail.com
            [transStatus] => Y
            [_SP_charEnc] => UTF-8
            [amount] => 200.00
            [address] => 0
0

0
0
            [transTime] => 1470910800516
            [cost] => 200.00
            [town] => 0
            [address3] => 
            [address2] => 0
            [address1] => 0
            [cartId] => 199
            [postcode] => 0
            [ipAddress] => 94.192.120.84
            [cardType] => Visa
            [authAmount] => 200.00
            [MC_callback] => https://harbourchallenge.myboxproject.co.uk/shop/thankyou
            [authMode] => A
            [instId] => 1111374
            [displayAddress] => 0
0

0
0
            [AAV] => 00000
            [testMode] => 100
            [name] => Anthony Elleray
            [callbackPW] => live2008
            [region] => 0
            [AVS] => 1111
            [desc] => Order #199
            [authAmountString] => £200.00
        )

)
[1] SELECT * FROM perch2_shop_orders WHERE orderID=199 AND orderDeleted IS NULL LIMIT 1
Is paid?
Request time: 0.5377
Process time: 0.5373
Memory: 8.7858
Drew McLellan

Drew McLellan 2638 points
Perch Support

Great.

Drew McLellan said:

Great.

Top Man

Thanks Sooooo Much :)