Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6981263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:08:02+00:00 2026-05-27T18:08:02+00:00

I am developing a site for a client and one of the requirements is

  • 0

I am developing a site for a client and one of the requirements is to integrate worldpay payments for the purchasing process.

Once the user has completed payment for a product I need to alert a licencing system to the completed payment. The worldpay documentation gives an overview of the payment response service but does not give a code example.

I have had the client set up the payment response option in their test installation but would rather not have to go about coding my own page to handle the response if someone else has already done it. Does anyone have a link to a good code example (in php)?? I have had a decent look online and have not turned up much.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:08:02+00:00Added an answer on May 27, 2026 at 6:08 pm

    Problem solved. I ended up creating a custom class to handle the response from worldpay. Here is a simplified version of my handler page in case anyone else might find it useful.

    (Note: I am not really a php developer so some syntax might be a bit dodgy!)

    <?php //Worldpay 
    
    // class definition
    class WorldPay_Response {
        // define properties
        public $transaction_id = null;
        public $transaction_status = null;
        public $transaction_time = null;
        public $authorisation_amount = null;
        public $authorisation_currency = null;
        public $authorisation_amount_string = null;
        public $raw_auth_message = null;
        public $raw_auth_code = null;
        public $callback_password = null;
        public $card_type = null;
        public $authentication = null;
        public $ip_address = null;
        public $character_encoding = null;
        public $future_payment_id = null;
        public $future_payment_status_change = null;
    
        //custom properties not included by worldpay
        public $mc_custom_property = null;
    
        // constructor
        public function __construct() {
            $this->transaction_id = $_POST['transId'];
            $this->transaction_status = $_POST['transStatus']; //should be either Y (successful) or C (cancelled)
            $this->transaction_time = $_POST['transTime'];
            $this->authorisation_amount = $_POST['authAmount'];
            $this->authorisation_currency = $_POST['authCurrency'];
            $this->authorisation_amount_string = $_POST['authAmountString'];
            $this->raw_auth_message = $_POST['rawAuthMessage'];
            $this->raw_auth_code = $_POST['rawAuthCode'];
            $this->callback_password = $_POST['callbackPW'];
            $this->card_type = $_POST['cardType'];
            $this->country_match = $_POST['countryMatch']; //Y - Match, N - Mismatch, B - Not Available, I - Country not supplied, S - Issue Country not available
            $this->waf_merchant_message = $_POST['wafMerchMessage'];
            $this->authentication = $_POST['authentication'];
            $this->ip_address = $_POST['ipAddress'];
            $this->character_encoding = $_POST['charenc'];
            $this->future_payment_id = $_POST['futurePayId'];
            $this->future_payment_status_change = $_POST['futurePayStatusChange'];
    
            //custom properties
            $this->mc_custom_property = $_POST['MC_custom_property'];
    
        }
    }
    
    ?>
    <html>
    <head><title>Thank you for your payment</title></head>
    <WPDISPLAY FILE="header.html">
    
    <?php
    //Response from Worldpay
    $wp_response = new WorldPay_Response();
    
    
        if($wp_response->transaction_status == "Y"){ ?>
    
                <strong>Transaction Details</strong><br />
         <?php
                echo "Worldpay Transaction id: " . $wp_response->transaction_id . "<br />";
                echo "Payment Status: " . $wp_response->transaction_status . "<br />";
                echo "Transaction Time: " . $wp_response->transaction_time . "<br />";
                echo "Amount: " . $wp_response->authorisation_amount_string . "<br />";
                echo "IP Address: " . $wp_response->ip_address . "<br /><br />"; 
            }else if($wp_response->transaction_status == "C") { ?>
                <strong>Transaction Cancelled</strong>
    <?php } else { ?>
            Your transaction was unsuccessful.
    <?php } ?>
    <WPDISPLAY ITEM="banner">
    <WPDISPLAY FILE="footer.html">
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site I am developing which my client has alerted me to
I am currently developing a site for a client which uses the JQuery cycle
I'm developing this site here for a client of mine: http://test.bebiafricanhairbraiding.com/osa/index.html I've encountered a
Ambiguous question, I know. But anyway, I'm developing a client's site that will enable
I'm developing a site which has urls like this: site.com/james site.com/james/photos Schema for this
I am developing a site for a client and they currently own two domains.
I am developing one site in Indian language (Gujarati). My problem is as below:
I'm developing a site that allows a user to create an order for a
I am currently developing a site for a client (http://184.168.136.225/). Having some issues with
We're developing a site for a client right now and my boss (designer only)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.