Plugin Directory

Changeset 2887224


Ignore:
Timestamp:
03/26/2023 09:13:41 PM (3 years ago)
Author:
bluempaymentservices
Message:

1.3.17.1: Added extra fields for Gravity Forms eMandates integration.

Location:
bluem
Files:
1376 added
5 edited

Legend:

Unmodified
Added
Removed
  • bluem/trunk/README.md

    r2886890 r2887224  
    165165Also, add a checkbox with the name 'bluem_mandate_approve' (under 'Advanced' section, after enabling dynamic entries) and a label with the value 'true'. This will give the permission to perform the mandate request.
    166166
    167 Also, if you want to store the IBAN number or accountholder, you have to name the fields with the following names:
     167Also, if you want to store transaction details, you have to name the fields with the following names:
    168168```php
    169169bluem_mandate_accountname = Name of the accountholder
     170bluem_mandate_datetime = Date and time of registration
    170171bluem_mandate_iban = IBAN of the account
     172bluem_mandate_request_id = MandateID
    171173```
    172174Our plug-in will store the above data in the fields with the corresponding names.
  • bluem/trunk/bluem-integrations.php

    r2886890 r2887224  
    1010
    1111use Bluem\BluemPHP\Bluem;
     12use Carbon\Carbon;
    1213
    1314function bluem_woocommerce_integrations_settings_section() {
     
    11421143                $newValue = '';
    11431144
     1145                $payload = json_decode(json_encode($newPayload));
     1146
    11441147                if ($value['field_name'] === 'bluem_mandate_accountname') {
    1145                     $payload = json_decode(json_encode($newPayload));
    11461148                    $newValue = $payload->report->DebtorAccountName;
     1149                } elseif ($value['field_name'] === 'bluem_mandate_request_id') {
     1150                    $newValue = $payload->report->MandateRequestID;
     1151                } elseif ($value['field_name'] === 'bluem_mandate_datetime') {
     1152                    $newValue = Carbon::parse($payload->report->DateTime)->format('d-m-Y H:i');
    11471153                } elseif ($value['field_name'] === 'bluem_mandate_iban') {
    1148                     $payload = json_decode(json_encode($newPayload));
    11491154                    $newValue = $payload->report->DebtorIBAN;
    11501155                }
  • bluem/trunk/bluem.php

    r2886890 r2887224  
    22/**
    33 * Plugin Name: Bluem ePayments, iDIN and eMandates integration for shortcodes and WooCommerce checkout
    4  * Version: 1.3.17
     4 * Version: 1.3.17.1
    55 * Plugin URI: https://wordpress.org/plugins/bluem
    66 * Description: Bluem integration for WordPress and WooCommerce to facilitate Bluem services inside your site. Payments and eMandates payment gateway and iDIN identity verification
  • bluem/trunk/readme.txt

    r2886890 r2887224  
    66Tested up to: 6.1.1
    77Requires PHP: 7.4
    8 Stable tag: 1.3.17
     8Stable tag: 1.3.17.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7676
    7777== Changelog ==
     78- 1.3.17.1: Added extra fields for Gravity Forms eMandates integration.
    7879- 1.3.17: Gravity Forms eMandates integration.
    7980- 1.3.16.2: Stability fixes and improvements.
  • bluem/trunk/tests/Unit/BluemTest.php

    r2842058 r2887224  
    33namespace Unit;
    44
     5use Bluem\BluemPHP\Bluem;
     6use Bluem\BluemPHP\Exceptions\InvalidBluemConfigurationException;
     7use Exception;
    58use PHPUnit\Framework\TestCase;
     9use stdClass;
    610
    7 define('BLUEM_WOO_BASE_PATH', dirname(__FILE__)."\..\..\\");
    8 
    9 /**
    10  * Abstract base class for all BluemPHP unit tests.
    11  */
    1211class BluemTest extends TestCase
    1312{
    14     public function testCanTest()
    15     {
    16         $this->assertTrue(true);
     13    private Bluem $bluem;
     14
     15    protected function setUp(): void {
     16        parent::setUp();
     17       
     18        $bluem_config = $this->getConfig();
     19
     20        try {
     21            $this->bluem = new Bluem(
     22                $bluem_config
     23            );
     24        } catch (Exception $e) {
     25            $this->fail($e->getMessage());
     26        }
    1727    }
    1828
    19     public function testAddGetMethods()
     29    protected function tearDown(): void {
     30        //$this->bluem = Bluem;
     31    }
     32
     33    public function testMandateRequest() {
     34        $result = true;
     35        $this->assertEquals(true, $result);
     36    }
     37
     38    private function getConfig(): stdClass
    2039    {
    21         $this->assertTrue(true);
     40        $bluem_config = new stdClass;
     41        $bluem_config->environment = 'test';
     42        $bluem_config->senderID = 'S12345';
     43
     44        $bluem_config->brandID = 'BLUEM_BRANDID';
     45        $bluem_config->test_accessToken = 'BLUEM_TEST_ACCESS_TOKEN';
     46        $bluem_config->IDINBrandID = 'BLUEM_BRANDID';
     47        $bluem_config->merchantID = 'BLUEM_MERCHANTID';
     48        $bluem_config->merchantReturnURLBase = 'BLUEM_MERCHANTRETURNURLBASE';
     49
     50        $bluem_config->production_accessToken = "";
     51        $bluem_config->expectedReturnStatus = "success";
     52        $bluem_config->eMandateReason = "eMandateReason";
     53        $bluem_config->sequenceType = "OOFF";
     54        $bluem_config->localInstrumentCode = "B2B";
     55
     56        return $bluem_config;
    2257    }
    2358}
Note: See TracChangeset for help on using the changeset viewer.