Skip to content

Commit 9d0c2b2

Browse files
Move mgd files to own directory
1 parent 5639f37 commit 9d0c2b2

6 files changed

+82
-24
lines changed

omnipay_Eway_Rapid.mgd.php renamed to Metadata/omnipay_Eway_Rapid.mgd.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@
6464
),
6565
'EWAY_CARDCVN' => array('core_field_name' => 'cvv2'),
6666
),
67-
'billing_fields' => array(),
67+
'billing_fields' => array(
68+
'billing_first_name',
69+
'billing_middle_name',
70+
'billing_last_name',
71+
'billing_country_id' . '-' . CRM_Core_BAO_LocationType::getBilling(),
72+
),
6873
),
6974
),
7075
'params' => array(

omnipay_Eway_RapidDirect.mgd.php renamed to Metadata/omnipay_Eway_RapidDirect.mgd.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
'entity' => 'payment_processor_type',
4545
'metadata' => array(
4646
'is_transparent_redirect' => FALSE,
47+
'supports_preapproval' => TRUE,
4748
),
4849
'params' => array(
4950
'version' => 3,
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: eileen
5+
* Date: 17/06/2014
6+
* Time: 10:14 PM
7+
*
8+
* To add a new processor you need to add an item to this array. It is sequentially numerically indexed and the important aspects are
9+
*
10+
* - name - omnipay_{Processor_Name}, Omnipay calls the gateway method create with the processor name as the parameter.
11+
* To get the processor name take a look at the Readme for the gateway you are adding - you will generally see
12+
* The following gateways are provided by this package: Mollie so the name should be ominpay_Mollie (note matching capitalisation)
13+
*
14+
* A more complex example is omnipay_SecurePay_DirectPayment.
15+
* This breaks down as
16+
* - omnipay_ - our label within CiviCRM to denote Omnipay
17+
* - SecurePay - the namespace as declared within the composer.json within the securepay gateway
18+
* - DirectPost - the prefix on the Gateway file. It is called DirectPostGateway.php - this portion is excluded when the file is simply
19+
* named 'Gateway.php'
20+
*
21+
* - user_name_label, password_label, signature_label, subject_label - these are generally about telling the plugin what to call these when they pass them to
22+
* Omnipay. They are also shown to users so some reformatting is done to turn it into lower-first-letter camel case. Take a look at the gateway file for your gateway. This is directly under src.
23+
* Some provide more than one and the 'getName' function distinguishes them. The getDefaultParameters will tell you what to pass. eg if you see
24+
* 'apiKey' you should enter 'user_name' => 'Api Key' (you might ? be able to get away with 'API Key' - need to check). You can provide as many or as
25+
* few as you want of these and it's irrelevant which field you put them in but note that the signature field is the longest and that
26+
* in future versions of CiviCRM hashing may be done on password and signature on the screen.
27+
*
28+
* - 'class_name' => 'Payment_OmnipayMultiProcessor', (always)
29+
*
30+
* - 'url_site_default' - this is ignored. But, by giving one you make it easier for people adding processors
31+
*
32+
* - 'billing_mode' - 1 = onsite, 4 = redirect offsite (including transparent redirects).
33+
*
34+
* - payment_mode - 1 = credit card, 2 = debit card, 3 = transparent redirect. In practice 3 means that billing details are gathered on-site so
35+
* it may also be used with automatic redirects where address fields need to be mandatory for the signature.
36+
*
37+
* The record will be automatically inserted, updated, or deleted from the
38+
* database as appropriate. For more details, see "hook_civicrm_managed" at:
39+
* http://wiki.civicrm.org/confluence/display/CRMDOC/Hook+Reference
40+
*/
41+
return array(
42+
array(
43+
'name' => 'OmniPay - Eway_RapidShared',
44+
'entity' => 'payment_processor_type',
45+
'metadata' => array(
46+
'fields' => array(
47+
'billing_fields' => array(
48+
'billing_first_name',
49+
'billing_middle_name',
50+
'billing_last_name',
51+
'billing_country_id' . '-' . CRM_Core_BAO_LocationType::getBilling(),
52+
),
53+
),
54+
),
55+
'params' => array(
56+
'version' => 3,
57+
'title' => 'OmniPay - Eway_RapidShared',
58+
'name' => 'omnipay_Eway_RapidShared',
59+
'description' => 'Omnipay Eway Rapid',
60+
// DO NOT CHANGE: Labels are used as Omnipay gateway properties.
61+
'user_name_label' => 'Api Key',
62+
'password_label' => 'Password',
63+
'class_name' => 'Payment_OmnipayMultiProcessor',
64+
'url_site_default' => 'http://unused.com',
65+
'url_api_default' => 'http://unused.com',
66+
'url_recur_default' => 'http://unused.com',
67+
'url_site_test_default' => 'http://unused.com',
68+
'url_recur_test_default' => 'http://unused.com',
69+
'url_api_test_default' => 'http://unused.com',
70+
'billing_mode' => 4,
71+
'payment_type' => 1,
72+
'is_recur' => 1,
73+
),
74+
),
75+
);
File renamed without changes.

CRM/Core/Payment/processors.mgd.php renamed to Metadata/processors.mgd.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -250,29 +250,6 @@
250250
'is_recur' => 0,
251251
),
252252
),
253-
11 => array(
254-
'name' => 'OmniPay - Eway_RapidShared',
255-
'entity' => 'payment_processor_type',
256-
'params' => array(
257-
'version' => 3,
258-
'title' => 'OmniPay - Eway_RapidShared',
259-
'name' => 'omnipay_Eway_RapidShared',
260-
'description' => 'Omnipay Eway Rapid',
261-
// DO NOT CHANGE: Labels are used as Omnipay gateway properties.
262-
'user_name_label' => 'Api Key',
263-
'password_label' => 'Password',
264-
'class_name' => 'Payment_OmnipayMultiProcessor',
265-
'url_site_default' => 'http://unused.com',
266-
'url_api_default' => 'http://unused.com',
267-
'url_recur_default' => 'http://unused.com',
268-
'url_site_test_default' => 'http://unused.com',
269-
'url_recur_test_default' => 'http://unused.com',
270-
'url_api_test_default' => 'http://unused.com',
271-
'billing_mode' => 4,
272-
'payment_type' => 1,
273-
'is_recur' => 1,
274-
),
275-
),
276253
12 =>
277254
array(
278255
'name' => 'OmniPay - PayPal_Standard',

0 commit comments

Comments
 (0)