Book Image

PrestaShop Module Development

By : Fabien Serny
Book Image

PrestaShop Module Development

By: Fabien Serny

Overview of this book

Table of Contents (19 chapters)
PrestaShop Module Development
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. The Payment Module

In PrestaShop, there are three types of modules: regular modules (which we developed in the first six chapters), carrier modules (which we saw in the previous chapter), and payment modules. In this chapter, you will learn about how payment modules work.

We will first create a module that will handle both check and bank wire payments. Mainly, it will transform a cart into an order (basic payment module). Then, we will add a few more complex features.

In this chapter, we will see how to:

  • Create a basic payment module

  • Use the validateOrder function to transform a cart into an order

  • Create new order states

  • Send an e-mail

  • Connect to a third-party API