Version Description
- Fix - Order with Payment received when Hosted Fields transaction is declined. #88
Download this release
Release Info
Developer | woothemes |
Plugin | WooCommerce PayPal Payments |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- changelog.txt +3 -0
- modules/ppcp-api-client/src/Endpoint/class-orderendpoint.php +7 -0
- modules/ppcp-wc-gateway/src/Gateway/class-processpaymenttrait.php +6 -0
- package-lock.json +10 -2
- readme.txt +5 -2
- vendor/autoload.php +1 -1
- vendor/composer/ClassLoader.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.json +2 -1
- woocommerce-paypal-payments.php +1 -1
changelog.txt
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
*** Changelog ***
|
2 |
|
|
|
|
|
|
|
3 |
= 1.0.2 - 2020-11-09 =
|
4 |
* Fix - Purchases over 1.000 USD fail. #84
|
5 |
|
1 |
*** Changelog ***
|
2 |
|
3 |
+
= 1.0.3 - 2020-11-30 =
|
4 |
+
* Fix - Order with Payment received when Hosted Fields transaction is declined. #88
|
5 |
+
|
6 |
= 1.0.2 - 2020-11-09 =
|
7 |
* Fix - Purchases over 1.000 USD fail. #84
|
8 |
|
modules/ppcp-api-client/src/Endpoint/class-orderendpoint.php
CHANGED
@@ -329,7 +329,14 @@ class OrderEndpoint {
|
|
329 |
);
|
330 |
throw $error;
|
331 |
}
|
|
|
332 |
$order = $this->order_factory->from_paypal_response( $json );
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
return $order;
|
334 |
}
|
335 |
|
329 |
);
|
330 |
throw $error;
|
331 |
}
|
332 |
+
|
333 |
$order = $this->order_factory->from_paypal_response( $json );
|
334 |
+
|
335 |
+
$purchase_units_payments_captures_status = $order->purchase_units()[0]->payments()->captures()[0]->status() ?? '';
|
336 |
+
if ( $purchase_units_payments_captures_status && 'DECLINED' === $purchase_units_payments_captures_status ) {
|
337 |
+
throw new RuntimeException( __( 'Payment provider declined the payment, please use a different payment method.', 'woocommerce-paypal-payments' ) );
|
338 |
+
}
|
339 |
+
|
340 |
return $order;
|
341 |
}
|
342 |
|
modules/ppcp-wc-gateway/src/Gateway/class-processpaymenttrait.php
CHANGED
@@ -10,6 +10,7 @@ declare( strict_types=1 );
|
|
10 |
namespace WooCommerce\PayPalCommerce\WcGateway\Gateway;
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
|
|
13 |
|
14 |
/**
|
15 |
* Trait ProcessPaymentTrait
|
@@ -71,7 +72,12 @@ trait ProcessPaymentTrait {
|
|
71 |
}
|
72 |
|
73 |
$this->session_handler->destroy_session_data();
|
|
|
|
|
|
|
|
|
74 |
}
|
|
|
75 |
wc_add_notice(
|
76 |
$this->order_processor->last_error(),
|
77 |
'error'
|
10 |
namespace WooCommerce\PayPalCommerce\WcGateway\Gateway;
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
13 |
+
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
14 |
|
15 |
/**
|
16 |
* Trait ProcessPaymentTrait
|
72 |
}
|
73 |
|
74 |
$this->session_handler->destroy_session_data();
|
75 |
+
} catch ( RuntimeException $error ) {
|
76 |
+
$this->session_handler->destroy_session_data();
|
77 |
+
wc_add_notice( $error->getMessage(), 'error' );
|
78 |
+
return null;
|
79 |
}
|
80 |
+
|
81 |
wc_add_notice(
|
82 |
$this->order_processor->last_error(),
|
83 |
'error'
|
package-lock.json
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
{
|
2 |
"name": "woocommerce-paypal-payments",
|
3 |
-
"version": "1.0.
|
4 |
-
"lockfileVersion":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
}
|
1 |
{
|
2 |
"name": "woocommerce-paypal-payments",
|
3 |
+
"version": "1.0.3",
|
4 |
+
"lockfileVersion": 2,
|
5 |
+
"requires": true,
|
6 |
+
"packages": {
|
7 |
+
"": {
|
8 |
+
"version": "1.0.3",
|
9 |
+
"license": "GPL-2.0",
|
10 |
+
"devDependencies": {}
|
11 |
+
}
|
12 |
+
}
|
13 |
}
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: woocommerce, automattic
|
3 |
Tags: woocommerce, paypal, payments, ecommerce, e-commerce, store, sales, sell, shop, shopping, cart, checkout
|
4 |
Requires at least: 5.3
|
5 |
-
Tested up to: 5.
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -58,6 +58,9 @@ Follow the steps below to connect the plugin to your PayPal account:
|
|
58 |
|
59 |
== Changelog ==
|
60 |
|
|
|
|
|
|
|
61 |
= 1.0.2 =
|
62 |
* Fix - Purchases over 1.000 USD fail. #84
|
63 |
|
2 |
Contributors: woocommerce, automattic
|
3 |
Tags: woocommerce, paypal, payments, ecommerce, e-commerce, store, sales, sell, shop, shopping, cart, checkout
|
4 |
Requires at least: 5.3
|
5 |
+
Tested up to: 5.6
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 1.0.3
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 1.0.3 =
|
62 |
+
* Fix - Order with Payment received when Hosted Fields transaction is declined. #88
|
63 |
+
|
64 |
= 1.0.2 =
|
65 |
* Fix - Purchases over 1.000 USD fail. #84
|
66 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit49901b8419ad001b0370271fab697743::getLoader();
|
vendor/composer/ClassLoader.php
CHANGED
@@ -60,7 +60,7 @@ class ClassLoader
|
|
60 |
public function getPrefixes()
|
61 |
{
|
62 |
if (!empty($this->prefixesPsr0)) {
|
63 |
-
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
64 |
}
|
65 |
|
66 |
return array();
|
60 |
public function getPrefixes()
|
61 |
{
|
62 |
if (!empty($this->prefixesPsr0)) {
|
63 |
+
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
64 |
}
|
65 |
|
66 |
return array();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit01caf726188ce4a8c830c9ea3872c0fc
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit01caf726188ce4a8c830c9ea3872c0fc
|
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
-
$includeFiles = Composer\Autoload\
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
-
function
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit49901b8419ad001b0370271fab697743
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit49901b8419ad001b0370271fab697743', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit49901b8419ad001b0370271fab697743', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit49901b8419ad001b0370271fab697743::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit49901b8419ad001b0370271fab697743::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequire49901b8419ad001b0370271fab697743($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequire49901b8419ad001b0370271fab697743($fileIdentifier, $file)
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
@@ -252,9 +252,9 @@ class ComposerStaticInit01caf726188ce4a8c830c9ea3872c0fc
|
|
252 |
public static function getInitializer(ClassLoader $loader)
|
253 |
{
|
254 |
return \Closure::bind(function () use ($loader) {
|
255 |
-
$loader->prefixLengthsPsr4 =
|
256 |
-
$loader->prefixDirsPsr4 =
|
257 |
-
$loader->classMap =
|
258 |
|
259 |
}, null, ClassLoader::class);
|
260 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit49901b8419ad001b0370271fab697743
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
252 |
public static function getInitializer(ClassLoader $loader)
|
253 |
{
|
254 |
return \Closure::bind(function () use ($loader) {
|
255 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit49901b8419ad001b0370271fab697743::$prefixLengthsPsr4;
|
256 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit49901b8419ad001b0370271fab697743::$prefixDirsPsr4;
|
257 |
+
$loader->classMap = ComposerStaticInit49901b8419ad001b0370271fab697743::$classMap;
|
258 |
|
259 |
}, null, ClassLoader::class);
|
260 |
}
|
vendor/composer/installed.json
CHANGED
@@ -480,7 +480,8 @@
|
|
480 |
"email": "development@dhii.co"
|
481 |
}
|
482 |
],
|
483 |
-
"description": "Interfaces for working with factories."
|
|
|
484 |
},
|
485 |
{
|
486 |
"name": "dhii/module-interface",
|
480 |
"email": "development@dhii.co"
|
481 |
}
|
482 |
],
|
483 |
+
"description": "Interfaces for working with factories.",
|
484 |
+
"abandoned": true
|
485 |
},
|
486 |
{
|
487 |
"name": "dhii/module-interface",
|
woocommerce-paypal-payments.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce PayPal Payments
|
4 |
* Plugin URI: https://woocommerce.com/products/woocommerce-paypal-payments/
|
5 |
* Description: PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: WooCommerce
|
8 |
* Author URI: https://woocommerce.com/
|
9 |
* License: GPL-2.0
|
3 |
* Plugin Name: WooCommerce PayPal Payments
|
4 |
* Plugin URI: https://woocommerce.com/products/woocommerce-paypal-payments/
|
5 |
* Description: PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage.
|
6 |
+
* Version: 1.0.3
|
7 |
* Author: WooCommerce
|
8 |
* Author URI: https://woocommerce.com/
|
9 |
* License: GPL-2.0
|