website. When someone pays using PayPal it's supposed to direct them to one
page if the payment is a success or another if payment failed. This is the
code:
Code: Select all
if($action == order && $order_n != "")
{
include "engine/card_process.pml";
if($payment_status == success)
{
$page = payment_success;
}
else
{
$page = payment_failed;
}
}the correct amount if the process is a success. This is the code that's
supposed to be inserted to credit affiliates:
Code: Select all
<img src="http://www.yoursite.com/cgi-bin/affiliates/sale.cgi?payment=
$amount" border=0>various forms, but I either get errors, or the affiliate isn't credited, or
both. I managed to get the code to credit affiliates correctly, by
inserting this:
Code: Select all
include "<img src='http://www.yoursite.com/cgi-bin/affiliates/sale.cgi?
payment=$amount' border=0>";Code: Select all
Warning: main(): failed to open stream: No such file or directory in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 18
Warning: main(): Failed opening '<img src='http://www.yoursite.com/cgi-
bin/affiliates/sale.cgi?payment=0.01' border=0>' for inclusion
(include_path='.:/usr/share/pear') in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 18
Warning: session_start(): Cannot send session cookie - headers already sent
by (output started at
/home/httpd/vhosts/yoursite.com/httpdocs/index.php:18) in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 29
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at
/home/httpd/vhosts/yoursite.com/httpdocs/index.php:18) in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 29
Warning: Cannot modify header information - headers already sent by (output
started at /home/httpd/vhosts/yoursite.com/httpdocs/index.php:18) in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 69session_start();
Line 69 is:
setcookie("current_page"' $page);
What I'm looking for is the proper syntax for the line of code that credits affiliates. If you can help me I would appreciate it. I really don't have a clue about what I'm doing. I'm just guessing. I look to see how something is done in another part of the script and try to adapt it, but in this case I'm stumped. Thanks.