Forum

Thread tagged as: Question, Shop

Worldpay Test Mode

Hi

Does Worldpay work in test mode ?

I know its not finished but wondered if i could start doing tests as at the moment i keep getting this message

The MD5 signature could not be verified.

Thanks

Ant

Anthony Elleray

Anthony Elleray 2 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

When and where do you get that message? Is that the full message?

It's after I'm redirected to worldpay First worldpay screen I see

Drew McLellan

Drew McLellan 2638 points
Perch Support

So you're getting that message on a WorldPay page? What's the URL?

What values are you using for perch_shop_checkout()?

Yes on a worldpay page

https://secure-test.worldpay.com/wcc/purchase?instId=1111374&accId1=HARBOURCHALL&cartId=153&desc=Order+%23153&amount=270.00&currency=GBP&testMode=100&MC_callback=http%3A%2F%2Fharbourchallenge.myboxproject.co.uk%2Fshop%2Fthankyou&name=Anthony+Elleray&address1=0&address2=0&town=0&region=0&postcode=0&country=0&email=a.elleray1182%40gmail.com&signatureFields=instId%3Aamount%3Acurrency%3AcartId&signature=cf04e621c7e32088781aa313e640322a
<?php
if (perch_member_logged_in()) {

  // your 'success' return URL
  $return_url = 'https://harbourchallenge.myboxproject.co.uk/shop/thankyou';
  $cancel_url = 'https://harbourchallenge.myboxproject.co.uk/';

  perch_shop_checkout('worldpay', [
    'return_url' => $return_url,
    'cancel_url' => $cancel_url,
  ]);
}
?>
Drew McLellan

Drew McLellan 2638 points
Perch Support

What type of WorldPay account do you have?

Im not sure as its not mine - but i do have access

the Installation is a Select Junior

Drew McLellan said:

What type of WorldPay account do you have?

What account type do i need for this setup - i can phone up and double check and get it organised with worldpay

Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't know :) I don't have a WorldPay account, so I'm just trying to figure it out.

In your config/shop.php file, do you have all four values set?

'installationId'   => '',
'accountId'        => '',
'secretWord'       => '',
'callbackPassword' => '',

Did those labels match up to the credentials that WorldPay have given you?

Yes that is all set in shop.php

its all correct

Drew McLellan

Drew McLellan 2638 points
Perch Support

it was a issue worldpay end :)

payments are working but come back failed for me but this could be a website issue as they failed with paypal

Drew McLellan said:

Do these instructions make any sense?

https://support.worldpay.com/support/kb/bg/paymentresponse/pr5502.html

yes i have this

<wpdisplay item=MC_callback> in payment responce

Drew McLellan

Drew McLellan 2638 points
Perch Support

This may or may not be useful: https://github.com/paypal/TLS-update#php

Drew McLellan said:

This may or may not be useful: https://github.com/paypal/TLS-update#php

came back ok

PayPal_Connection_OKbool(true)

Wordplay appears to be half working

it sends me back to

https://secure-test.worldpay.com/wcc/card?op-simulated&PaymentID=ukdc1-pz-cen07-dppr-1470840058475

it looks like my thankyou.php but theres not styling to the page

just checking if its a worldpay redirect issue

Ok payments from worldpay are going through as successful

but having the same issue as i did with PayPal on my lifeboat website where perch says they have failed

Rachel Andrew

Rachel Andrew 394 points
Perch Support

So that sounds like a logic error in your code then, if it is happening with any provider.

my logic is the same as whats on the documentation page so my thnakyou page is

<?php
perch_layout('global/header', [
    'body-class' => 'thankyou',
]);

perch_shop_complete_payment('worldpay');

if (perch_shop_order_successful()) {
  echo '<h1>Thank you for your order!</h1>';
}else{
  echo '<h1>Sorry!</h1>';
}

perch_layout('global/footer'); 
?>
Drew McLellan

Drew McLellan 2638 points
Perch Support

What does debug output at that point?