How it works...

We have created an IAP service on https://iap-sandbox.odoo.com/, as we want to test the IAP service before moving the service into the production. Let's explore the use of the fields that we filled in while creating the service:

  • The Technical name is used to identify your service, and it must be a unique name. We have added the book_isbn technical name here. (It is not possible to change this later.)
  • The Label, Description, and Service Logo are used for informational purposes. This information will be displayed on the web page when the user is purchasing the service.
  • The Unit Name is the unit by which your service is sold. For example, in an SMS service, your Unit Name will be SMS (for example, 100 SMS in $5). In our case, we have used the Books info Unit Name.
  • The Trial Credit is the free credit provided to a customer for testing. This is only provided once per customer.
  • The Privacy Policy is the URL of the privacy policy for your service.

After submitting these details, your service will be created and it will display the service key. Refer to the image shown in step 5 of this recipe for more information. Store this key securely, because it won't be displayed again, although it is possible to generate a new key from the same page. The service key will be used to capture customer credit during a service request.

We still need to create plans for our service. You need to provide the plan name, description, logo, amount, and price. The amount field is used for the number of service units for that plan. The price field is used for defining the amount that a user needs to pay to get this plan. In step 6 of this recipe, we created a plan for 50 Books Info in 10 Euro. Here, Book Info is the unit type that we submitted during the creation of the service. This means that if a user purchases this plan, he will be able to get the information for 50 books.

Odoo takes 25% commission from this price, so define your service plan price accordingly.

Now, we will create an IAP service and an IAP client module in the following sections.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset