jenkins-bot has submitted this change and it was merged.

Change subject: add submethods to adyen adapter
......................................................................


add submethods to adyen adapter

Change-Id: I893205c36748d188c96f7617eaf24aa1da49b231
---
M adyen_gateway/adyen.adapter.php
1 file changed, 25 insertions(+), 0 deletions(-)

Approvals:
  Awight: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index e9a8d90..9fbee53 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -34,6 +34,13 @@
                return 'Gateway_Form_Mustache';
        }
 
+       public function getRequiredFields() {
+               $fields = parent::getRequiredFields();
+               $fields[] = 'address';
+               $fields[] = 'payment_submethod';
+               return $fields;
+       }
+
        function defineAccountInfo() {
                $this->accountInfo = array(
                        'merchantAccount' => $this->account_config[ 
'AccountName' ],
@@ -175,12 +182,30 @@
        public function definePaymentMethods() {
                $this->payment_methods = array(
                        'cc' => array(
+                               'label' => 'Credit Cards',
                                'validation' => array(
                                        'name' => true,
                                        'email' => true,
                                ),
                        ),
                );
+
+               $card_types = array( 'visa', 'amex', 'mc', 'discover' );
+               $this->payment_submethods = array();
+               foreach( $card_types as $name ) {
+
+                       $this->payment_submethods[$name] = array(
+                               'countries' => array( 'US' => true ),
+                               'group' => 'cc',
+                               'validation' => array(
+                                       'name' => true,
+                                       'email' => true,
+                                       'address' => true,
+                                       'amount' => true,
+                               ),
+                               'logo' => "card-{$name}.png",
+                       );
+               }
        }
 
        protected function getAllowedPaymentMethods() {

-- 
To view, visit https://gerrit.wikimedia.org/r/253483
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I893205c36748d188c96f7617eaf24aa1da49b231
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Cdentinger <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to