[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 09-13-2005, 03:28 PM   #1 (permalink)
Senior Member
 
Join Date: Aug 2005
Location: Plymouth, Devon, UK
Posts: 1,095
431.65 NP$ (Donate)

ReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of light


order form help.

I have an html order form, once submitted it process's the following script, but when it goes to paypal it's in $ and not £, even though it's set to GPB, anyone have any ideas..

<?

//----------Configuration Area ------
//----------Modify section -----------

//The Email Address in which you would like to receive order confirmation
$EmailAddress = "";

//The Subject of the email message you receive when someone makes a purchase
$EmailSubject = "Notification of Web Hosting Order!";



//Should the script send an email to the user when it has successfully placed
//an order through your website? Yes or No
$ReplyBoolean = "Yes";

//The Name in which you would like to use as the sender of the follow up order email
$SenderName = "";

//The Email address from which the script will use to send the email to the user
$SenderEmailAddress = "";

//The Subject of the email message your user receives as a follow up order letter
$SenderEmailSubject = "Thank you for your web hosting order!";

//The body of the email message your user receives
$SenderBody = "We have received your hosting order and will process it shortly, please ensure you have a valid domain name, no refunds will be given if you place an order and don't have a domain name.";
"Once your order has been processed you will receive an email with instructions on what to do next";



//Should the script send an invoice to the user? Yes or No
$InvoiceReplyBoolean = "Yes";

//The Name in which you would like to use as the sender of the invoice
$InvoiceSenderName = "";

//The Email address from which the script will use to send the invoice to the user
$InvoiceSenderEmailAddress = "";

//The Subject of the invoice your user receives
$InvoiceSenderEmailSubject = "";



//Paypal Email Address
$PaypalEmail = "";

//Should the payment be a Paypal Subscription? Yes or No
$PaypalSubscription = "Yes";

$currency_code = "GBP";









//========== PHP Script ==========
//========== Don't modify below this line if you don't know how to do===========

list ($productname, $productprice, $extra) = split('/',$txtproduct);

mail( "$EmailAddress", "$EmailSubject: $txtsubject",
"Purchaser: $txtfirstname $txtmiddlename $txtlastname ($txtemail) \nItem: $productname at $productprice per unit. \n\nName: $txtfirstname $txtmiddlename $txtlastname\nAddress: $txtaddress\nCity: $txtcity\nState: $txtstate\nZip Code: $txtzip\nCountry: $txtcountry\nPhone: $txtphone\nEmail: $txtemail\nDomain name: $txtdomain \nUsername: $txtusername\nPassword: $txtpassword\nPayment Method: $txtpayment\nProduct: $txtproduct\n\nComments: $txtmessage", "From: $txtemail" );


$ReplyBoolean = strtolower($ReplyBoolean);

if($ReplyBoolean == "yes") {

mail( "$txtemail", "$SenderEmailSubject", "Dear New Customer$txtname, \n\n$SenderBody \n\n$SenderName", "From: $SenderName <$SenderEmailAddress>" );

}

$InvoiceReplyBoolean = strtolower($InvoiceReplyBoolean);

if($InvoiceReplyBoolean == "yes") {

mail( "$txtemail", "$InvoiceSenderEmailSubject",
"=====================\nWeb Hosting Online Order Invoice\n=====================\n\nPurchaser: $txtname ($txtemail) \nWeb Hosting Package: $productname at $$productprice per month. \n\nName: $txtname\nAddress: $txtaddress\nCity: $txtcity\nState: $txtstate\nZip Code: $txtzip\nCountry: $txtcountry\nPhone: $txtphone\nEmail: $txtemail\nDomain name: $txtdomain \nUsername: $txtusername\nPassword: $txtpassword\nPayment Method: $txtpayment\nProduct: $txtproduct\n\nRemarks: $txtmessage\n\n$InvoiceSenderName", "From: $InvoiceSenderName <$InvoiceSenderEmailAddress>" );

}


if(strtolower($txtpayment) == "pp") {

if(strtolower($PaypalSubscription) == "yes") {

header ("Location: https://www.paypal.com/subscriptions/business=$PaypalEmail&undefined_quantity=1&item_na me=$productname&a3=$productprice&p3=1&t3=M&src=1&s ra=1&no_shipp//ing=1" );

}

elseif(strtolower($PaypalSubscription) == "no") {

header ("Location: https://www.paypal.com/xclick/business=$PaypalEmail&undefined_quantity=1&item_na me=$productname&amount=$productprice&no_shipp//ing=1" );

}

}

elseif (strtolower($txtpayment) == "cc") {

header ("" );


}

?>


Many Thanks
ReaperUK is offline  
Old 09-13-2005, 06:23 PM   #2 (permalink)
Senior Member
 
nasaboy007's Avatar
 
Join Date: Jul 2005
Location: NJ
Posts: 1,112
1,454.30 NP$ (Donate)

nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of


well first of all, im 100% sure that ALL of us wud benefit if u simply wrapped [PHP] tags around that code.

are you sure ur defining the right variable to be GBP? idk nething about paypal scripts. whered u get this? maybe i can go thru it and see how it works and help you.
nasaboy007 is offline  
Old 09-13-2005, 08:42 PM   #3 (permalink)
NPQ's PA, Slave, and On Call Coder

Technical Services


 
Eric's Avatar
 
Join Date: Mar 2005
Posts: 4,545
0.71 NP$ (Donate)

Eric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond repute

Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse
Yes, always put code in either the php, code, or html tags!!

EDIT: Found the problem

PHP Code:
<?
header
("Location: https://www.paypal.com/subscriptions/business=$PaypalEmail&undefined_quantity=1&item_name=$productname&a3=$productprice&p3=1&t3=M&src=1&sra=1&no_shipp//ing=1" );
The problem is in the above line^ It never defined what currency code it was in the actual URL.. so, change it to this

PHP Code:
<?
header
("Location: https://www.paypal.com/subscriptions/business=$PaypalEmail&undefined_quantity=1&item_name=$productname&a3=$productprice&p3=1&t3=M&src=1&sra=1&no_shipp//ing=1&currency_code=$currency_code" );
__________________

Last edited by SecondVersion; 09-13-2005 at 09:03 PM.
Eric is offline  
Old 09-14-2005, 12:41 AM   #4 (permalink)
Senior Member
 
Join Date: Aug 2005
Location: Plymouth, Devon, UK
Posts: 1,095
431.65 NP$ (Donate)

ReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of light


I didn't make the script, I purchased it with loads of others about 9 months back and just found it.

Seconversion i edited with your suggestion and get the following error

Error Detected
You have entered unsupported characters for this field. Currently only Western European and Chinese characters are supported. Please try again with different characters.
ReaperUK is offline  
Old 09-14-2005, 05:04 AM   #5 (permalink)
Senior Member
 
Join Date: Aug 2005
Location: Plymouth, Devon, UK
Posts: 1,095
431.65 NP$ (Donate)

ReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of light


Can anyone help with this I need it working asap..thanks all.
ReaperUK is offline  
Old 09-14-2005, 05:42 AM   #6 (permalink)
NamePros Regular
 
Join Date: Oct 2004
Posts: 317
5.91 NP$ (Donate)

benc811 is a jewel in the roughbenc811 is a jewel in the roughbenc811 is a jewel in the rough


PHP Code:
<?

//----------Configuration Area ------
//----------Modify section -----------

//The Email Address in which you would like to receive order confirmation
$EmailAddress = "";

//The Subject of the email message you receive when someone makes a purchase
$EmailSubject = "Notification of Web Hosting Order!";



//Should the script send an email to the user when it has successfully placed
//an order through your website? Yes or No
$ReplyBoolean = "Yes";

//The Name in which you would like to use as the sender of the follow up order email
$SenderName = "";

//The Email address from which the script will use to send the email to the user
$SenderEmailAddress = "";

//The Subject of the email message your user receives as a follow up order letter
$SenderEmailSubject = "Thank you for your web hosting order!";

//The body of the email message your user receives
$SenderBody = "We have received your hosting order and will process it shortly, please ensure you have a valid domain name, no refunds will be given if you place an order and don't have a domain name.";
"Once your order has been processed you will receive an email with instructions on what to do next";



//Should the script send an invoice to the user? Yes or No
$InvoiceReplyBoolean = "Yes";

//The Name in which you would like to use as the sender of the invoice
$InvoiceSenderName = "";

//The Email address from which the script will use to send the invoice to the user
$InvoiceSenderEmailAddress = "";

//The Subject of the invoice your user receives
$InvoiceSenderEmailSubject = "";



//Paypal Email Address
$PaypalEmail = "";

//Should the payment be a Paypal Subscription? Yes or No
$PaypalSubscription = "Yes";

$currency_code = "GBP";









//========== PHP Script ==========
//========== Don't modify below this line if you don't know how to do===========

list ($productname, $productprice, $extra) = split('/',$txtproduct);

mail( "$EmailAddress", "$EmailSubject: $txtsubject",
"Purchaser: $txtfirstname $txtmiddlename $txtlastname ($txtemail) \nItem: $productname at $productprice per unit. \n\nName: $txtfirstname $txtmiddlename $txtlastname\nAddress: $txtaddress\nCity: $txtcity\nState: $txtstate\nZip Code: $txtzip\nCountry: $txtcountry\nPhone: $txtphone\nEmail: $txtemail\nDomain name: $txtdomain \nUsername: $txtusername\nPassword: $txtpassword\nPayment Method: $txtpayment\nProduct: $txtproduct\n\nComments: $txtmessage", "From: $txtemail" );


$ReplyBoolean = strtolower($ReplyBoolean);

if(
$ReplyBoolean == "yes") {

mail( "$txtemail", "$SenderEmailSubject", "Dear New Customer$txtname, \n\n$SenderBody \n\n$SenderName", "From: $SenderName <$SenderEmailAddress>" );

}

$InvoiceReplyBoolean = strtolower($InvoiceReplyBoolean);

if(
$InvoiceReplyBoolean == "yes") {

mail( "$txtemail", "$InvoiceSenderEmailSubject",
"=====================\nWeb Hosting Online Order Invoice\n=====================\n\nPurchaser: $txtname ($txtemail) \nWeb Hosting Package: $productname at $$productprice per month. \n\nName: $txtname\nAddress: $txtaddress\nCity: $txtcity\nState: $txtstate\nZip Code: $txtzip\nCountry: $txtcountry\nPhone: $txtphone\nEmail: $txtemail\nDomain name: $txtdomain \nUsername: $txtusername\nPassword: $txtpassword\nPayment Method: $txtpayment\nProduct: $txtproduct\n\nRemarks: $txtmessage\n\n$InvoiceSenderName", "From: $InvoiceSenderName <$InvoiceSenderEmailAddress>" );

}


if(
strtolower($txtpayment) == "pp") {

if(
strtolower($PaypalSubscription) == "yes") {

header ("Location: https://www.paypal.com/subscriptions/business=$PaypalEmail&undefined_quantity=1&item_name=$productname&a3=$productprice&p3=1&t3=M&src=1&sra=1&no_shipp//ing=1" );

}

elseif(
strtolower($PaypalSubscription) == "no") {

header ("Location: https://www.paypal.com/xclick/business=$PaypalEmail&undefined_quantity=1&item_name=$productname&amount=$productprice&no_shipp//ing=1" );

}

}

elseif (
strtolower($txtpayment) == "cc") {

header ("" );


}

?>
do that it helps alot. As for the problem I dont know much paypal code but I think you do need the currency in the link.
__________________
benc811 is offline  
Old 09-14-2005, 02:04 PM   #7 (permalink)
Senior Member
 
Join Date: Aug 2005
Location: Plymouth, Devon, UK
Posts: 1,095
431.65 NP$ (Donate)

ReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of light


still not working, if put the currency code in like secondversion said it gives the error above...
ReaperUK is offline  
Old 09-14-2005, 04:44 PM   #8 (permalink)
Senior Member
 
Join Date: Aug 2005
Location: Plymouth, Devon, UK
Posts: 1,095
431.65 NP$ (Donate)

ReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of lightReaperUK is a glorious beacon of light


All sorted :P
ReaperUK is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paypal Settlement CMachuca The Break Room 3 07-31-2004 10:14 PM
PAYPAL Litigation johnn Domain Name Discussion 6 07-31-2004 09:51 PM
Paypal Settlement Lord The Break Room 2 07-30-2004 09:30 PM
PHP WebHost Order Form BoRiCuA The Break Room 4 04-30-2004 08:45 PM
order Form Lew Programming 5 10-20-2003 07:55 PM

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 08:54 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85