NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page order form help.

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

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 09-13-2005, 04:28 PM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: Aug 2005
Location: England
Posts: 1,197
Host47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to all
 



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.";
????: NamePros.com http://www.namepros.com/programming/123489-order-form-help.html
"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") {
????: NamePros.com http://www.namepros.com/showthread.php?t=123489

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
Host47 is offline  
Old 09-13-2005, 07:23 PM   #2 (permalink)
Senior Member
 
nasaboy007's Avatar
Join Date: Jul 2005
Location: NJ
Posts: 1,219
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 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, 09:42 PM   #3 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Yes, always put code in either the php, code, or html tags!!

EDIT: Found the problem

PHP Code:
<?
????: NamePros.com http://www.namepros.com/showthread.php?t=123489
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 10:03 PM.
Eric is offline  
Old 09-14-2005, 01:41 AM THREAD STARTER               #4 (permalink)
Senior Member
Join Date: Aug 2005
Location: England
Posts: 1,197
Host47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to all
 



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.
Host47 is offline  
Old 09-14-2005, 06:04 AM THREAD STARTER               #5 (permalink)
Senior Member
Join Date: Aug 2005
Location: England
Posts: 1,197
Host47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to all
 



Can anyone help with this I need it working asap..thanks all.
Host47 is offline  
Old 09-14-2005, 06:42 AM   #6 (permalink)
NamePros Regular
 
benc811's Avatar
Join Date: Oct 2004
Location: W. Hartford, CT
Posts: 361
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);
????: NamePros.com http://www.namepros.com/showthread.php?t=123489


$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") {
????: NamePros.com http://www.namepros.com/showthread.php?t=123489

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, 03:04 PM THREAD STARTER               #7 (permalink)
Senior Member
Join Date: Aug 2005
Location: England
Posts: 1,197
Host47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to all
 



still not working, if put the currency code in like secondversion said it gives the error above...
Host47 is offline  
Old 09-14-2005, 05:44 PM THREAD STARTER               #8 (permalink)
Senior Member
Join Date: Aug 2005
Location: England
Posts: 1,197
Host47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to allHost47 is a name known to all
 



All sorted
Host47 is offline  
Closed Thread


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


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

Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:17 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger