Skip to content

Commit

Permalink
Merge branch 'release/4.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Nov 3, 2022
2 parents 7baee62 + ca4461a commit bd70730
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ All notable changes to this project will be documented in this file.
This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com/).

## [Unreleased][unreleased]
- Removed `Gateway->update_subscription( Payment $payment )` method, no longer used. ([pronamic/wp-pay-core#41](https://github.com/pronamic/wp-pay-core/issues/41))
- Removed `Gateway->cancel_subscription( Subscription $subscription )` method, no longer used. ([pronamic/wp-pay-core#41](https://github.com/pronamic/wp-pay-core/issues/41)).
- Added support for multi-dimensional array in `Util::html_hidden_fields( $data )` method. ([pronamic/wp-pay-core#73](https://github.com/pronamic/wp-pay-core/issues/73))

## [4.5.0] - 2022-11-03
- Catch exceptions while retrieving options from for example iDEAL issuer select fields. ([#78](https://github.com/pronamic/wp-pay-core/issues/78))
- Allow subscription payments at gateways that don't have support for recurring payments. ([pronamic/wp-pronamic-pay-woocommerce#15](https://github.com/pronamic/wp-pronamic-pay-woocommerce/issues/15))
- Added MobilePay payment method. ([pronamic/wp-pronamic-pay-adyen#16](https://github.com/pronamic/wp-pronamic-pay-adyen/issues/16))

## [4.4.1] - 2022-10-11
- Added support for multi-dimensional array in `Util::html_hidden_fields()` method (pronamic/wp-pay-core#73).
- Fixed setting empty consumer bank details object (pronamic/wp-pronamic-pay-mollie#11).
- Removed unused gateway subscription methods.
- Removed payment method specific support values `recurring_apple_pay`, `recurring_credit_card` and `recurring_direct_debit`.
- Removed `Gateway->update_subscription( Payment $payment )` method, no longer used. ([pronamic/wp-pay-core#41](https://github.com/pronamic/wp-pay-core/issues/41))
- Removed `Gateway->cancel_subscription( Subscription $subscription )` method, no longer used. ([pronamic/wp-pay-core#41](https://github.com/pronamic/wp-pay-core/issues/41)).

## [4.4.0] - 2022-09-26
- Fixed list table styling on mobile (pronamic/wp-pay-core#72).
Expand Down Expand Up @@ -531,7 +535,8 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## 1.0.0
- First release.

[unreleased]: https://github.com/pronamic/wp-pay-core/compare/4.4.1...HEAD
[unreleased]: https://github.com/pronamic/wp-pay-core/compare/4.5.0...HEAD
[4.5.0]: https://github.com/pronamic/wp-pay-core/compare/4.4.1...4.5.0
[4.4.1]: https://github.com/pronamic/wp-pay-core/compare/4.4.0...4.4.1
[4.4.0]: https://github.com/pronamic/wp-pay-core/compare/4.3.1...4.4.0
[4.3.1]: https://github.com/pronamic/wp-pay-core/compare/4.3.0...4.3.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": "4.4.1",
"version": "4.5.0",
"description": "Core components for the WordPress payment processing library.",
"repository": {
"type": "git",
Expand Down
3 changes: 0 additions & 3 deletions src/Core/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ abstract class Gateway {
*
* Possible values:
* - payment_status_request Gateway can request current payment status.
* - recurring_apple_pay Recurring payments through Apple Pay.
* - recurring_credit_card Recurring payments through credit card.
* - recurring_direct_debit Recurring payments through direct debit.
*/
use SupportsTrait;

Expand Down
9 changes: 9 additions & 0 deletions src/Core/PaymentMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ class PaymentMethods {
*/
const MISTER_CASH = 'mister_cash';

/**
* MobilePay
*
* @link https://www.mobilepay.dk/
* @var string
*/
const MOBILEPAY = 'mobilepay';

/**
* Constant for the Payconiq method.
*
Expand Down Expand Up @@ -448,6 +456,7 @@ public static function get_payment_methods() {
self::MAESTRO => __( 'Maestro', 'pronamic_ideal' ),
self::MASTERCARD => __( 'Mastercard', 'pronamic_ideal' ),
self::MB_WAY => __( 'MB WAY', 'pronamic_ideal' ),
self::MOBILEPAY => __( 'MobilePay', 'pronamic_ideal' ),
self::PAYCONIQ => __( 'Payconiq', 'pronamic_ideal' ),
self::PAYPAL => __( 'PayPal', 'pronamic_ideal' ),
self::PRZELEWY24 => __( 'Przelewy24', 'pronamic_ideal' ),
Expand Down
8 changes: 7 additions & 1 deletion src/Fields/SelectField.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ public function jsonSerialize() {
$data = parent::jsonSerialize();

$data['type'] = 'select';
$data['options'] = $this->get_flat_options();
$data['options'] = [];

try {
$data['options'] = $this->get_flat_options();
} catch ( \Exception $e ) {
$data['error'] = $e->getMessage();
}

return $data;
}
Expand Down
4 changes: 0 additions & 4 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1192,10 +1192,6 @@ public static function start_payment( Payment $payment ) {

// Start payment at the gateway.
try {
if ( \count( $subscriptions ) > 0 && ! $gateway->supports( 'recurring' ) ) {
throw new \Exception( 'Gateway does not support recurring payments.' );
}

self::pronamic_service( $payment );

$gateway->start( $payment );
Expand Down

0 comments on commit bd70730

Please sign in to comment.