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 8313169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:24:06+00:00 2026-06-08T20:24:06+00:00

I am coding a script to read the response given from a payment gateway

  • 0

I am coding a script to read the response given from a payment gateway after a transaction is done.
http://docs.merchee.com/api/push-notifications/index.html

The example data I am getting is

$received_values = "
    status_code PAID
    subtotal 10
    success_redirect http://site.com/thanks
    tax_total 0
    total_price 10
    transaction_amount 10
    transaction_date 07/24/2012
    transaction_nmb 101888
    transaction_time 12:43:52
    zip 12345 
";

I am specifically looking for the lines transaction_nmb and status_code.

I’m thinking I do something like so:

$received_values = (array) stripslashes_deep( $_POST );

But am stuck on how I should go about confirming it.. in_array?

Thank you.

  • 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-08T20:24:08+00:00Added an answer on June 8, 2026 at 8:24 pm

    Since it looks like $received_values is a newline separated string, maybe you could use this regex (untested) to get the values?

    preg_match_all('/status_code\s(\w+).+transaction_nmb\s(\d+)/',$received_values, $matches);
    // PAID should be in $matches[1]
    // 101888 should be in $matches[2]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is my script # -*- coding: utf-8 -*- from BeautifulSoup import BeautifulSoup import
I would like a PHP script to read the contents from a CSV file
I am coding a script in which the user selects a range of data,
I came across a confusing fact during coding a script. How can i find
I want to use the cpplint.py script to get coding style errors on the
I'm looking for a script/tool that can be customized to check and enforce coding/naming
After coding and testing a Java application (lets say with Eclipse, but not necessarily)
From everything I've read on using Perl modules, the basic usage is: Module file
I am coding a python script that parses a text file. The format of
I use a modified script from Logging into facebook with python post : #!/usr/bin/python2

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.