• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

Tutorial - Online Payments Webpage

Robert Watcher

Well-known member
It's really nice to have shopping cart specific websites that have integrated payment ability - - - but for many purposes, that may be overkill with the required setup - or not general enough to allow for payments related to other products or services - and probably doesn't easily allow for anyone to just send you money by Credit Card or Paypal, for whatever reason.

That is why I prefer to use my Simple Online Payments webpage - that anyone can access to make payments. I can provide the Payments page link when sending a pdf contract by email, or I can direct people to that webpage any time that someone wants to send me some money. As well I have a "Payments" link to that same Payments webpage, right on my proofing gallery pages (doesn't use a shopping cart) that my clients can click on to make any payments. They have to manually enter their total after they click on "Pay Now" button - - - but it works well for me.

Payment is accomplished through Paypal. With the Free Business Account, I am also able to accept credit card card payments at a rate that is competitive with a merchant account. I believe that the fee is 2.9% for the small amount of money that I process through Paypal (cheaper with more passthrough). There is not a yearly fee as there is with merchant accounts - which is good. The one downside is that Paypal payments are also levied the 2.9% fee. That is just part of the cost of doing business as far as I am concerned.

This is how my Online Payments page fits into my website and this is the link I send people or have aa button to on webpages - http://robertwatcher.com/payments.php



13447996919827_payments.png


DEMO : http://arwmedia.com/rd/payments.php



This is the source code that I wrote that uses Paypals form variables and my layout and wording. The only thing that you will need to change to make the script useful to you is to enter your Paypal account email address here. It works even if you don't - but any money will get sent to yourname@gmail.com - which isn't too useful:

// Customize Your Settings
$paypal_account = "yourname@gmail.com";

A useful feature is that the person is returned to your payments webpage after either a successfull or a failed transaction. A message will display under the Pay Now button, alerting them to the result:

This is after a Successful Transaction - http://arwmedia.com/...s.php?success=1
This is after a Failed Transaction - http://arwmedia.com/...s.php?success=2




FITTING IT INTO YOUR EXISTING WEBPAGE

This block of code should be pasted into the body of your webpage (make sure the webpage has a .php extension is all that is required)

Code:
<?php
// Customize Your Settings
$paypal_account = "yourname@gmail.com";
$item_name = "Photographic Services and Products";
$currency_code = "USD";
$langauge_code = "EN";

// -----------------------------------------
if ($_GET['success']==1){
$pp_message = "You have Successfully made your Online Payment. Thank you for your business.";
}else if ($_GET['success']==2){
$pp_message = "Your Payment Transaction has been Cancelled. For assistance, please contact <a href='mailto:$paypal_account?subject=Payment Transaction Issue' >$paypal_account</a>";
}
$return_path = "http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];
?>
<div style="margin:0 auto; width:960px; height:650px; background:#eee; text-align:left;">
<h3 style="padding:8px 25px;">Secure Payment page</h3>
<dl style="padding:25px; border-top:1px solid black;">
<dt style="margin:0 0 15px;"><strong>Payment instructions:</strong> You can pay with either PAYPAL or any Credit Card.</dt>
<dd style="padding:10px 25px;">1. Click on the "Pay Now" button below. You will be redirected to the Paypal secure website.</dd>
<dd style="padding:10px 25px;">2. Enter the payment amount.</dd>
<dd style="padding:10px 25px;">3. If you do not have a Paypal account, simply click on the link "Continue" found on the bottom left hand side of the page to pay securely with your Credit Card.</dd>
</dl>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin:20px 0 40px; text-align:center;">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="<?php echo $paypal_account; ?>" />
<input type="hidden" name="item_name" value="<?php echo $item_name; ?>" />
<input type="hidden" name="no_shipping" value="0" />
<input type="hidden" name="return" value="<?php echo $return_path; ?>?success=1" />
<input type="hidden" name="cancel_return" value="<?php echo $return_path; ?>?success=2" />
<input type="hidden" name="currency_code" value="<?php echo $currency_code; ?>" />
<input type="hidden" name="lc" value="<?php echo $langauge_code; ?>" />
<input type="hidden" name="bn" value="PP-BuyNowBF" />
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
<p style="padding:30px 0 0; text-align:center;"><?php echo $pp_message; ?></p>
</form>
<dl style="padding:25px; background:#FFA926; border:2px solid black;">
<dt style="margin:0 0 15px;">PayPal is the safer, easier way to pay online. Pay with your credit card without exposing your credit card number to the merchant. Plus, speed through checkout whenever you shop online.</dt>
<dd style="padding:2px 0;">Secure:</dd>
<dd style="padding:2px 25px;">* Never expose your credit card number to the merchant.</dd>
<dd style="padding:2px 25px;">* 100% protection against any unauthorized payments sent from your account.</dd>
<dd style="padding:2px 25px;">* Every purchase confirmed with an email receipt</dd>
</dl>

</div>
STANDALONE WEBPAGE

Using a Plain Text Editor like Notepad (I use Notepad++ - http://notepad-plus-plus.org/) - - - paste this block of code into a New document and save it as "payments.php"


Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />

<title>Online Payment Page</title>
<meta name="description" content="Online Payment Page" />

<style>
html, body, div, p, span, iframe, h1, h2, h3, h4, h5, h6, a, img, dl, dt, dd, ol, ul, li, hr, form, fieldset, label, input { margin:0; padding:0; border:0; outline:0; }
html, body { width:100%; background:#eee; color:#333; font:16px arial,sans-serif; text-align:center; }
</style>

</head>
<body>

<?php
// Customize Your Settings
$paypal_account = "yourname@gmail.com";
$item_name = "Photographic Services and Products";
$currency_code = "USD";
$langauge_code = "EN";

// -----------------------------------------
if ($_GET['success']==1){
$pp_message = "You have Successfully made your Online Payment. Thank you for your business.";
}else if ($_GET['success']==2){
$pp_message = "Your Payment Transaction has been Cancelled. For assistance, please contact <a href='mailto:$paypal_account?subject=Payment Transaction Issue' >$paypal_account</a>";
}
$return_path = "http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];
?>
<div style="margin:0 auto; width:960px; height:650px; background:#eee; text-align:left;">
<h3 style="padding:8px 25px;">Secure Payment page</h3>
<dl style="padding:25px; border-top:1px solid black;">
<dt style="margin:0 0 15px;"><strong>Payment instructions:</strong> You can pay with either PAYPAL or any Credit Card.</dt>
<dd style="padding:10px 25px;">1. Click on the "Pay Now" button below. You will be redirected to the Paypal secure website.</dd>
<dd style="padding:10px 25px;">2. Enter the payment amount.</dd>
<dd style="padding:10px 25px;">3. If you do not have a Paypal account, simply click on the link "Continue" found on the bottom left hand side of the page to pay securely with your Credit Card.</dd>
</dl>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin:20px 0 40px; text-align:center;">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="<?php echo $paypal_account; ?>" />
<input type="hidden" name="item_name" value="<?php echo $item_name; ?>" />
<input type="hidden" name="no_shipping" value="0" />
<input type="hidden" name="return" value="<?php echo $return_path; ?>?success=1" />
<input type="hidden" name="cancel_return" value="<?php echo $return_path; ?>?success=2" />
<input type="hidden" name="currency_code" value="<?php echo $currency_code; ?>" />
<input type="hidden" name="lc" value="<?php echo $langauge_code; ?>" />
<input type="hidden" name="bn" value="PP-BuyNowBF" />
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
<p style="padding:30px 0 0; text-align:center;"><?php echo $pp_message; ?></p>
</form>
<dl style="padding:25px; background:#FFA926; border:2px solid black;">
<dt style="margin:0 0 15px;">PayPal is the safer, easier way to pay online. Pay with your credit card without exposing your credit card number to the merchant. Plus, speed through checkout whenever you shop online.</dt>
<dd style="padding:2px 0;">Secure:</dd>
<dd style="padding:2px 25px;">* Never expose your credit card number to the merchant.</dd>
<dd style="padding:2px 25px;">* 100% protection against any unauthorized payments sent from your account.</dd>
<dd style="padding:2px 25px;">* Every purchase confirmed with an email receipt</dd>
</dl>

</div>


</body>
</html>
ALL IN ONE ZIPPED FILE

I have uploaded a zipped file of the Full Webpage Script. Just unzip, change your Paypal account email address, and upload to your server.
http://arwmedia.com/pubfiles/Robs-Online-Payments-Webpage.zip



HAVE FUN

Rob
 

Robert Watcher

Well-known member
This is a very old post. I haven’t used this script in years and none of the links are active. I’m not sure that my coding here is even up to date. Probably only of value if you are a coder and want to use the concepts.

——-
 

Peter Dexter

Well-known member
My on line account bank lets me send payments to individuals as well as businesses and there is no fee. I presume many other banks offer that option as well should some one want to send money to me.
 
Top