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

  • SEARCH
  • Home
  • 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 8444693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:27:36+00:00 2026-06-10T09:27:36+00:00

Hi I got this function: public static function consumeMessage($xml, $debug = 1) { $xml

  • 0

Hi I got this function:

public static function consumeMessage($xml, $debug = 1) {
    $xml = stripslashes(urldecode($xml));
    $rq = OpenPayU::parseOpenPayUDocument($xml);    

    $msg = $rq['OpenPayU']['OrderDomainRequest'];

    switch (key($msg)) {
        case 'OrderNotifyRequest':
            return OpenPayU_Order::consumeNotification($xml);
            break;
        case 'ShippingCostRetrieveRequest':
            return OpenPayU_Order::consumeShippingCostRetrieveRequest($xml);
            break;
        default:
            return key($smg);
            break;
    }
}

which I calling like this:

$result = OpenPayU_Order::retrieve($result->sessionId);

And write to file in this way:

write_to_file("debug.txt", "order details: \n\n " .
serialize($result->response) . "\n\n");

In the output I got:

a:1:{s:8:”OpenPayU”;a:2:{s:14:”HeaderResponse”;a:3:{s:10:”SenderName”;s:8:”checkout”;s:7:”Version”;s:3:”1.0″;s:9:”Algorithm”;s:3:”MD5″;}s:19:”OrderDomainResponse”;a:1:{s:21:”OrderRetrieveResponse”;a:8:{s:5:”ResId”;s:32:”28444ffd9de5489e08a32e6cd51274a5″;s:6:”Status”;a:1:{s:10:”StatusCode”;s:16:”OPENPAYU_SUCCESS”;}s:13:”MerchantPosId”;s:5:”37857″;s:9:”SessionId”;s:32:”55a6d45cc0fef40ce95e9c1321b19b13″;s:14:”CustomerRecord”;a:6:{s:10:”CustomerId”;s:8:”nyi3iw6v”;s:5:”Email”;s:28:”netprofile@netprofile.com.pl”;s:5:”Phone”;s:15:”(+48)
786265656″;s:9:”FirstName”;s:5:”mieta”;s:8:”LastName”;s:5:”mieta”;s:8:”Language”;s:2:”pl”;}s:11:”OrderStatus”;s:20:”ORDER_STATUS_PENDING”;s:12:”CurrencyCode”;s:3:”PLN”;s:7:”PayType”;s:1:”t”;}}}}

But I need get almost every value sepateted, f.ex: ‘StatusCode’ and save it to database, is there any way to get it without regular expressions?

I trying get it like $result->response[‘statuscode’]; but I get nothing

  • 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-06-10T09:27:38+00:00Added an answer on June 10, 2026 at 9:27 am

    If you want to unserialize the string from file, do

    $array = unserialize(file_get_contents('/path/to/file'));
    

    This will give you the array that was in $result->response, which you can access like any other multidimensional array, e.g.

    $responseData = $result->response;
    echo $responseData["OpenPayU"]["HeaderResponse"]["SenderName"];
    …
    

    If you don’t know how to access a multidimensional array, please refer to the PHP Manual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Got this error while call the function static public void DisplayAJAXMessage(Control page, string msg)
I have got this function: public static function insert_user($user) { $con = mysql_connect(localhost,root,) or
I've got this function public static AdoEntity.Inspector GetInspectorWithInclude(int id, List<string> properties) { using (var
I wrote this utility function: public static <T> List<T> pluck(String fieldName, List list) throws
I got a doubt while doing this: class Logger { public static $log_INFO =
I've got the following function: public static extern uint FILES_GetMemoryMapping( [MarshalAs(UnmanagedType.LPStr)] string pPathFile, out
I got this function to split string but it's giving the spited string in
In the end, I got this function. I don't know whether it's normal or
I got this code: function zeroPad(num, places) { var zero = places - num.toString().length
I have got this code: function init(){ if (typeof window.jQuery !== 'function') { var

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.