Payza payment module for virtuemart Version 1.1.x
This payza payment module for virtuemart uses Instant Payment Notification to automate the process. Payza does not send IPN info with return URL unlike paypal. they need to setup IPN before one can use it. we have integrated alertpay IPN with virtuemart payment processor.
This IPN is written in PHP and secured using joomla and virtuemart libraries. it is nice mix up of Joomla framework, virtuemart library and PHP.
Make a backup of alertpay files if you are using already the one.
INSTALLING VIRTUEMART MODULE:
1. Check that you don't already have someone else's payza payment module by looking in the folder as per my "Note" section above.
2. Upload the administrator directory to the root of your website. press yes if asked for overwriting
3. Now login to your administration panel (back-end)
4. Go to Components > Virtuemart > Store > List Payment Methods > New
5. Ensure the "Active" checkbox is enabled (ticked)
6. "Payment Method Name" should be Payza (doesn't have to be but it's easier to remember)
7. "Code" is PZ (again just easier to remember)
8. Next to "Payment class name", select ps_payza from the drop-down.
9. For "Payment method type", put a dot next to the HTML-form based (e.g. Paypal) option.
10. Click on the "SAVE" icon (top-right).
11. You should be returned to the "Payment Method List" page, click on the Payza entry you just made.
12. Click on the Configuration tab (next to Payment Method Form tab)
13. There should be a message saying that ps_payza.cfg.php is Writeable. If it isn't then check the permissions on the file using your FTP client.
14. Complete the fields just under this message as appropriate.
* Purchase Type should be item
* Business email name should be the email address YOU registered with Payza as.
* Return URL is the page that the user should be directed to when they complete the payment.
* Cancel URL is the page if the user cancels for whatever reason at payza.com.
16. Click on the "SAVE" icon again (top-right).
INSTALLING PAYZA IPN:
1. Login to your payza account go My Payza Account Main Menu > Manage My Business > IPN Advance Integration click it then IPN Setup
2. Put your transaction pin and press Access
3. You should set following
IPN Status: Enabled
Allow Encrypted Payment Details (EPD): Disabled
Alert URL: this will point to your file eg. www.youdomain.com/IPN_File.php
IPN Security Code: it is generated or you can generate it if you like
Test Mode: Disabled (you can turn it enabled for testing purposes)
4. copy your IPN Security Code: (eg AK2xC0i5BefyG2AS)
5. Open IPN_File.php set the following with your information
define("IPN_SECURITY_CODE", "xxxxxxxxxxxxxxxx") replace xxxxxxxxxxxxxxxx with your security code
$company="your caompany name here" put your company name in quotes
$companyemail="your email address here" put your email address in quotes
save your file
6. Rename IPN_File.php to any name you like e.g example.php
7. Now upload it to any joomla folder on server (it must be accessesable from browser eg. www.youdomain.com/example.php) you would see a blank page
TESTING PAYZA MODULE:
1. Goto your payza account and enable test mode from IPN setup ( follow step 3 of INSTALLING PAYZA IPN:)
2. place an order at your shop after pressing confirm order button you will see payza payment button (its for security reasons so that customer don’t alter the information sent to payza) press it to goto payza checkout page.
3. you would see Test Transaction at top of the page confirming that this is test transaction and you will not be charged for this
4. login with your email and password
5. Scroll down and put your Transaction PIN and press confirm and proceed button
Above test will confirm that our module for virtuemart is working fine. now time to test the ipn script
1. Login to your payza account go My Payza Account Main Menu > Manage My Business > IPN Advance Integration click it then IPN Simulator
2. Choose IPN type "Item purchase"
3. Choose Merchant Profile (your email id)
4. check for Post data to Url: it should point to IPN file e.g http://www.youdomain.com/example.php
5. look for apc_1: its default value is red
6. change red to the order id you just received in email during last test
7. Click Send IPN
8. Scroll up to the top you will see a message The IPN have been successfully sent.
9. if you get any error it is related to the IPN setup and you should check if url pointing to your file is correct and file exists at location
now you can the download your files and Disable the test mode from IPN setup. :)