We help IT Professionals succeed at work.
Get Started

display result/receipt

Shawn asked
Last Modified: 2013-12-24
I am setting up the hosted payment solution with coldfusion. On my site I have a submit button that goes to another page on my website to insert client data into our database then post the required information to the merchant. I have managed to do the initial post to register the card and do the first payment transaction. The returned data is a little confusing (below). Would you have a simple example of retrieving the fields with data and displaying a receipt?

Any suggestions?

the code:
        keyArray = structKeyArray(response_struct);

        for( i=1; i LTE arrayLen(keyArray); i=i+1 )
            if( (keyArray[i] eq "ResolveData") and (arrayLen(response_struct['ResolveData']) GT 0))
                resolveDataKeyArray = structKeyArray(resolver_response_struct[j]);

                for( k=1; k LTE arrayLen(resolveDataKeyArray); k=k+1)
                    if (structFind(resolver_response_struct[j], resolveDataKeyArray[k]) IS NOT "")
                        writeoutput( "<br>" & resolveDataKeyArray[k] & " is:_________" & structFind(resolver_response_struct[j], resolveDataKeyArray[k]) );

                if (structFind(response_struct, keyArray[i]) IS NOT "")
                    writeoutput( "<br>" & keyArray[i] & " is:_________" & structFind(response_struct, keyArray[i]) );

the results:
TransDate is:_________2011-07-12
Complete is:_________true
AuthCode is:_________002889
ISO is:_________01
TransType is:_________00
ReceiptID is:_________RES_PURCH_0712201107:22:57
TransAmount is:_________1.00
CardType is:_________M
CvdResultCode is:_________null
ResSuccess is:_________true

masked_pan is:_________5454***5454
note is:_________Your first payment will be $1000.55
phone is:_________yourphone
crypt_type is:_________7
cust_id is:_________testcustomer123
expdate is:_________1107
email is:_________youemail
AvsResultCode is:_________null
TransID is:_________143578-0_7
DataKey is:_________LfSCZBbHUJPgKXd0opkKEuUc4
Message is:_________APPROVED * =
PaymentType is:_________cc
ResponseCode is:_________027
TimedOut is:_________false
RecurSuccess is:_________null
ReferenceNum is:_________660021730010029080
TransTime is:_________02:22:57

Open in new window

Watch Question
Most Valuable Expert 2015
This problem has been solved!
Unlock 2 Answers and 20 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE