Recently I came across one requirement where end user wants an easy way to pay fixed amount online from Salesforce to third party something like Donate page. In one of my previous post i showed you how you can do that using Paypal. Here is that paypal solution:
http://techsahre.blogspot.com/2011/01/simple-paypal-integration-with.htmlI was thinking to implement the same thing but this time end user wanted something simpler easy to use and easy to test solution. Then i found that 'Authorize.Net' is one of the good solution for this type of requirements. Then i created one simple ready to use online payment tool in salesforce using 'Authorize.Net' as payment gateway.
I found a good tutorial here in PHP how to make that here. I used the same idea and rebuild my Apex solution.
You can download the package from this link:
https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t90000000PqIH
Before using the tool, you first need to follow some basic things:
1) For checking/testing the things you need first test accounts. Go to "test account" page on Authorize.Net and create one merchant account (Card Not Present).
2) Change your "login" and "transkey" variables in "AuthorizeDotNet" class with the merchant account's API login id and transaction id.
After that you can simply use VF page "DoPayment" to see how this works.
/apex/DoPayment
On click of submit you will get information about your transaction, if successful it will show you transaction id and success message. Otherwise will show error message.
Check out this easy cool stuff and give me feed backs as always.
Thanks
Aslam Bari