View source | View content page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Show collection (0 pages)
Collections help

Search

Projects:LoyaltyManagement/Technical Guide/PaymentConnector

Contents

How to create a Payment Connector for loyalty

Introduction

This document explains an example how to create a payment connector for the redemption of loyalty points. In this case it is useful to get used to work with payment connector on WebPOS. You can find some information on the following link. http://wiki.openbravo.com/wiki/Retail:Developers_Guide/External_Payment_Providers

Create the kind

You will need to know the basics of Openbravo's JavaScript code, such as modularization, Component Providers, etc...

Here you can find an example of a dummy implementation of a payment connector for loyalty.

It is useful to extend from OBLOY_.UI.PaymentProvider kind since there is already implemented a payment connector.

Bulbgraph.png   It is not possible to used directly the OBLOY_.UI.PaymentProvider, it is needed to extend it. If you have any terminal with a different loyalty program it is mandatory to have different payment connectors
 
enyo.kind({
  name: 'SALOY_.UI.PaymentProvider',
  kind: 'OBLOY_.UI.PaymentProvider',
  initComponents: function () {
    this.inherited(arguments);
  }
});

The payment connector is extensible so you can modify the components and the functions of the predefined payment connector.

In order to see if the default Payment Connector fits your development go to the Functional Specs. Link to functional specs pending

Parameters

When you extend a kind you can override some values, we have some defined that will change the behavior of the connector:

Set as true to allow voiding a transaction done with loyalty program. (Set as false by default)

Set as true to ask for a PIN while paying with loyalty program. (Set as true by default)

Example:

 
enyo.kind({
  name: 'SALOY_.UI.PaymentProvider',
  kind: 'OBLOY_.UI.PaymentProvider',
 
  // In case you don't want PIN
  isPinAllowed: false,
 
  initComponents: function () {
    this.inherited(arguments);
  }
});

Retrieved from "http://wiki.openbravo.com/wiki/Projects:LoyaltyManagement/Technical_Guide/PaymentConnector"

This page has been accessed 323 times. This page was last modified on 27 October 2014, at 08:28. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.