Skip to content

Commit

Permalink
Merge branch 'release/3.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Aug 16, 2021
2 parents 8bacb63 + 76f846a commit c71e882
Show file tree
Hide file tree
Showing 6 changed files with 339 additions and 40 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## [Unreleased][unreleased]
-

## [3.0.1] - 2021-08-16
### Added
- Added debug page for subscriptions follow-up payments.
- Added support for 'American Express' payment method.
- Added support for 'Mastercard' payment method.
- Added support for 'Visa' payment method.
- Added support for 'V PAY' payment method.

## [3.0.0] - 2021-08-05
### Changed
- Updated to `pronamic/wp-money` version ` 2.0.0`.
Expand Down Expand Up @@ -392,7 +400,8 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## 1.0.0
- First release.

[unreleased]: https://github.com/wp-pay/core/compare/3.0.0...HEAD
[unreleased]: https://github.com/wp-pay/core/compare/3.0.1...HEAD
[3.0.1]: https://github.com/wp-pay/core/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/wp-pay/core/compare/2.7.2...3.0.0
[2.7.2]: https://github.com/wp-pay/core/compare/2.7.1...2.7.2
[2.7.1]: https://github.com/wp-pay/core/compare/2.7.0...2.7.1
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wp-pay/core",
"version": "3.0.0",
"version": "3.0.1",
"description": "Core components for the WordPress payment processing library.",
"repository": {
"type": "git",
Expand Down
12 changes: 12 additions & 0 deletions src/Admin/AdminModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,18 @@ public function admin_menu() {
);
}

if ( \filter_input( INPUT_GET, 'pronamic_pay_debug', FILTER_VALIDATE_BOOLEAN ) ) {
$submenu_pages[] = array(
'page_title' => __( 'Debug', 'pronamic_ideal' ),
'menu_title' => __( 'Debug', 'pronamic_ideal' ),
'capability' => 'manage_options',
'menu_slug' => 'pronamic_pay_debug',
'function' => function() {
$this->render_page( 'debug' );
},
);
}

$minimum_capability = $this->get_minimum_capability( $submenu_pages );

try {
Expand Down
39 changes: 39 additions & 0 deletions src/Core/PaymentMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ class PaymentMethods {
*/
const ALIPAY = 'alipay';

/**
* American Express.
*
* @var string
* @since 3.0.1
*/
const AMERICAN_EXPRESS = 'american_express';

/**
* Apple Pay
*
Expand Down Expand Up @@ -227,6 +235,15 @@ class PaymentMethods {
*/
const MAESTRO = 'maestro';

/**
* Constant for the Mastercard payment method.
*
* @link https://www.mastercard.nl/
* @var string
* @since 3.0.1
*/
const MASTERCARD = 'mastercard';

/**
* Bancontact/Mister Cash
*
Expand Down Expand Up @@ -291,6 +308,15 @@ class PaymentMethods {
*/
const SWISH = 'swish';

/**
* Constant for the V PAY payment method.
*
* @link https://en.wikipedia.org/wiki/V_Pay
* @var string
* @since 3.0.1
*/
const V_PAY = 'v_pay';

/**
* Vipps
*
Expand All @@ -299,6 +325,15 @@ class PaymentMethods {
*/
const VIPPS = 'vipps';

/**
* Constant for the Visa payment method.
*
* @link https://www.visa.nl/
* @var string
* @since 3.0.1
*/
const VISA = 'visa';

/**
* Get payment methods
*
Expand All @@ -309,6 +344,7 @@ public static function get_payment_methods() {
$payment_methods = array(
self::AFTERPAY => __( 'AfterPay', 'pronamic_ideal' ),
self::ALIPAY => __( 'Alipay', 'pronamic_ideal' ),
self::AMERICAN_EXPRESS => __( 'American Express', 'pronamic_ideal' ),
self::APPLE_PAY => __( 'Apple Pay', 'pronamic_ideal' ),
self::BANCONTACT => __( 'Bancontact', 'pronamic_ideal' ),
self::BANK_TRANSFER => __( 'Bank Transfer', 'pronamic_ideal' ),
Expand Down Expand Up @@ -345,14 +381,17 @@ public static function get_payment_methods() {
self::KBC => __( 'KBC/CBC Payment Button', 'pronamic_ideal' ),
self::KLARNA_PAY_LATER => __( 'Klarna Pay Later', 'pronamic_ideal' ),
self::MAESTRO => __( 'Maestro', 'pronamic_ideal' ),
self::MASTERCARD => __( 'Mastercard', 'pronamic_ideal' ),
self::PAYCONIQ => __( 'Payconiq', 'pronamic_ideal' ),
self::PAYPAL => __( 'PayPal', 'pronamic_ideal' ),
self::PRZELEWY24 => __( 'Przelewy24', 'pronamic_ideal' ),
self::SANTANDER => __( 'Santander', 'pronamic_ideal' ),
self::SOFORT => __( 'SOFORT Banking', 'pronamic_ideal' ),
self::SPRAYPAY => __( 'SprayPay', 'pronamic_ideal' ),
self::SWISH => __( 'Swish', 'pronamic_ideal' ),
self::V_PAY => __( 'V PAY', 'pronamic_ideal' ),
self::VIPPS => __( 'Vipps', 'pronamic_ideal' ),
self::VISA => __( 'Visa', 'pronamic_ideal' ),
);

return $payment_methods;
Expand Down
Loading

0 comments on commit c71e882

Please sign in to comment.