PHP Classes

File: virtual_paypal.php

Recommend this page to a friend!
  Classes of Herve FOUCHER   paypal_ipn   virtual_paypal.php   Download  
File: virtual_paypal.php
Role: Unit test script
Content type: text/plain
Description: A fake and random (either INVALID or VERIFIED) Paypal server response
Class: paypal_ipn
Paypal payment notification processing
Author: By
Last change:
Date: 21 years ago
Size: 400 bytes


Class file image Download

= fopen("what_server_receives.txt", "a");

while( list(
$key, $val) = each ($_POST))
fwrite ($f, "$key = $val\n");
fwrite ($f, str_repeat("-", 80)."\n");


// if the POST doesn't contain cmd variable, return INVALID

// otherwise, return random answer
print rand(0,1)?"VERIFIED":"INVALID";