PDA

View Full Version : Sale completion integration


Craig
21st August 2004, 11:51 AM
Hi guys,

The script looks great and the install went really smoothly, however I have a problem with the final integration and am hoping you can help.

I need to track percentage affiliate fees, and therefore need to carry the product value to the thank you page, unfortunately the processor I use doesn't carry the amount to the thank you page, I'll explain how their system works.

I use www.nochex.com for taking payments due to the fact that I run an adult site which they accept and paypal no longer do, and also that they have a no chargebacks policy (even though we hardly get any).

The way their automated payment system works is as follows:

1) My client is transferred to the payment processors secure server

2) Upon completion of their payment the client is sent to a pre-defined thank you page which is a simple URL re-direct and does not contain any POST values for things like amount or order ID.

3) At the same time the user is being sent to the thank you page, the billing companies server is making contact with a script on my own server and sending it the transaction details for verification.

3) My server sends back all of these details for verification to their server which then simply checks them against their database and supplies my server with either a 'Granted' or 'Declined' response.

4) At this point the script on my box then either creates a new username and password for the user and sends them an automated e-mail detailing it or it doesn't if the users transaction was declined.

It is at the final point (4) that I need to be able to do the affiliate tracking, but because this is being called by the processors server and not the purchasers browser, no cookie information can be read to determine which affiliate ID the amount should be written against (I assume).

If you can let me know what I need to do to integrate it with Nochex then it
would be much appreciated.

Regards
Craig

mark
23rd August 2004, 11:00 PM
Hello,

I see one way - maybe it is possible to pass some custom value (hidden field) in the payment form when user is transferred to the secure server for payment.
Many systems (Paypal, Worldpay, Verisign) allow to do this, maybe also nochex.
If it is possible, you can store the data from cookie into this custom field and later when you'll be processing the user in step 4, you can use it to call sale registration routine of affiliate system.

with regards,

mark

Cowboy
24th August 2004, 07:50 AM
You can pass it with ssi if you're using and sending to a php page.

http://yourlink.com/?a=1&*

<a href="page2.php?a=<?=$_GET["a"]?>

===========

Page 2 links =

<a href="page3.php?a=<?=$_GET["a"]?>

===========
Thank you=

/affiliate/scripts/sale.php?TotalCost=xx.xx&OrderID=aff<?=$_GET["a"]?>&ProductID=xxxxx" width=1 height=1>

You can pass it as far as you want to go.

<?=$_GET["a"]?> <?=$_GET["z"]?> <?=$_GET["9"]?> Whatever you tell it to get, it will get, just define what you want and give it a name.

aff_id=<?=$_GET["a"]?>;hit-<?=$_GET["ht"]?>

I ust "ht" as a session ID variable.

I hope that's what you were asking..

Craig
24th August 2004, 04:28 PM
I'm not sure you understand the problem properly Cowboy, but thanks for replying.

I've got another possibility as a solution but want to run the possible security and cheating implications by you Mark.

I can store the amount as a cookie prior to transferring the user to the payment screen and then extract the amount back from the cookie on the thank you screen as it's a PHP page.

I assume that the affiliate script has cheating blocking built in to simply stop people continually clicking and refreshing the thank you screen, so are there any other problems that you can forsee?

Regards
Craig

mark
25th August 2004, 10:15 PM
Hi,

I think I understand Cowboy's idea, it would work if you are able to specify the url to thank you page in the payment button form.
He means that you'll dynamically add parameter that you want to pass to thank you page, for example:

<input type=hidden name=redirect_succes value="http://www.yoursite.com/thanks.php?totalcost=123">

Then on thanks.php page you'd be able to read the totalcost parameter.
I don't know if nochex offers this possibility.

The solution with saving amount into cookie before sending customer to payment system should work as well.
Affiliate system has cheating blocking (called fraud protection in the script) which can automatically filter the orders with the same order ID or from the same IP address.
In your case you can use only blocking by IP, because I assume you don't know order id when you are saving cookie, so you cannot check it.

with regards,

mark

Craig
26th August 2004, 08:26 AM
I see what cowboy was getting at now, and I could use that method, but I've plumpted for storing the value in a cookie when the customer selects the membership from a drop down menu, and I can also assign a unique order number at that point too.

I've implemented it and it seems to work fine, so thanks for you help guys a combination of ideas from both of you has solved it I think.

Regards
Craig