add repo info to doco yoyo
[Business-OnlinePayment.git] / notes_for_module_writers_v3
1 These are the module writer's notes for v3.  See the regular
2 "notes_for_module_writers" file first.
3
4
5 - If your gateway is HTTPS-based, use (or convert to)
6   Business::OnlinePayment::HTTPS !!
7
8     - Business::OnlinePayment::OpenECHO is the first "v3-ish" module, try
9       starting from there.
10
11
12 - Handling failures:
13
14     - If your processor module encounters a setup problem, communication
15       error or other problem that's prevents the card from even being
16       run, you should die (or croak) with a useful error message.  Setting
17       is_success to 0 and returning normally should only be done when the
18       transaction *processing* was sucessful (or at least elicited some sort
19       of result from the gateway), but the transaction itself returned a
20       "normal" decline status of some sort.
21       
22     - (NEW IN 3.00_04) You should set "failure_status" depending on the
23       specific failure result, if (and only if) the failure results from one
24       of the defined statuses:
25
26       - "expired"
27       - "nsf" (non-sufficient funds / credit limit)
28       - "stolen"
29       - "pickup"
30       - "blacklisted"
31       - "inactive" (inactive card or not authorized for card-not-present) (?)
32       - "decline" (other card/transaction declines only, not other errors)
33   
34       You should use code like this so your module can work with B:OP versions
35       before 3.00_04:
36
37         $self->build_subs('failure_status') unless $self->can('failure_status');
38
39       (or add "failure_status" to your build_subs call if you have one during
40       initialization)
41