O'Reilly logo

Getting Started with Magento Extension Development by Branko Ajzele

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extension business logic

In our extension, entire business logic is contained within a single app/code/community/Foggyline/Stripe/Model/Payment.php file. We are including the external Stripe library via the require_once dirname(__FILE__).'/../lib/Stripe.php'; statement. Then we are implementing the Stripe_Charge::create API call within the capture method, passing it the customer and credit card information. Since we are using the Stripe PHP library, there is not much of the code we need to write ourselves, so the implementation is pretty short and clean.

If you successfully executed all the previous steps, you should now have a functional payment extension. Although simple, functionality of this extension can be further extended by adding the rest ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required