Plugin Directory

Changeset 3048893


Ignore:
Timestamp:
03/11/2024 08:34:43 AM (2 years ago)
Author:
bobgroup
Message:

Update to version 1.0.17 from GitLab (https://gitlab.bob.co.za/bobpay/bobpay-woocommerce-plugin; https://gitlab.bob.co.za/bobpay/bobpay-woocommerce-plugin/-/jobs/216093)

Location:
bob-pay
Files:
30 added
4 deleted
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bob-pay/tags/1.0.17/.gitlab-ci.yml

    r3006038 r3048893  
    66stages:
    77  - deploy
     8  - dev
    89
    910#======================================================================
     
    3132  when: on_success
    3233  allow_failure: false
     34
     35#======================================================================
     36#            Deploy Bob Pay woocommerce plugin to dev                 
     37#======================================================================
     38
     39image: shiplogic/ci-wp-plugin:dev
     40
     41variables:
     42  GIT_SUBMODULE_STRATEGY: recursive
     43
     44dev:
     45  stage: dev
     46  only:
     47    - dev
     48  before_script:
     49  # This should be set as a variable in gitlab https://gitlab.bob.co.za/bobpay/bobpay-woocommerce-plugin/-/settings/ci_cd
     50  # First get the correct key using current branch test_AWS_ACCESS_KEY_ID
     51  # Then expand the variable using eval
     52    - AWS_ACCESS_KEY_ID_KEY=$(echo "$CI_COMMIT_BRANCH"_"WORDPRESS_S3_ACCESS_KEY_ID")
     53    - AWS_SECRET_ACCESS_KEY_KEY=$(echo "$CI_COMMIT_BRANCH"_"WORDPRESS_S3_SECRET_ACCESS_KEY")
     54    - AWS_ACCESS_KEY_ID=$(eval echo -e "\$$AWS_ACCESS_KEY_ID_KEY")
     55    - AWS_SECRET_ACCESS_KEY=$(eval echo -e "\$$AWS_SECRET_ACCESS_KEY_KEY")
     56    - export AWS_ACCESS_KEY_ID
     57    - export AWS_SECRET_ACCESS_KEY
     58  # Clone the bobpay-woocommerce-plugin repository
     59    - npm install
     60  # Zip the build files
     61    - npm run build
     62  script:
     63  # Upload the zip file to s3://bobpay-s3-wordpress-plugin/
     64    - aws s3 cp bobpay-plugin.zip s3://bobpay-s3-wordpress-plugin/ --region=af-south-1
     65  when: on_success
     66  allow_failure: false
  • bob-pay/tags/1.0.17/.wp-env.json

    r3033055 r3048893  
    11{
    2     "plugins": [
    3         ".",
    4         "https://downloads.wordpress.org/plugin/woocommerce.8.3.0.zip"
    5     ],
    6     "config": {
    7         "BOBPAY_LOCAL_DEV": "true"
    8     }
     2  "plugins": [
     3    ".",
     4    "https://downloads.wordpress.org/plugin/woocommerce.8.5.1.zip"
     5  ],
     6  "config": {
     7    "BOBPAY_LOCAL_DEV": "true",
     8    "WP_DEBUG": "true",
     9    "NGROK_TUNNEL_URL": "https://d014-196-210-25-77.ngrok-free.app"
     10  },
     11  "phpVersion": "8.2"
    912}
  • bob-pay/tags/1.0.17/bobpay-plugin.php

    r3033055 r3048893  
    88 * Requires at least: 5.0
    99 * Requires PHP:      7.0
    10  * Version:           1.0.16
     10 * Version:           1.0.17
    1111 * License:           GPLv2 or later
    1212 */
    13 
    14 use Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry;
    1513
    1614// Keep public users out of .php files, no funny business allowed
    1715defined('ABSPATH') || exit;
    1816
    19 define('WC_BOBPAY_PLUGIN_VERSION', '1.0.16');
     17define('WC_BOBPAY_PLUGIN_VERSION', '1.0.17');
    2018define('WC_BOBPAY_PLUGIN_URL', untrailingslashit(plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))));
    2119define('WC_BOBPAY_PLUGIN_PATH', untrailingslashit(plugin_dir_path(__FILE__)));
     
    2725    }
    2826
    29     require_once(plugin_basename('includes/class-wc-bobpay-plugin.php'));
     27    require_once(plugin_basename('includes/class-wc-bobpay-plugin-credit-card.php'));
     28    require_once(plugin_basename('includes/class-wc-bobpay-plugin-instant-eft.php'));
     29    require_once(plugin_basename('includes/class-wc-bobpay-plugin-capitec-pay.php'));
     30    require_once(plugin_basename('includes/class-wc-bobpay-plugin-scan-to-pay.php'));
    3031    require_once(plugin_basename('includes/class-wc-bobpay-plugin-privacy.php'));
    3132    load_plugin_textdomain('bob-pay', false, trailingslashit(dirname(plugin_basename(__FILE__))));
     
    3637function woocommerce_bobpay_add_plugin($methods)
    3738{
    38     $methods[] = 'WC_BobPay_Plugin';
     39    $methods[] = 'WC_BobPay_Plugin_Credit_Card';
     40    $methods[] = 'WC_BobPay_Plugin_Instant_EFT';
     41    $methods[] = 'WC_BobPay_Plugin_Capitec_Pay';
     42    $methods[] = 'WC_BobPay_Plugin_Scan_To_Pay';
    3943    return $methods;
    4044}
     
    4650            'page' => 'wc-settings',
    4751            'tab' => 'checkout',
    48             'section' => 'wc_bobpay_plugin',
    4952        ),
    5053        admin_url('admin.php')
     
    6467{
    6568    if (class_exists('Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType')) {
    66         require_once dirname(__FILE__) . '/includes/class-wc-bobpay-plugin-blocks-support.php';
     69        require_once dirname(__FILE__) . '/includes/blocks-support/class-wc-bobpay-credit-card-blocks-support.php';
     70        require_once dirname(__FILE__) . '/includes/blocks-support/class-wc-bobpay-scan-to-pay-blocks-support.php';
     71        require_once dirname(__FILE__) . '/includes/blocks-support/class-wc-bobpay-capitec-pay-blocks-support.php';
     72        require_once dirname(__FILE__) . '/includes/blocks-support/class-wc-bobpay-instant-eft-blocks-support.php';
    6773        add_action(
    6874            'woocommerce_blocks_payment_method_type_registration',
    6975            function (Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry) {
    70                 $payment_method_registry->register(new WC_Bobpay_Blocks_Support);
     76                $payment_method_registry->register(new WC_Bobpay_Credit_Card_Blocks_Support);
     77                $payment_method_registry->register(new WC_Bobpay_Scan_To_Pay_Blocks_Support);
     78                $payment_method_registry->register(new WC_Bobpay_Capitec_Pay_Blocks_Support);
     79                $payment_method_registry->register(new WC_Bobpay_Instant_EFT_Blocks_Support);
    7180            }
    7281        );
     
    8594    }
    8695
    87     if (isset($gateway_order['bobpay'])) {
    88         unset($gateway_order['bobpay']);
     96    if (isset($gateway_order['bobpay_credit_card'], $gateway_order['bobpay_instant_eft'], $gateway_order['bobpay_capitec_pay'], $gateway_order['bobpay_scan_to_pay'])) {
     97        unset($gateway_order['bobpay_credit_card'], $gateway_order['bobpay_instant_eft'], $gateway_order['bobpay_capitec_pay'], $gateway_order['bobpay_scan_to_pay']);
    8998    }
    9099
    91     $gateway_order = array_merge(['bobpay' => 0], $gateway_order);
     100    $gateway_order = array_merge(['bobpay_credit_card' => 0, 'bobpay_instant_eft' => 1, 'bobpay_capitec_pay' => 2, 'bobpay_scan_to_pay' => 3], $gateway_order);
    92101
    93102    $i = 0;
     
    104113
    105114    // Set bobpay as default payment method
    106     WC()->session->set('chosen_payment_method', 'bobpay');
     115    WC()->session->set('chosen_payment_method', 'bobpay_credit_card');
    107116}
     117
     118// Check if each payment method has settings in wp_options
     119// If not, check if woocommerce_bobpay_settings has been set and use that to populate the settings
     120function populate_empty_settings()
     121{
     122    $payment_methods = array(
     123        'bobpay_credit_card',
     124        'bobpay_instant_eft',
     125        'bobpay_capitec_pay',
     126        'bobpay_scan_to_pay',
     127    );
     128
     129    foreach ($payment_methods as $payment_method) {
     130        $settings = get_option('woocommerce_' . $payment_method . '_settings');
     131        if (!empty($settings)) {
     132            continue;
     133        }
     134
     135        $settings = get_option('woocommerce_bobpay_settings');
     136        if (!empty($settings)) {
     137            update_option('woocommerce_' . $payment_method . '_settings', $settings);
     138        }
     139    }
     140}
     141add_action('init', 'populate_empty_settings');
  • bob-pay/tags/1.0.17/build/js/frontend/index.asset.php

    r3033055 r3048893  
    1 <?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities'), 'version' => 'd108c06a647d7dbcf9335dd4aa826233');
     1<?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities'), 'version' => 'fad5407c76547eca00a39b63d12c8ded');
  • bob-pay/tags/1.0.17/build/js/frontend/index.js

    r3033055 r3048893  
    1 !function(e){var t={};function r(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,r),l.l=!0,l.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)r.d(n,l,function(t){return e[t]}.bind(null,l));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,r){"use strict";r.r(t);var n=r(0),l=r(1),a=r(2),c=r(3);const i=Object(a.getSetting)("bobpay_data",{}),s=Object(a.getSetting)("bobpay_credit_card_data",{}),p=Object(a.getSetting)("bobpay_scan_to_pay_data",{}),b=Object(a.getSetting)("bobpay_capitec_pay_data",{}),m=Object(a.getSetting)("bobpay_instant_eft_data",{}),o=Object(c.decodeEntities)(i.title)||"Bob Pay",u=()=>Object(c.decodeEntities)(i.description||""),g={name:"bobpay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:i.logo_url,width:70,style:{margin:0}}),i.title," - ",Object(n.createElement)("img",{style:{height:"21px",margin:0},src:i.absa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.bank_zero_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.capitec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.discovery_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.fnb_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.investec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.nedbank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.standard_bank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.tyme_bank_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:i.supports}};Object(l.registerPaymentMethod)(g);const y={name:"bobpay_credit_card",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:s.logo_url,width:70,style:{margin:0}}),s.title," - ",Object(n.createElement)("img",{style:{height:"15px"},src:s.visa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:s.mastercard_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:i.supports}};Object(l.registerPaymentMethod)(y);const d={name:"bobpay_scan_to_pay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:p.logo_url,width:70,style:{margin:0}}),p.title," - ",Object(n.createElement)("img",{style:{height:"20px"},src:p.scan_to_pay_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:p.supports}};Object(l.registerPaymentMethod)(d);const j={name:"bobpay_capitec_pay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:b.logo_url,width:70,style:{margin:0}}),b.title," - ",Object(n.createElement)("img",{style:{height:"20px"},src:b.capitec_pay_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:b.supports}};Object(l.registerPaymentMethod)(j);const O={name:"bobpay_instant_eft",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:m.logo_url,width:70,style:{margin:0}}),m.title," - ",Object(n.createElement)("img",{style:{height:"21px",margin:0},src:m.absa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.bank_zero_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.capitec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.discovery_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.fnb_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.investec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.nedbank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.standard_bank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.tyme_bank_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:m.supports}};Object(l.registerPaymentMethod)(O)}]);
     1!function(e){var t={};function r(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,r),l.l=!0,l.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)r.d(n,l,function(t){return e[t]}.bind(null,l));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,r){"use strict";r.r(t);var n=r(0),l=r(1),a=r(3),c=r(2);const i=Object(c.getSetting)("bobpay_data",{}),s=Object(c.getSetting)("bobpay_credit_card_data",{}),p=Object(c.getSetting)("bobpay_scan_to_pay_data",{}),b=Object(c.getSetting)("bobpay_capitec_pay_data",{}),m=Object(c.getSetting)("bobpay_instant_eft_data",{}),o=Object(a.decodeEntities)(i.title)||"Bob Pay",u=()=>Object(a.decodeEntities)(i.description||""),g={name:"bobpay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:i.logo_url,width:70,style:{margin:0}}),i.title," - ",Object(n.createElement)("img",{style:{height:"21px",margin:0},src:i.absa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.bank_zero_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.capitec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.discovery_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.fnb_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.investec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.nedbank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.standard_bank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.tyme_bank_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:i.supports}};Object(l.registerPaymentMethod)(g);const y={name:"bobpay_credit_card",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:s.logo_url,width:70,style:{margin:0}}),s.title," - ",Object(n.createElement)("img",{style:{height:"15px"},src:s.visa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:s.mastercard_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:i.supports}};Object(l.registerPaymentMethod)(y);const d={name:"bobpay_scan_to_pay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:p.logo_url,width:70,style:{margin:0}}),p.title," - ",Object(n.createElement)("img",{style:{height:"20px"},src:p.scan_to_pay_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:p.supports}};Object(l.registerPaymentMethod)(d);const j={name:"bobpay_capitec_pay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:b.logo_url,width:70,style:{margin:0}}),b.title," - ",Object(n.createElement)("img",{style:{height:"20px"},src:b.capitec_pay_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:b.supports}};Object(l.registerPaymentMethod)(j);const O={name:"bobpay_instant_eft",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:m.logo_url,width:70,style:{margin:0}}),m.title," - ",Object(n.createElement)("img",{style:{height:"21px",margin:0},src:m.absa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.bank_zero_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.capitec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.discovery_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.fnb_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.investec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.nedbank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.standard_bank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.tyme_bank_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:m.supports}};Object(l.registerPaymentMethod)(O)}]);
  • bob-pay/tags/1.0.17/readme.txt

    r3033055 r3048893  
    55Tested up to: 6.1.1
    66Requires PHP: 7.0.0
    7 Stable tag: 1.0.16
     7Stable tag: 1.0.17
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
    52 = 1.0.15 =
     52= 1.0.17 =
     53Bug fix
     54
     55= 1.0.13 =
    5356Bug fix
    5457
  • bob-pay/tags/1.0.17/resources/js/frontend/index.js

    r3033055 r3048893  
    11import { registerPaymentMethod } from "@woocommerce/blocks-registry";
     2import { decodeEntities } from "@wordpress/html-entities";
    23import { getSetting } from "@woocommerce/settings";
    3 import { decodeEntities } from "@wordpress/html-entities";
    44
    55const settings = getSetting("bobpay_data", {});
     
    6666            }}
    6767        >
    68             <img
    69                 src={creditCardSettings.logo_url}
    70                 width={70}
    71                 style={{ margin: 0 }}
    72             />
     68            <img src={creditCardSettings.logo_url} width={70} style={{ margin: 0 }} />
    7369            {creditCardSettings.title}&nbsp;-&nbsp;
    7470            <img style={{ height: "15px" }} src={creditCardSettings.visa_url} />
    75             <img
    76                 style={{ height: "20px" }}
    77                 src={creditCardSettings.mastercard_url}
    78             />
     71            <img style={{ height: "20px" }} src={creditCardSettings.mastercard_url} />
    7972        </span>
    8073    );
    81 };
     74}
    8275const BobPayCreditCard = {
    8376    name: "bobpay_credit_card",
     
    10497            }}
    10598        >
    106             <img
    107                 src={scanToPaySettings.logo_url}
    108                 width={70}
    109                 style={{ margin: 0 }}
    110             />
     99            <img src={scanToPaySettings.logo_url} width={70} style={{ margin: 0 }} />
    111100            {scanToPaySettings.title}&nbsp;-&nbsp;
    112             <img
    113                 style={{ height: "20px" }}
    114                 src={scanToPaySettings.scan_to_pay_url}
    115             />
     101            <img style={{ height: "20px" }} src={scanToPaySettings.scan_to_pay_url} />
    116102        </span>
    117103    );
    118 };
     104}
    119105const BobPayScanToPay = {
    120106    name: "bobpay_scan_to_pay",
     
    141127            }}
    142128        >
    143             <img
    144                 src={capitecPaySettings.logo_url}
    145                 width={70}
    146                 style={{ margin: 0 }}
    147             />
     129            <img src={capitecPaySettings.logo_url} width={70} style={{ margin: 0 }} />
    148130            {capitecPaySettings.title}&nbsp;-&nbsp;
    149             <img
    150                 style={{ height: "20px" }}
    151                 src={capitecPaySettings.capitec_pay_url}
    152             />
     131            <img style={{ height: "20px" }} src={capitecPaySettings.capitec_pay_url} />
    153132        </span>
    154133    );
    155 };
     134}
    156135const BobPayCapitecPay = {
    157136    name: "bobpay_capitec_pay",
     
    178157            }}
    179158        >
    180             <img
    181                 src={instantEFTSettings.logo_url}
    182                 width={70}
    183                 style={{ margin: 0 }}
    184             />
     159            <img src={instantEFTSettings.logo_url} width={70} style={{ margin: 0 }} />
    185160            {instantEFTSettings.title}&nbsp;-&nbsp;
    186161            <img
     
    188163                src={instantEFTSettings.absa_url}
    189164            />
    190             <img
    191                 style={{ height: "20px" }}
    192                 src={instantEFTSettings.bank_zero_url}
    193             />
    194             <img
    195                 style={{ height: "20px" }}
    196                 src={instantEFTSettings.capitec_url}
    197             />
    198             <img
    199                 style={{ height: "20px" }}
    200                 src={instantEFTSettings.discovery_url}
    201             />
     165            <img style={{ height: "20px" }} src={instantEFTSettings.bank_zero_url} />
     166            <img style={{ height: "20px" }} src={instantEFTSettings.capitec_url} />
     167            <img style={{ height: "20px" }} src={instantEFTSettings.discovery_url} />
    202168            <img style={{ height: "20px" }} src={instantEFTSettings.fnb_url} />
    203             <img
    204                 style={{ height: "20px" }}
    205                 src={instantEFTSettings.investec_url}
    206             />
    207             <img
    208                 style={{ height: "20px" }}
    209                 src={instantEFTSettings.nedbank_url}
    210             />
    211             <img
    212                 style={{ height: "20px" }}
    213                 src={instantEFTSettings.standard_bank_url}
    214             />
    215             <img
    216                 style={{ height: "20px" }}
    217                 src={instantEFTSettings.tyme_bank_url}
    218             />
     169            <img style={{ height: "20px" }} src={instantEFTSettings.investec_url} />
     170            <img style={{ height: "20px" }} src={instantEFTSettings.nedbank_url} />
     171            <img style={{ height: "20px" }} src={instantEFTSettings.standard_bank_url} />
     172            <img style={{ height: "20px" }} src={instantEFTSettings.tyme_bank_url} />
    219173        </span>
    220174    );
    221 };
     175}
    222176const BobPayInstantEFT = {
    223177    name: "bobpay_instant_eft",
  • bob-pay/trunk/.gitlab-ci.yml

    r3006038 r3048893  
    66stages:
    77  - deploy
     8  - dev
    89
    910#======================================================================
     
    3132  when: on_success
    3233  allow_failure: false
     34
     35#======================================================================
     36#            Deploy Bob Pay woocommerce plugin to dev                 
     37#======================================================================
     38
     39image: shiplogic/ci-wp-plugin:dev
     40
     41variables:
     42  GIT_SUBMODULE_STRATEGY: recursive
     43
     44dev:
     45  stage: dev
     46  only:
     47    - dev
     48  before_script:
     49  # This should be set as a variable in gitlab https://gitlab.bob.co.za/bobpay/bobpay-woocommerce-plugin/-/settings/ci_cd
     50  # First get the correct key using current branch test_AWS_ACCESS_KEY_ID
     51  # Then expand the variable using eval
     52    - AWS_ACCESS_KEY_ID_KEY=$(echo "$CI_COMMIT_BRANCH"_"WORDPRESS_S3_ACCESS_KEY_ID")
     53    - AWS_SECRET_ACCESS_KEY_KEY=$(echo "$CI_COMMIT_BRANCH"_"WORDPRESS_S3_SECRET_ACCESS_KEY")
     54    - AWS_ACCESS_KEY_ID=$(eval echo -e "\$$AWS_ACCESS_KEY_ID_KEY")
     55    - AWS_SECRET_ACCESS_KEY=$(eval echo -e "\$$AWS_SECRET_ACCESS_KEY_KEY")
     56    - export AWS_ACCESS_KEY_ID
     57    - export AWS_SECRET_ACCESS_KEY
     58  # Clone the bobpay-woocommerce-plugin repository
     59    - npm install
     60  # Zip the build files
     61    - npm run build
     62  script:
     63  # Upload the zip file to s3://bobpay-s3-wordpress-plugin/
     64    - aws s3 cp bobpay-plugin.zip s3://bobpay-s3-wordpress-plugin/ --region=af-south-1
     65  when: on_success
     66  allow_failure: false
  • bob-pay/trunk/.wp-env.json

    r3033055 r3048893  
    11{
    2     "plugins": [
    3         ".",
    4         "https://downloads.wordpress.org/plugin/woocommerce.8.3.0.zip"
    5     ],
    6     "config": {
    7         "BOBPAY_LOCAL_DEV": "true"
    8     }
     2  "plugins": [
     3    ".",
     4    "https://downloads.wordpress.org/plugin/woocommerce.8.5.1.zip"
     5  ],
     6  "config": {
     7    "BOBPAY_LOCAL_DEV": "true",
     8    "WP_DEBUG": "true",
     9    "NGROK_TUNNEL_URL": "https://d014-196-210-25-77.ngrok-free.app"
     10  },
     11  "phpVersion": "8.2"
    912}
  • bob-pay/trunk/bobpay-plugin.php

    r3033055 r3048893  
    88 * Requires at least: 5.0
    99 * Requires PHP:      7.0
    10  * Version:           1.0.16
     10 * Version:           1.0.17
    1111 * License:           GPLv2 or later
    1212 */
    13 
    14 use Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry;
    1513
    1614// Keep public users out of .php files, no funny business allowed
    1715defined('ABSPATH') || exit;
    1816
    19 define('WC_BOBPAY_PLUGIN_VERSION', '1.0.16');
     17define('WC_BOBPAY_PLUGIN_VERSION', '1.0.17');
    2018define('WC_BOBPAY_PLUGIN_URL', untrailingslashit(plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))));
    2119define('WC_BOBPAY_PLUGIN_PATH', untrailingslashit(plugin_dir_path(__FILE__)));
     
    2725    }
    2826
    29     require_once(plugin_basename('includes/class-wc-bobpay-plugin.php'));
     27    require_once(plugin_basename('includes/class-wc-bobpay-plugin-credit-card.php'));
     28    require_once(plugin_basename('includes/class-wc-bobpay-plugin-instant-eft.php'));
     29    require_once(plugin_basename('includes/class-wc-bobpay-plugin-capitec-pay.php'));
     30    require_once(plugin_basename('includes/class-wc-bobpay-plugin-scan-to-pay.php'));
    3031    require_once(plugin_basename('includes/class-wc-bobpay-plugin-privacy.php'));
    3132    load_plugin_textdomain('bob-pay', false, trailingslashit(dirname(plugin_basename(__FILE__))));
     
    3637function woocommerce_bobpay_add_plugin($methods)
    3738{
    38     $methods[] = 'WC_BobPay_Plugin';
     39    $methods[] = 'WC_BobPay_Plugin_Credit_Card';
     40    $methods[] = 'WC_BobPay_Plugin_Instant_EFT';
     41    $methods[] = 'WC_BobPay_Plugin_Capitec_Pay';
     42    $methods[] = 'WC_BobPay_Plugin_Scan_To_Pay';
    3943    return $methods;
    4044}
     
    4650            'page' => 'wc-settings',
    4751            'tab' => 'checkout',
    48             'section' => 'wc_bobpay_plugin',
    4952        ),
    5053        admin_url('admin.php')
     
    6467{
    6568    if (class_exists('Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType')) {
    66         require_once dirname(__FILE__) . '/includes/class-wc-bobpay-plugin-blocks-support.php';
     69        require_once dirname(__FILE__) . '/includes/blocks-support/class-wc-bobpay-credit-card-blocks-support.php';
     70        require_once dirname(__FILE__) . '/includes/blocks-support/class-wc-bobpay-scan-to-pay-blocks-support.php';
     71        require_once dirname(__FILE__) . '/includes/blocks-support/class-wc-bobpay-capitec-pay-blocks-support.php';
     72        require_once dirname(__FILE__) . '/includes/blocks-support/class-wc-bobpay-instant-eft-blocks-support.php';
    6773        add_action(
    6874            'woocommerce_blocks_payment_method_type_registration',
    6975            function (Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry) {
    70                 $payment_method_registry->register(new WC_Bobpay_Blocks_Support);
     76                $payment_method_registry->register(new WC_Bobpay_Credit_Card_Blocks_Support);
     77                $payment_method_registry->register(new WC_Bobpay_Scan_To_Pay_Blocks_Support);
     78                $payment_method_registry->register(new WC_Bobpay_Capitec_Pay_Blocks_Support);
     79                $payment_method_registry->register(new WC_Bobpay_Instant_EFT_Blocks_Support);
    7180            }
    7281        );
     
    8594    }
    8695
    87     if (isset($gateway_order['bobpay'])) {
    88         unset($gateway_order['bobpay']);
     96    if (isset($gateway_order['bobpay_credit_card'], $gateway_order['bobpay_instant_eft'], $gateway_order['bobpay_capitec_pay'], $gateway_order['bobpay_scan_to_pay'])) {
     97        unset($gateway_order['bobpay_credit_card'], $gateway_order['bobpay_instant_eft'], $gateway_order['bobpay_capitec_pay'], $gateway_order['bobpay_scan_to_pay']);
    8998    }
    9099
    91     $gateway_order = array_merge(['bobpay' => 0], $gateway_order);
     100    $gateway_order = array_merge(['bobpay_credit_card' => 0, 'bobpay_instant_eft' => 1, 'bobpay_capitec_pay' => 2, 'bobpay_scan_to_pay' => 3], $gateway_order);
    92101
    93102    $i = 0;
     
    104113
    105114    // Set bobpay as default payment method
    106     WC()->session->set('chosen_payment_method', 'bobpay');
     115    WC()->session->set('chosen_payment_method', 'bobpay_credit_card');
    107116}
     117
     118// Check if each payment method has settings in wp_options
     119// If not, check if woocommerce_bobpay_settings has been set and use that to populate the settings
     120function populate_empty_settings()
     121{
     122    $payment_methods = array(
     123        'bobpay_credit_card',
     124        'bobpay_instant_eft',
     125        'bobpay_capitec_pay',
     126        'bobpay_scan_to_pay',
     127    );
     128
     129    foreach ($payment_methods as $payment_method) {
     130        $settings = get_option('woocommerce_' . $payment_method . '_settings');
     131        if (!empty($settings)) {
     132            continue;
     133        }
     134
     135        $settings = get_option('woocommerce_bobpay_settings');
     136        if (!empty($settings)) {
     137            update_option('woocommerce_' . $payment_method . '_settings', $settings);
     138        }
     139    }
     140}
     141add_action('init', 'populate_empty_settings');
  • bob-pay/trunk/build/js/frontend/index.asset.php

    r3033055 r3048893  
    1 <?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities'), 'version' => 'd108c06a647d7dbcf9335dd4aa826233');
     1<?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities'), 'version' => 'fad5407c76547eca00a39b63d12c8ded');
  • bob-pay/trunk/build/js/frontend/index.js

    r3033055 r3048893  
    1 !function(e){var t={};function r(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,r),l.l=!0,l.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)r.d(n,l,function(t){return e[t]}.bind(null,l));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,r){"use strict";r.r(t);var n=r(0),l=r(1),a=r(2),c=r(3);const i=Object(a.getSetting)("bobpay_data",{}),s=Object(a.getSetting)("bobpay_credit_card_data",{}),p=Object(a.getSetting)("bobpay_scan_to_pay_data",{}),b=Object(a.getSetting)("bobpay_capitec_pay_data",{}),m=Object(a.getSetting)("bobpay_instant_eft_data",{}),o=Object(c.decodeEntities)(i.title)||"Bob Pay",u=()=>Object(c.decodeEntities)(i.description||""),g={name:"bobpay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:i.logo_url,width:70,style:{margin:0}}),i.title," - ",Object(n.createElement)("img",{style:{height:"21px",margin:0},src:i.absa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.bank_zero_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.capitec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.discovery_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.fnb_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.investec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.nedbank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.standard_bank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.tyme_bank_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:i.supports}};Object(l.registerPaymentMethod)(g);const y={name:"bobpay_credit_card",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:s.logo_url,width:70,style:{margin:0}}),s.title," - ",Object(n.createElement)("img",{style:{height:"15px"},src:s.visa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:s.mastercard_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:i.supports}};Object(l.registerPaymentMethod)(y);const d={name:"bobpay_scan_to_pay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:p.logo_url,width:70,style:{margin:0}}),p.title," - ",Object(n.createElement)("img",{style:{height:"20px"},src:p.scan_to_pay_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:p.supports}};Object(l.registerPaymentMethod)(d);const j={name:"bobpay_capitec_pay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:b.logo_url,width:70,style:{margin:0}}),b.title," - ",Object(n.createElement)("img",{style:{height:"20px"},src:b.capitec_pay_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:b.supports}};Object(l.registerPaymentMethod)(j);const O={name:"bobpay_instant_eft",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:m.logo_url,width:70,style:{margin:0}}),m.title," - ",Object(n.createElement)("img",{style:{height:"21px",margin:0},src:m.absa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.bank_zero_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.capitec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.discovery_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.fnb_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.investec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.nedbank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.standard_bank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.tyme_bank_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:m.supports}};Object(l.registerPaymentMethod)(O)}]);
     1!function(e){var t={};function r(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,r),l.l=!0,l.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)r.d(n,l,function(t){return e[t]}.bind(null,l));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,r){"use strict";r.r(t);var n=r(0),l=r(1),a=r(3),c=r(2);const i=Object(c.getSetting)("bobpay_data",{}),s=Object(c.getSetting)("bobpay_credit_card_data",{}),p=Object(c.getSetting)("bobpay_scan_to_pay_data",{}),b=Object(c.getSetting)("bobpay_capitec_pay_data",{}),m=Object(c.getSetting)("bobpay_instant_eft_data",{}),o=Object(a.decodeEntities)(i.title)||"Bob Pay",u=()=>Object(a.decodeEntities)(i.description||""),g={name:"bobpay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:i.logo_url,width:70,style:{margin:0}}),i.title," - ",Object(n.createElement)("img",{style:{height:"21px",margin:0},src:i.absa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.bank_zero_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.capitec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.discovery_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.fnb_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.investec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.nedbank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.standard_bank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:i.tyme_bank_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:i.supports}};Object(l.registerPaymentMethod)(g);const y={name:"bobpay_credit_card",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:s.logo_url,width:70,style:{margin:0}}),s.title," - ",Object(n.createElement)("img",{style:{height:"15px"},src:s.visa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:s.mastercard_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:i.supports}};Object(l.registerPaymentMethod)(y);const d={name:"bobpay_scan_to_pay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:p.logo_url,width:70,style:{margin:0}}),p.title," - ",Object(n.createElement)("img",{style:{height:"20px"},src:p.scan_to_pay_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:p.supports}};Object(l.registerPaymentMethod)(d);const j={name:"bobpay_capitec_pay",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:b.logo_url,width:70,style:{margin:0}}),b.title," - ",Object(n.createElement)("img",{style:{height:"20px"},src:b.capitec_pay_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:b.supports}};Object(l.registerPaymentMethod)(j);const O={name:"bobpay_instant_eft",label:Object(n.createElement)(()=>Object(n.createElement)("span",{style:{display:"inline-flex",width:"80%",gridGap:"3px",alignItems:"center",flexWrap:"wrap"}},Object(n.createElement)("img",{src:m.logo_url,width:70,style:{margin:0}}),m.title," - ",Object(n.createElement)("img",{style:{height:"21px",margin:0},src:m.absa_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.bank_zero_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.capitec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.discovery_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.fnb_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.investec_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.nedbank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.standard_bank_url}),Object(n.createElement)("img",{style:{height:"20px"},src:m.tyme_bank_url})),null),content:Object(n.createElement)(u,null),edit:Object(n.createElement)(u,null),canMakePayment:()=>!0,ariaLabel:o,supports:{features:m.supports}};Object(l.registerPaymentMethod)(O)}]);
  • bob-pay/trunk/readme.txt

    r3033055 r3048893  
    55Tested up to: 6.1.1
    66Requires PHP: 7.0.0
    7 Stable tag: 1.0.16
     7Stable tag: 1.0.17
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
    52 = 1.0.15 =
     52= 1.0.17 =
     53Bug fix
     54
     55= 1.0.13 =
    5356Bug fix
    5457
  • bob-pay/trunk/resources/js/frontend/index.js

    r3033055 r3048893  
    11import { registerPaymentMethod } from "@woocommerce/blocks-registry";
     2import { decodeEntities } from "@wordpress/html-entities";
    23import { getSetting } from "@woocommerce/settings";
    3 import { decodeEntities } from "@wordpress/html-entities";
    44
    55const settings = getSetting("bobpay_data", {});
     
    6666            }}
    6767        >
    68             <img
    69                 src={creditCardSettings.logo_url}
    70                 width={70}
    71                 style={{ margin: 0 }}
    72             />
     68            <img src={creditCardSettings.logo_url} width={70} style={{ margin: 0 }} />
    7369            {creditCardSettings.title}&nbsp;-&nbsp;
    7470            <img style={{ height: "15px" }} src={creditCardSettings.visa_url} />
    75             <img
    76                 style={{ height: "20px" }}
    77                 src={creditCardSettings.mastercard_url}
    78             />
     71            <img style={{ height: "20px" }} src={creditCardSettings.mastercard_url} />
    7972        </span>
    8073    );
    81 };
     74}
    8275const BobPayCreditCard = {
    8376    name: "bobpay_credit_card",
     
    10497            }}
    10598        >
    106             <img
    107                 src={scanToPaySettings.logo_url}
    108                 width={70}
    109                 style={{ margin: 0 }}
    110             />
     99            <img src={scanToPaySettings.logo_url} width={70} style={{ margin: 0 }} />
    111100            {scanToPaySettings.title}&nbsp;-&nbsp;
    112             <img
    113                 style={{ height: "20px" }}
    114                 src={scanToPaySettings.scan_to_pay_url}
    115             />
     101            <img style={{ height: "20px" }} src={scanToPaySettings.scan_to_pay_url} />
    116102        </span>
    117103    );
    118 };
     104}
    119105const BobPayScanToPay = {
    120106    name: "bobpay_scan_to_pay",
     
    141127            }}
    142128        >
    143             <img
    144                 src={capitecPaySettings.logo_url}
    145                 width={70}
    146                 style={{ margin: 0 }}
    147             />
     129            <img src={capitecPaySettings.logo_url} width={70} style={{ margin: 0 }} />
    148130            {capitecPaySettings.title}&nbsp;-&nbsp;
    149             <img
    150                 style={{ height: "20px" }}
    151                 src={capitecPaySettings.capitec_pay_url}
    152             />
     131            <img style={{ height: "20px" }} src={capitecPaySettings.capitec_pay_url} />
    153132        </span>
    154133    );
    155 };
     134}
    156135const BobPayCapitecPay = {
    157136    name: "bobpay_capitec_pay",
     
    178157            }}
    179158        >
    180             <img
    181                 src={instantEFTSettings.logo_url}
    182                 width={70}
    183                 style={{ margin: 0 }}
    184             />
     159            <img src={instantEFTSettings.logo_url} width={70} style={{ margin: 0 }} />
    185160            {instantEFTSettings.title}&nbsp;-&nbsp;
    186161            <img
     
    188163                src={instantEFTSettings.absa_url}
    189164            />
    190             <img
    191                 style={{ height: "20px" }}
    192                 src={instantEFTSettings.bank_zero_url}
    193             />
    194             <img
    195                 style={{ height: "20px" }}
    196                 src={instantEFTSettings.capitec_url}
    197             />
    198             <img
    199                 style={{ height: "20px" }}
    200                 src={instantEFTSettings.discovery_url}
    201             />
     165            <img style={{ height: "20px" }} src={instantEFTSettings.bank_zero_url} />
     166            <img style={{ height: "20px" }} src={instantEFTSettings.capitec_url} />
     167            <img style={{ height: "20px" }} src={instantEFTSettings.discovery_url} />
    202168            <img style={{ height: "20px" }} src={instantEFTSettings.fnb_url} />
    203             <img
    204                 style={{ height: "20px" }}
    205                 src={instantEFTSettings.investec_url}
    206             />
    207             <img
    208                 style={{ height: "20px" }}
    209                 src={instantEFTSettings.nedbank_url}
    210             />
    211             <img
    212                 style={{ height: "20px" }}
    213                 src={instantEFTSettings.standard_bank_url}
    214             />
    215             <img
    216                 style={{ height: "20px" }}
    217                 src={instantEFTSettings.tyme_bank_url}
    218             />
     169            <img style={{ height: "20px" }} src={instantEFTSettings.investec_url} />
     170            <img style={{ height: "20px" }} src={instantEFTSettings.nedbank_url} />
     171            <img style={{ height: "20px" }} src={instantEFTSettings.standard_bank_url} />
     172            <img style={{ height: "20px" }} src={instantEFTSettings.tyme_bank_url} />
    219173        </span>
    220174    );
    221 };
     175}
    222176const BobPayInstantEFT = {
    223177    name: "bobpay_instant_eft",
Note: See TracChangeset for help on using the changeset viewer.