Well, you are correct in your assumption that the user goes to my site, selects a few products to buy, the tax and shipping etc is calculated and the Grand Total along with an order id is sent off to my pay providors site. There the user chooses the form of payment and the credit card is authorized and the user ends up on a page still on the pay providors site showing the results of his or her transaction, i.e. authorization code, receipt number etc etc. On this page, there IS a link to take the user back to my site. This link is passing absolutely not data back to my return script. It is simply a link. However, at some point during the transaction, and I can only assume that it is at the end after the credit card has been authorized, a whole bunch of data is being sent to my test script via what I think is a cgi script and the data is being sent as a form post. This script also, when it sends the data, reads the output or results of the script on my server and stores it in a log on the pay providers server. The content of this log is absolutely correct. Everything is there. However, when you click on the return link to go back to my site, the page you go back to is the page with my return script on it and the values assign originally to these $_POST vars seems to be lost. Below is the code again:
Code: Select all
<?php
$theorderid = $_POSTї'xxxVar1'];
$theauthcode = $_POSTї'ApprovalCode'];
$thesuccess = $_POSTї'NiceVerbage'];
if (isset($theauthcode) && $thesuccess == "Approved" || $thesuccess == "Test Approved") {
echo "You been authorized! <br>";
echo "Your Authorization Code is: $theauthcode <br>";
echo "Your Order Id is: $theorderid <br>";
echo "The Success Flag is: $thesuccess <br>";
}
else { echo "NOT AUTHORIZED";
};
?>
This is a pretty simple test script I am using just to try to make sure this is working. It seems like the cgi script fires as soon as the the credit card supplier authorizes the current credit card and the cgi script fires off the data to the above script, even though we have not gone to the page yet. Perhaps I should try to use this script simply to grab the values being sent from the pay providor and store them in $vars or would they have to be global vars? Then simply go back to a page and echo out these values??
Here is some info about the export script:
Some InternetSecure merchants request that the results of their payment transactions be returned to their web site for inventory purposes, sales analysis or customer database maintenance. InternetSecure offers a post approval or "export" script which posts results to your system after completing each transaction.
Export Your Payment Transactions In Real-Time
An export script is a procedure that can be run following completion of a transaction (approvals only or approvals and declines - your choice). It returns results of a payment to your web server using a standard web protocol HTTP to "call" a page on your server just as a browser calls any web page. The export script dumps data about the transaction to the web page using a form POST.
And here are the variables being pased to the test script:
- Variable Name Description
xxxName Cardholder's full name (Page 1)
xxxCompany Cardholder's company
xxxAddress Cardholder's street address
xxxCity Cardholder's city
xxxProvince Cardholder's province
xxxCountry Cardholder's country
xxxPostal Cardholder's postal code
xxxEmail Cardholder's email address
xxxPhone Cardholder's phone number
xxxcard_name Cardholder's name on credit card (Page 2)
xxxCCType Cardholder's credit card type (Visa, MasterCard, Amex)
xxxAmount Dollar amount of the transaction
CustomerName Cardholder's full name (Page 1)
CustomerCompany Cardholder's company
CustomerAddress Cardholder's street address
CustomerCity Cardholder's city
CustomerProvince Cardholder's province
CustomerCountry Cardholder's country
CustomerPostalCode Cardholder's postal code
CustomerEmail Cardholder's email address
CustomerPhone Cardholder's phone number
Cardholder Cardholder's name on credit card (Page 2)
MerchantNumber InternetSecure merchant number of this transaction
Currency The currency used to process the transactions
Amount Dollar amount of the transaction
SalesOrderNumber Sales order number of transaction. Unique within your merchant number and increments one for each transaction.
receiptnumber InternetSecure receipt number. Unique to each transaction.
ApprovalCode Bank approval code for this transaction
Verbage Verbiage sent back by the processor
NiceVerbage Plain english version of the verbiage
CVV2Result The Cardholder Verification result passed by the card issuer
AVSResponseCode The result of checkin the Cardholder's address with the card issuer
Products The Products string, as passed by the merchant
DoubleColonProducts The Products string, converted to Double Colon format
Language The language used to display the transaction pages
KeySize Size of the SSL cipher key being used by cardholder
SecretKeySize Secret size of the SSL cipher key being used by cardholder
UserAgent The browser type that the cardholder used
EntryTimeStamp The date and time the cardholder first entered the InternetSecure system. (Unix format - see below)
UnixTimeStamp The date and time the cardholder submitted the transaction for processing. (Unix format - see below)
TimeStamp The date and time the cardholder submitted the transaction for processing. (Format - mm/dd/yyyy hh:mm:dd)
Live Indicated whether the transaction was real (1), test approval (2), or test decline (3)
RefererURL The URL of the page that sent the cardholder to InternetSecure
ip_address The IP address of the cardholder's computer
ReturnURL The ReturnURL variable passed by the merchant
ReturnCGI The ReturnCGI variable passed by the merchant
xxxVar1 Hidden variable specific to your site
xxxVar2 Hidden variable specific to your site
xxxVar3 Hidden variable specific to your site
xxxVar4 Hidden variable specific to your site
xxxVar5 Hidden variable specific to your site
So, it seems to me that somehow the values assigned to these vars are being lost when you go back to the page with the test script so I thing maybe I am going to have to use two scripts: one to grab the values and store them somewhere and then the return page where I can output all of this.
Grrrrrhhhh ...
Thanks again.
Dave