Latest version can be downloaded from:
http://www.yiiframew...xtension/ppext/
EDIT: The first version (ppext.tar.gz / ppext.zip in this post) has faulty IPN-code,
please download from the url above.
I am developing an event based PayPal extension for Yii, and would like to know it there is any interest in this? Feedback and feature requests are very welcome.
Features so far:
- Button manager (you specify settings using an array of NVP-values)
- PDT handler
- IPN handler
- Logging via Yii::log()
EXAMPLE USAGE
PDT- and IPN listeners (see src-code for a better example, including some payment processing)
class MinimalController extends Controller
{
public function actionPdt() {
$pdt = new PPPdtAction($this, "pdt");
// Process payment
$pdt->onRequest = function($event) {
$this->onSuccess($event);
};
// Notify user on success
$pdt->onSuccess = function($event) {
$event->sender->controller->renderText("Success");
};
// Notify user on failure
$pdt->onFailure = function($event) {
$event->sender->controller->renderText("Failure");
};
$pdt->run();
}
public function actionIpn() {
$ipn = new PPIpnAction($this,"ipn");
// Process payment
$ipn->onRequest = function($event) {
$event->setMsg("Received payment.");
$ipn->onSuccess($event);
};
// Log success
$ipn->onSuccess = function($event) {
Yii::log($event->msg, "info", "payPal.controllers.DefaultController");
};
// Log failure
$ipn->onFailure = function($event) {
Yii::log($event->msg, "error", "payPal.controller.DefaultController");
};
$ipn->run();
}
}
Button Manager - Creating a buy now button
$this->bm = Yii::app()->getModule('payPal')->buttonManager;
$this->bm->createButton($name, array('BUTTONTYPE'=>'BUYNOW'));
Installation instructions:
1. Extract the file into WebRoot/modules/payPal
2. Open WebRoot/modules/payPal/PayPalModule.php for further instructions
Attached File(s)
-
ppext.tar.gz (10.75K)
Number of downloads: 16 -
ppext.zip (24.67K)
Number of downloads: 40

Help

















