Skip to content

Commit

Permalink
Merge branch 'release/4.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Sep 26, 2022
2 parents 4967b4c + 8fe18e5 commit ff427d0
Show file tree
Hide file tree
Showing 14 changed files with 475 additions and 256 deletions.
14 changes: 14 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"core": null,
"plugins": [
".",
"../../../",
"pronamic/wp-pronamic-pay-test-helper",
"https://downloads.wordpress.org/plugin/pronamic-client.zip",
"https://downloads.wordpress.org/plugin/query-monitor.zip",
"https://downloads.wordpress.org/plugin/one-time-login.zip"
],
"config": {
"PRONAMIC_PAY_DEBUG": true
}
}
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## [Unreleased][unreleased]
-

## [4.2.0] - 2022-09-26
- Updated payment methods registration.
- Updated for Sisow via Buckaroo integration (pronamic/wp-pronamic-pay-sisow#3).

## [4.1.0] - 2022-04-11
- No longer catch exception, should be handled downstream.
- No longer use core gateway mode.
Expand Down Expand Up @@ -115,7 +119,8 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## [1.0.0] - 2015-01-19
- First release.

[unreleased]: https://github.com/wp-pay-gateways/buckaroo/compare/4.1.0...HEAD
[unreleased]: https://github.com/wp-pay-gateways/buckaroo/compare/4.2.0...HEAD
[4.2.0]: https://github.com/pronamic/wp-pronamic-pay-buckaroo/compare/4.1.0...4.2.0
[4.1.0]: https://github.com/wp-pay-gateways/buckaroo/compare/4.0.0...4.1.0
[4.0.0]: https://github.com/wp-pay-gateways/buckaroo/compare/3.0.2...4.0.0
[3.0.2]: https://github.com/wp-pay-gateways/buckaroo/compare/3.0.1...3.0.2
Expand Down
12 changes: 9 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"roots/wordpress-core-installer": true,
"bamarni/composer-bin-plugin": true
}
},
"require": {
"php": ">=5.6.20",
Expand All @@ -42,15 +48,15 @@
"php-coveralls/php-coveralls": "^2.4",
"phpmd/phpmd": "^2.7",
"phpunit/phpunit": "^5.7 || ^6.0",
"pronamic/wp-coding-standards": "^1.0",
"pronamic/wp-coding-standards": "^1.2",
"roots/wordpress": "^5.8",
"wp-cli/wp-cli": "^2.3",
"wp-phpunit/wp-phpunit": "^5.8",
"yoast/phpunit-polyfills": "^1.0"
},
"scripts": {
"coveralls": "vendor/bin/php-coveralls -v",
"phpcbf": "vendor/bin/phpcbf",
"phpcbf": "XDEBUG_MODE=off vendor/bin/phpcbf",
"phpcs": "XDEBUG_MODE=off vendor/bin/phpcs -s -v",
"phplint": "vendor/bin/phplint",
"phpmd": "vendor/bin/phpmd src,tests text phpmd.ruleset.xml --suffixes php",
Expand Down
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "buckaroo",
"version": "4.1.0",
"version": "4.2.0",
"description": "Buckaroo driver for the WordPress payment processing library.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -32,12 +32,21 @@
},
"homepage": "http://www.wp-pay.org/gateways/buckaroo/",
"devDependencies": {
"@wordpress/env": "^5.2.0",
"grunt": "^1.0.4",
"grunt-contrib-jshint": "^2.1.0",
"grunt-phpcs": "^0.4.0",
"grunt-phplint": "0.1.0",
"grunt-phpmd": "^0.1.1",
"grunt-phpunit": "^0.3.6",
"npm-run-all": "^4.1.5",
"load-grunt-tasks": "^5.1.0"
},
"scripts": {
"start": "wp-env start --xdebug && npm run setup && npm run login",
"setup": "npm-run-all setup-*",
"setup-buckaroo-website-key": "wp-env run cli wp config set BUCKAROO_WEBSITE_KEY $BUCKAROO_WEBSITE_KEY",
"setup-buckaroo-secret-key": "wp-env run cli wp config set BUCKAROO_SECRET_KEY $BUCKAROO_SECRET_KEY",
"login": "wp-env run cli wp user one-time-login admin"
}
}
26 changes: 26 additions & 0 deletions pronamic-pay-buckaroo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* Plugin Name: Pronamic Pay Buckaroo Add-On
* Plugin URI: https://www.pronamic.eu/plugins/pronamic-pay-buckaroo/
* Description: Extend the Pronamic Pay plugin with the Buckaroo gateway to receive payments through a variety of WordPress plugins.
*
* Version: 4.1.0
* Requires at least: 4.7
*
* Author: Pronamic
* Author URI: https://www.pronamic.eu/
*
* Text Domain: pronamic-pay-buckaroo
* Domain Path: /languages/
*
* License: GPL-3.0-or-later
*
* Depends: wp-pay/core
*
* GitHub URI: https://github.com/pronamic/wp-pronamic-pay-buckaroo
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Buckaroo
*/
10 changes: 5 additions & 5 deletions src/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CLI {
* Construct CLI.
*
* @param Integration $integration Integration.
* @retrun void
* @return void
*/
public function __construct( $integration ) {
$this->integration = $integration;
Expand All @@ -48,19 +48,19 @@ public function __construct( $integration ) {
function( $args, $assoc_args ) {
$this->wp_cli_transaction_status( $args, $assoc_args );
},
array(
[
'shortdesc' => 'This returns the status for the provided transaction',
)
]
);

\WP_CLI::add_command(
'pronamic-pay buckaroo transaction refund-info',
function( $args, $assoc_args ) {
$this->wp_cli_transaction_refund_info( $args, $assoc_args );
},
array(
[
'shortdesc' => 'This returns the refund info',
)
]
);
}

Expand Down
18 changes: 17 additions & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Pronamic\WordPress\Pay\Gateways\Buckaroo;

use JsonSerializable;
use Pronamic\WordPress\Pay\Core\GatewayConfig;

/**
Expand All @@ -14,7 +15,7 @@
* @version 2.0.0
* @since 1.0.0
*/
class Config extends GatewayConfig {
class Config extends GatewayConfig implements JsonSerializable {
/**
* Host.
*
Expand Down Expand Up @@ -110,4 +111,19 @@ public function get_excluded_services() {
public function get_invoice_number() {
return $this->invoice_number;
}

/**
* Serialize to JSON.
*
* @link https://www.w3.org/TR/json-ld11/#specifying-the-type
* @return mixed|void
*/
public function jsonSerialize() {
return [
'@type' => __CLASS__,
'host' => $this->host,
'website_key' => (string) $this->website_key,
'secret_key' => (string) $this->secret_key,
];
}
}
Loading

0 comments on commit ff427d0

Please sign in to comment.