I don't know much about PHP, but I have a small task I need help with.
Could someone tell me how to modify the line after <!--NEW--> in the
code below (paypal.php) in order to get the order number and the
grand_total passed?
as in:
http://www.yourdomain.com/affiliate/...OrderID=XXXXXX
I think this returns the ordervalue:
<?=$SC[order][grand_total] ?>
And this is for order number:
..$order['number'];
but how do I string it all together?
Thank you in advance!
[CODE paypal.php]
<?
// File modified on 12/09/2004 for v1.6.0 - to support change of
PayPal_Email field name to Payment_Email_Address
$paypal_email =
get_field_val("Payment_Methods","Payment_Email_Add ress","Name =
'PayPal'");
$store_info = get_records("Store_Information",0,"record_number =
\"1\"",0,0);
$item_name = $store_info[0][Company_Name]." order # ".$order['number'];
$url = $store_info[0][url];
$PayPal_Button = get_image("Cart_Images","PayPal Button",0,0,1);
// tell the cart to empty, and thank the customer
$SC['complete_order'] = 1;
?>
<span class="header"><?=$Final_Payment_Image?></span><br><br>
Your order has been placed, and is in our database. <br>
To continue, click the button below to submit payment via PayPal. <br>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="<?=$paypal_email ?>">
<input type="hidden" name="item_name" value="<?=$item_name?>">
<input type="hidden" name="amount" value="<?=$SC[order][grand_total]
?>">
<input type="hidden" name="shipping" value="">
<!-- WRP:MOD --OLD-->
<input type="hidden" name="return" value="<?=$url ?>">
<!--NEW-->
<input type="hidden" name="return"
value="http://www.whiterabbitpress.us/affiliate/scripts/sale.php?...">
<!--MOD END-->
<input type="hidden" name="cancel_return" value="<?=$url ?>">
<input type="hidden" name="no_note" value="1">
<input type="image" src="<?=$PayPal_Button?>" border="0" name="submit"
alt="Make payments with PayPal - it's fast, free and secure!">
</form>
[code]