Make a backup copy before working on any file. Here are major payment topics:
This section describes the steps made when a customer chooses to upgrade their phpYellow Page listing from a free basic to a paid listing. Each step is briefly explained below. If you are considering using phpYellow Pages for paid listings then it is a good idea to read ALL of this section.
|
In general the listing payment process is made up of five (5) steps:
|
When the user decides to buy an enhanced listing ( by clicking on "Go Premium" ) they immediately go to the checkout page. On the checkout page the customer selects service type, duration and payment method. Following is a description of these checkout steps:
|
|
Clicking on a submit button takes the customer to the next page - the buy page.
On the buy page the customer:
For each payment method (except online payment by credit card) the customer is prompted to send in payment. You validate this payment according to your own business rules. You ensure the customer has actually made payment. For example, if payment by check is made, then you verify funds are transferred.
For online credit card validation (which you may turn on or off) the customer payment is verified by your credit card processor. Separate documents detail how this is done. Each processor will have different ways of achieving the same goal - of making sure the credit card payment is valid.
Processors have many different approaches
Processors have many different approaches for the payment process in general. For example, one processor may require that the buy page be physically located on their server, using a pre-made template of their own design. Other processors may let you host your own buy page using your custom design. Similarly, the ways that the processors allow or handle other aspects of the payment process can and do differ. It is because of these differences that different methods and code are needed for each payment processor.
You will need to purchase the code for your gateway payment processor, or write your own. DreamRiver has a flat rate for connecting phpYellow Pages with your processor. The rate is $99 USD, payable on completion of the work. Click here to request help with your Payment Gateway Processor.
After payment approval the next step arises - listing update.
The customer's listing is updated after their payment is approved. Online credit card payments can be automatically handled by the phpYellow Pages system. For any other payment a manual update by the administrator is needed. A point and click tool is provided to make this easy - all you need to know is the unique database key - the ckey - of the customer's listing. This is embedded in the invoice number and found easily with other methods.
The listing update process sets service, duration, status, expiry and listing position information to the correct values as held in the online database. The result is to set new parameters for the customer listing, committing the changes needed to the database in order to make the listing a paid, rather than free, listing.
The purchase starts with the sale. Thanking your customer is your first step in keeping them satisfied with your service - and coming back next year for more, or selling them additional products or services. The Thank You step sees the system generate a thank you web page after online credit card payment is received. A link also is made to let the customer view their highlighted listing - only their listing appears in this process. The customer can also search for their upgraded listing and it is available for viewing. Most payment processors also can optionally send an email receipt to the customer and this can be set in the respective processor administration areas.
For cases where payment is NOT via online credit card you may want to manually send a receipt and perhaps a thank you note - another reason for upgrading to online credit card acceptance and enjoying online processing.
There are five (5) major steps used in the listing payment process. Checkout, Buy, Payment Validation, Listing Update and Thank You are the steps involved. Each of these steps may be examined in greater detail. Listings may be paid for using traditional or online payment methods. For online payment methods we find that the payment processors have different approaches. The way that one processor works may be different from others. phpYellow Pages handles these variations by using different code and approach for each processor. You can purchase code from Dreamriver to integrate with your processor. When your customer's payment is confirmed the listing is updated. Finally, the customer is sent a receipt and a thank you note.
Toggle paid listings on or off - "yes" will enable script processing, anything else will disable processing. Processing is linked to various payment methods.
Open the file paymentMethodsList.php. Remove any method you do not wish to have. Save the file and upload to your server.
To remove a payment method type delete the line it is on. Example: to remove 'Credit Card by Internet' delete all of line 9 and next save this file as paymentMethodsList.php. This file is automatically included in the online form called checkout.php
Open checkout.php in an html editor. You will see input types for the months duration of listings like this:
<input type="radio" name="monthsGoodFor" value="9">9 Months<br>
By deleting this line you effectively remove the nine month option. By deleting any other "monthsGoodFor" line you will prevent the customer from seeing it. If the user cannot see the option then chances are they will not use it.
define("FIRSTPAGE_12_MOS_PRICE", "99.95"); or like
define("PREFERRED_12_MOS_PRICE", "50.00");
You may set your own price by changing the dollar value between the quotation marks. Set any price you like. Do NOT use a dollar sign. Note that priceChart.php uses those values to dynamically render a price chart on a number of pages, including upgrade.php. The price chart is intended to help the user choose a price.
There are over 3500 taxation systems in North America alone. phpYellow Pages supports BASIC taxation as follows:
Open util.php in any html editor. To begin to use tax in the calculation of premium listing price you set the constant called USETAX to the value "yes". The default is "no".
If USETAX is toggled to yes then the constant value for TAXHEADING is the text to show the customer. For example, the default TAXHEADING is "Check applicable taxes.". Change this text label to whatever instructions are appropriate.
TAXONENAME is the name of the tax shown to the user, for example "State Tax". It is just a label. TAXONEPERCENTAGEAMOUNT is the percentage amount of the tax, for example ".02". This number is multiplied by the charge total (which is your price for the premium listing, only) to arrive at an $x_amount total price. The tax is included in $x_amount. $x_amount is the amount billed to the credit card, if a credit card is used.
If a second tax is wanted a similar process applies with similar constants, also found in util.php.
If you need to write your own taxation algorithm then you may do so in the file buy.php at the top of the page.
You may test the payment system by making a listing then clicking on "Go Premium". Enter your phpYellow password and click on "Next Step". Payment instructions are given to you.
Use the process above. Select Credit Card by Internet.
To bypass your credit card processor during testing open util.php in a html editor. Change the constant BYPASSCARDPROCESSOR to a value of "yes". A value of "no " enables normal functionality.
An additional feature allows you to process a credit card payment WITHOUT involving a payment gateway processor. The customer listing is automatically updated after submitting card data. Notification can be emailed to you automatically. You process the transaction normally, offline, using your existing merchant account. Please inquire for details.
You may want to make a live test for a small amount of money. When using the premiumCheckout.php page select the one month option. It has a default value of $10 for First Page and $5.00 for Preferred listings for the one month listing only. Change the value for FIRSTPAGE_1_MO_PRICE to 1.00. This change is made in util.php. You will want to later reset FIRSTPAGE_1_MO_PRICE to your regular payment amount, after testing is complete.
Check the hidden variables in your buy page, make sure your gateway processor settings are ok, for example add http://www.yourDomain.com/phpYellow/premiumProcessPayment.php and also http://www.yourDomain.com/phpYellow/premiumBuy.php as valid URL's.
The DreamRiver sample site of phpYellow Pages is ready to accept your live test. You do NOT need to enter valid credit card data - in fact - DO NOT!. The payment system functions normally and updates your listing, even if you enter false data. This is to allow you to test. Try it out! by adding a new listing. Then click on "Go Premium!"
END OF DOCUMENT
All Pages Copyright©2000,2001,2002 Dreamriver.com. All rights reserved.