$paypalTxn->set_variable('bp_biobounce_uid', $_POST['custom']); $paypalTxn->set_variable('bp_paypal_payer_id', $_POST['payer_id']); $paypalTxn->set_variable('bp_paypal_txn_id', $_POST['txn_id']); $paypalTxn->set_variable('bp_paypal_txn_type', $_POST['txn_type']); $paypalTxn->set_variable('bp_paypal_username', $_POST['username']); $paypalTxn->set_variable('bp_paypal_mc_gross ', $_POST['mc_gross']); $paypalTxn->set_variable('bp_paypal_option_name', $_POST['option_name1']); $paypalTxn->set_variable('bp_paypal_option_selection', $_POST['option_selection1']); $paypalTxn->set_variable('bp_paypal_email', $_POST['payer_email']); $paypalTxn->set_variable('bp_paypal_mc_fee ', $_POST['mc_fee']); $paypalTxn->set_variable('bp_paypal_zip', $_POST['address_zip']); $paypalTxn->set_variable('bp_payment_status', $_POST['payment_status']); $paydate = $_POST['payment_date']; $timestamp = date('Y-m-d', strtotime($paydate)); $paypalTxn->set_variable('bp_payment_date', $timestamp); $paypalTxn->createNew(); } $debugString .= "\nProcessed\n"; // } if (strcmp($res, "INVALID") == 0) { $debugString .= "\nINVALID - DON'T KNOW WHY!!!\n"; $debugString .= "\nRECEIVED: " . print_r($raw_post_array, true); $raw_post_array = explode('&', $req); $debugString .= "\n SEND BACK: " . print_r($raw_post_array, true); $debugString .= "\nREPLY FROM PAYPAL::" . $res; } // try to resolve this or any other outstanding payment ids payment_info::reconcileAllPaymentUids(); $my_file = 'debug.txt'; $handle = fopen($my_file, 'w') or die('Cannot open file: ' . $my_file); //implicitly creates file