sfPaymentPayPalPlugin
0.1.1alpha
for sf 1.2 MIT
WARNING : This plugin is in alpha state, therefore NOT READY for production.
It still needs contribution to be fully functional.
This plugin is part of the sfPayment plugins suite and brings PayPal support.
This first version of the plugin (0.1.1) only supports Website Payments Standard.
The following versions will provide Website Payments Pro.
Please visit the official plugin page of the sfPayment project for more information.
Note : This plugin REQUIRES the sfPaymentPlugin and the
sfWebBrowserPlugin.
Developers
License
Copyright (c) 2009 Contributors of this plugin, please visit http://wiki.github.com/letscod/sfPaymentPlugin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Releases for sf 1.2
| Version |
License |
API |
Released |
|
0.1.2alpha
|
MIT license |
0.1.2alpha
|
05/10/2009 |
|
0.1.1alpha
|
MIT license |
0.1.1alpha
|
24/07/2009 |
| Name |
Channel |
Version |
| sfWebBrowserPlugin |
plugins.symfony-project.org |
1.1.0-1.1.2 |
| sfPaymentPlugin |
plugins.symfony-project.org |
0.1.0-0.2.0 |
Changelog for release 0.1.1 - 24/07/2009
This first version of the plugin (0.1.1) only supports Website Payments Standard (updated package.xml).
Other releases
Release 0.1.2 - 05/10/2009
Fixed the installation problem with dependencies plugins (sfPaymentPlugin and sfWebBrowserPlugin).
Release 0.1.1 - 24/07/2009
This first version of the plugin (0.1.1) only supports Website Payments Standard (updated package.xml).
sfPaymentPayPalPlugin
WARNING : This plugin is in alpha state, therefore NOT READY for production.
It still needs contribution to be fully functional.
This plugin is part of the sfPayment plugins suite and brings PayPal support.
This first version of the plugin (0.1.0) only supports Website Payments Standard.
The following versions will provide Website Payments Pro.
Please visit the official plugin page of the sfPayment project for more information.
Note : This plugin REQUIRES the sfPaymentPlugin and the
sfWebBrowserPlugin.
Installation
Configuring your plugin
Enable the module in your application settings.yml
# Activated modules from plugins or from the symfony core
enabled_modules: [default, sfPaymentPayPal]
Configure the plugin in your application app.yml
all:
#sfPaymentPayPalPlugin
sf_payment_paypal_plugin:
business: my_production_seller_account@business.com #seller account email on paypal
test:
business: my_production_test_seller_account@business.com #test seller account email on paypal
Test configuration in sfPaymentPayPalPlugin/config/test.yml
application_url: "http://localhost/payment_project/frontend_dev.php"
buyer_email: buyer_1248418913_per@letscod.com #sandbox buyer account email
buyer_password: SFP123456 #sandbox buyer account password
developer_email: symfony-plugins@letscod.com #sandbox developer account
developer_password: sfPaymentPlugin1 #sandbox developer password
Test that your plugin is working by connecting to
http://localhost/payment_project/frontend_dev.php/sfPaymentPayPal/sample
Sandbox credentials are available above.
Note : in the previous part, replace localhost by your server hostname and payment_project by the path to your symfony application.
How to use it
An example using sfPaymentPayPalPlugin is available on the sfPaymentPlugin page.
Testing the plugin
A default (working) test configuration is provided so that you can check that the plugin behaves correctly by executing the following test :
$ php plugins/sfPaymentPayPalPlugin/test/unit/PaymentTest.php
This test :
- connects to the sample payment page (
sfPaymentPayPalPlugin/modules/sfPaymentPayPal/templates/sampleSuccess.php)
- clicks on the payment button
- signs in to PayPal developer (required to use the sandbox)
- connects to PayPal Test Store
- signs in to PayPal sandbox
- pays with the PayPal account
- returns to your application
- validates the IPN with PayPal
Yes it works !

A quick word on this test.
- For sure it's a functional test, however as it is dealing with an external service (PayPal sandbox), we had to use unit like tests (this is why it is located in the unit folder). We would be really interested in getting some ideas about this.
- We've defined a default (working) test configuration with some PayPal sandbox logins and passwords so that the test can be run easily (without having to register to PayPal sandbox...). The main configuration you have to change is the "application_url" as it is going to be specific to your environment and we cannot guess it.
- And yes... Johnny had a hard time on this one ;-)
Feedback
Please provide feedbacks, comments, support on the symfony-payment-developers Google Group
TODO
- Support for [Website Payments Pro](https://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside "Website Payments Pro"
- Define where and how to implement the test located in test/unit/TransactionTest.php
- Implement more tests
- Refactor, secure and update following sfPaymentPlugin modifications