Give – Donation Plugin and Fundraising Platform - Version 2.19.4

Version Description

Download this release

Release Info

Developer jason_the_adams
Plugin Icon 128x128 Give – Donation Plugin and Fundraising Platform
Version 2.19.4
Comparing to
See all releases

Code changes from version 2.19.3 to 2.19.4

give.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: GiveWP
7
  * Author URI: https://givewp.com/
8
- * Version: 2.19.3
9
  * Requires at least: 4.9
10
  * Requires PHP: 5.6
11
  * Text Domain: give
@@ -289,7 +289,7 @@ final class Give
289
  {
290
  // Plugin version.
291
  if ( ! defined('GIVE_VERSION')) {
292
- define('GIVE_VERSION', '2.19.3');
293
  }
294
 
295
  // Plugin Root File.
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: GiveWP
7
  * Author URI: https://givewp.com/
8
+ * Version: 2.19.4
9
  * Requires at least: 4.9
10
  * Requires PHP: 5.6
11
  * Text Domain: give
289
  {
290
  // Plugin version.
291
  if ( ! defined('GIVE_VERSION')) {
292
+ define('GIVE_VERSION', '2.19.4');
293
  }
294
 
295
  // Plugin Root File.
languages/give.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Give - Donation Plugin plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Give - Donation Plugin 2.19.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/givewp\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-03-04T22:29:31+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: give\n"
@@ -1734,7 +1734,7 @@ msgstr ""
1734
  #: src/DonorDashboards/Admin/Settings.php:114
1735
  #: src/Form/Template/Options.php:170
1736
  #: src/Form/Template/Options.php:194
1737
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:203
1738
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:190
1739
  #: src/Tracking/AdminSettings.php:47
1740
  #: src/Views/Form/Templates/Classic/optionConfig.php:57
@@ -1797,7 +1797,7 @@ msgstr ""
1797
  #: src/DonorDashboards/Admin/Settings.php:115
1798
  #: src/Form/Template/Options.php:171
1799
  #: src/Form/Template/Options.php:195
1800
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:204
1801
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:191
1802
  #: src/Tracking/AdminSettings.php:48
1803
  #: src/Views/Form/Templates/Classic/optionConfig.php:58
@@ -2962,7 +2962,7 @@ msgstr ""
2962
 
2963
  #: includes/admin/payments/class-payments-table.php:412
2964
  #: src/API/Endpoints/Reports/TopDonors.php:46
2965
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:188
2966
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:157
2967
  #: templates/shortcode-receipt.php:82
2968
  #: src/DonorDashboards/resources/js/app/components/donation-table/index.js:49
@@ -12665,7 +12665,7 @@ msgid "MM / YY"
12665
  msgstr ""
12666
 
12667
  #: includes/forms/template.php:1112
12668
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:194
12669
  #: src/PaymentGateways/PayPalCommerce/AdvancedCardFields.php:85
12670
  msgid "Billing Details"
12671
  msgstr ""
@@ -14812,7 +14812,7 @@ msgstr ""
14812
  msgid "An unexpected error occurred while processing the subscription. Please try again or contact the site administrator."
14813
  msgstr ""
14814
 
14815
- #: src/Framework/PaymentGateways/Routes/GatewayRoute.php:173
14816
  msgid "An unexpected error occurred while processing your donation. Please try again or contact us to help resolve."
14817
  msgstr ""
14818
 
@@ -15247,53 +15247,53 @@ msgstr ""
15247
  msgid "PayPal Standard"
15248
  msgstr ""
15249
 
15250
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:162
15251
  msgid "PayPal Email"
15252
  msgstr ""
15253
 
15254
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:163
15255
  msgid "Enter the email address associated with your PayPal account to connect with the gateway."
15256
  msgstr ""
15257
 
15258
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:171
15259
  msgid "PayPal Page Style"
15260
  msgstr ""
15261
 
15262
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:172
15263
  msgid "Enter the name of the PayPal page style to use, or leave blank to use the default."
15264
  msgstr ""
15265
 
15266
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:180
15267
  msgid "PayPal Transaction Type"
15268
  msgstr ""
15269
 
15270
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:181
15271
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:150
15272
  msgid "Nonprofits must verify their status to withdraw donations they receive via PayPal. PayPal users that are not verified nonprofits must demonstrate how their donations will be used, once they raise more than $10,000. By default, GiveWP transactions are sent to PayPal as donations. You may change the transaction type using this option if you feel you may not meet PayPal's donation requirements."
15273
  msgstr ""
15274
 
15275
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:189
15276
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:158
15277
  msgid "Standard Transaction"
15278
  msgstr ""
15279
 
15280
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:195
15281
  msgid "If enabled, required billing address fields are added to PayPal Standard forms. These fields are not required by PayPal to process the transaction, but you may have a need to collect the data. Billing address details are added to both the donation and donor record in GiveWP."
15282
  msgstr ""
15283
 
15284
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:209
15285
  msgid "Invoice ID Prefix"
15286
  msgstr ""
15287
 
15288
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:210
15289
  msgid "Enter a prefix for your invoice numbers. If you use your PayPal account for multiple fundraising platforms or ecommerce stores, ensure this prefix is unique. PayPal will not allow orders or donations with the same invoice number."
15290
  msgstr ""
15291
 
15292
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:218
15293
  msgid "PayPal Standard Gateway Settings Docs Link"
15294
  msgstr ""
15295
 
15296
- #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:221
15297
  msgid "PayPal Standard Gateway Settings"
15298
  msgstr ""
15299
 
2
  # This file is distributed under the same license as the Give - Donation Plugin plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Give - Donation Plugin 2.19.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/givewp\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-03-10T16:51:28+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: give\n"
1734
  #: src/DonorDashboards/Admin/Settings.php:114
1735
  #: src/Form/Template/Options.php:170
1736
  #: src/Form/Template/Options.php:194
1737
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:209
1738
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:190
1739
  #: src/Tracking/AdminSettings.php:47
1740
  #: src/Views/Form/Templates/Classic/optionConfig.php:57
1797
  #: src/DonorDashboards/Admin/Settings.php:115
1798
  #: src/Form/Template/Options.php:171
1799
  #: src/Form/Template/Options.php:195
1800
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:210
1801
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:191
1802
  #: src/Tracking/AdminSettings.php:48
1803
  #: src/Views/Form/Templates/Classic/optionConfig.php:58
2962
 
2963
  #: includes/admin/payments/class-payments-table.php:412
2964
  #: src/API/Endpoints/Reports/TopDonors.php:46
2965
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:194
2966
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:157
2967
  #: templates/shortcode-receipt.php:82
2968
  #: src/DonorDashboards/resources/js/app/components/donation-table/index.js:49
12665
  msgstr ""
12666
 
12667
  #: includes/forms/template.php:1112
12668
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:200
12669
  #: src/PaymentGateways/PayPalCommerce/AdvancedCardFields.php:85
12670
  msgid "Billing Details"
12671
  msgstr ""
14812
  msgid "An unexpected error occurred while processing the subscription. Please try again or contact the site administrator."
14813
  msgstr ""
14814
 
14815
+ #: src/Framework/PaymentGateways/Routes/GatewayRoute.php:175
14816
  msgid "An unexpected error occurred while processing your donation. Please try again or contact us to help resolve."
14817
  msgstr ""
14818
 
15247
  msgid "PayPal Standard"
15248
  msgstr ""
15249
 
15250
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:168
15251
  msgid "PayPal Email"
15252
  msgstr ""
15253
 
15254
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:169
15255
  msgid "Enter the email address associated with your PayPal account to connect with the gateway."
15256
  msgstr ""
15257
 
15258
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:177
15259
  msgid "PayPal Page Style"
15260
  msgstr ""
15261
 
15262
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:178
15263
  msgid "Enter the name of the PayPal page style to use, or leave blank to use the default."
15264
  msgstr ""
15265
 
15266
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:186
15267
  msgid "PayPal Transaction Type"
15268
  msgstr ""
15269
 
15270
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:187
15271
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:150
15272
  msgid "Nonprofits must verify their status to withdraw donations they receive via PayPal. PayPal users that are not verified nonprofits must demonstrate how their donations will be used, once they raise more than $10,000. By default, GiveWP transactions are sent to PayPal as donations. You may change the transaction type using this option if you feel you may not meet PayPal's donation requirements."
15273
  msgstr ""
15274
 
15275
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:195
15276
  #: src/PaymentGateways/PayPalCommerce/PayPalCommerce.php:158
15277
  msgid "Standard Transaction"
15278
  msgstr ""
15279
 
15280
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:201
15281
  msgid "If enabled, required billing address fields are added to PayPal Standard forms. These fields are not required by PayPal to process the transaction, but you may have a need to collect the data. Billing address details are added to both the donation and donor record in GiveWP."
15282
  msgstr ""
15283
 
15284
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:215
15285
  msgid "Invoice ID Prefix"
15286
  msgstr ""
15287
 
15288
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:216
15289
  msgid "Enter a prefix for your invoice numbers. If you use your PayPal account for multiple fundraising platforms or ecommerce stores, ensure this prefix is unique. PayPal will not allow orders or donations with the same invoice number."
15290
  msgstr ""
15291
 
15292
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:224
15293
  msgid "PayPal Standard Gateway Settings Docs Link"
15294
  msgstr ""
15295
 
15296
+ #: src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php:227
15297
  msgid "PayPal Standard Gateway Settings"
15298
  msgstr ""
15299
 
output.log CHANGED
@@ -16,39 +16,38 @@ c88517be8365: Pulling fs layer
16
  181891da1ea0: Pulling fs layer
17
  2a0fa75da19b: Pulling fs layer
18
  07289ea6b918: Pulling fs layer
19
- 4612e05a72cf: Waiting
20
  f1478d838f46: Waiting
21
  c88517be8365: Waiting
22
  142abe9b67c6: Waiting
23
  181891da1ea0: Waiting
24
  2a0fa75da19b: Waiting
25
  07289ea6b918: Waiting
 
 
 
26
  320f26ee9b1c: Verifying Checksum
27
  320f26ee9b1c: Download complete
28
  30e209609427: Verifying Checksum
29
  30e209609427: Download complete
30
- 801bfaa63ef2: Verifying Checksum
31
- 801bfaa63ef2: Download complete
32
- 4612e05a72cf: Verifying Checksum
33
- 4612e05a72cf: Download complete
34
  801bfaa63ef2: Pull complete
 
 
35
  c88517be8365: Verifying Checksum
36
  c88517be8365: Download complete
 
37
  f1478d838f46: Verifying Checksum
38
  f1478d838f46: Download complete
39
- 30e209609427: Pull complete
40
- 2a0fa75da19b: Verifying Checksum
41
- 2a0fa75da19b: Download complete
42
  181891da1ea0: Verifying Checksum
43
  181891da1ea0: Download complete
 
 
 
44
  142abe9b67c6: Verifying Checksum
45
  142abe9b67c6: Download complete
46
- 320f26ee9b1c: Pull complete
47
- 4612e05a72cf: Pull complete
48
  07289ea6b918: Verifying Checksum
49
  07289ea6b918: Download complete
50
- f1478d838f46: Pull complete
51
- c88517be8365: Pull complete
52
  142abe9b67c6: Pull complete
53
  181891da1ea0: Pull complete
54
  2a0fa75da19b: Pull complete
16
  181891da1ea0: Pulling fs layer
17
  2a0fa75da19b: Pulling fs layer
18
  07289ea6b918: Pulling fs layer
 
19
  f1478d838f46: Waiting
20
  c88517be8365: Waiting
21
  142abe9b67c6: Waiting
22
  181891da1ea0: Waiting
23
  2a0fa75da19b: Waiting
24
  07289ea6b918: Waiting
25
+ 4612e05a72cf: Waiting
26
+ 801bfaa63ef2: Verifying Checksum
27
+ 801bfaa63ef2: Download complete
28
  320f26ee9b1c: Verifying Checksum
29
  320f26ee9b1c: Download complete
30
  30e209609427: Verifying Checksum
31
  30e209609427: Download complete
 
 
 
 
32
  801bfaa63ef2: Pull complete
33
+ 4612e05a72cf: Download complete
34
+ 30e209609427: Pull complete
35
  c88517be8365: Verifying Checksum
36
  c88517be8365: Download complete
37
+ 320f26ee9b1c: Pull complete
38
  f1478d838f46: Verifying Checksum
39
  f1478d838f46: Download complete
40
+ 4612e05a72cf: Pull complete
41
+ f1478d838f46: Pull complete
 
42
  181891da1ea0: Verifying Checksum
43
  181891da1ea0: Download complete
44
+ c88517be8365: Pull complete
45
+ 2a0fa75da19b: Verifying Checksum
46
+ 2a0fa75da19b: Download complete
47
  142abe9b67c6: Verifying Checksum
48
  142abe9b67c6: Download complete
 
 
49
  07289ea6b918: Verifying Checksum
50
  07289ea6b918: Download complete
 
 
51
  142abe9b67c6: Pull complete
52
  181891da1ea0: Pull complete
53
  2a0fa75da19b: Pull complete
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: donation, donate, recurring donations, fundraising, crowdfunding
5
  Requires at least: 4.9
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
- Stable tag: 2.19.3
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -251,6 +251,11 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri
251
  8. GiveWP has a dedicated support team to help answer any questions you may have and help you through stumbling blocks.
252
 
253
  == Changelog ==
 
 
 
 
 
254
  = 2.19.3: March 4th, 2022 =
255
  * Fix: PayPal Standard donations above 1000 dollars are now working again
256
  * Fix: PayPal IPN URL is now working again
5
  Requires at least: 4.9
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
+ Stable tag: 2.19.4
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
251
  8. GiveWP has a dedicated support team to help answer any questions you may have and help you through stumbling blocks.
252
 
253
  == Changelog ==
254
+ = 2.19.4: March 10th, 2022 =
255
+ * Fix: Resolved issue with PayPal failing to validate route after donating
256
+ * Fix: Resolved issue with PayPal logo not loading
257
+ * Fix: Resolved issue with PayPal donation statuses being set to processing
258
+
259
  = 2.19.3: March 4th, 2022 =
260
  * Fix: PayPal Standard donations above 1000 dollars are now working again
261
  * Fix: PayPal IPN URL is now working again
src/Framework/PaymentGateways/DataTransferObjects/GatewayRouteData.php CHANGED
@@ -24,13 +24,18 @@ class GatewayRouteData
24
  * @var string|null
25
  */
26
  public $routeSignature;
 
 
 
 
27
 
28
  /**
29
  * Convert data from request into DTO
30
  *
31
- * @return self
32
  * @since 2.18.0
33
  *
 
34
  */
35
  public static function fromRequest(array $request)
36
  {
@@ -39,9 +44,18 @@ class GatewayRouteData
39
  $self->gatewayId = $request['give-gateway-id'];
40
  $self->gatewayMethod = $request['give-gateway-method'];
41
  $self->routeSignature = isset($request['give-route-signature']) ? $request['give-route-signature'] : null;
 
42
 
43
  $self->queryParams = array_filter($request, static function ($param) {
44
- return !in_array($param, ['give-listener', 'give-gateway-id', 'give-gateway-method', 'give-route-signature']
 
 
 
 
 
 
 
 
45
  );
46
  }, ARRAY_FILTER_USE_KEY);
47
 
24
  * @var string|null
25
  */
26
  public $routeSignature;
27
+ /**
28
+ * @var string|null
29
+ */
30
+ public $routeSignatureId;
31
 
32
  /**
33
  * Convert data from request into DTO
34
  *
35
+ * @since 2.19.4 add give-route-signature-id
36
  * @since 2.18.0
37
  *
38
+ * @return self
39
  */
40
  public static function fromRequest(array $request)
41
  {
44
  $self->gatewayId = $request['give-gateway-id'];
45
  $self->gatewayMethod = $request['give-gateway-method'];
46
  $self->routeSignature = isset($request['give-route-signature']) ? $request['give-route-signature'] : null;
47
+ $self->routeSignatureId = isset($request['give-route-signature-id']) ? $request['give-route-signature-id'] : null;
48
 
49
  $self->queryParams = array_filter($request, static function ($param) {
50
+ return !in_array(
51
+ $param,
52
+ [
53
+ 'give-listener',
54
+ 'give-gateway-id',
55
+ 'give-gateway-method',
56
+ 'give-route-signature',
57
+ 'give-route-signature-id'
58
+ ]
59
  );
60
  }, ARRAY_FILTER_USE_KEY);
61
 
src/Framework/PaymentGateways/PaymentGateway.php CHANGED
@@ -256,23 +256,26 @@ abstract class PaymentGateway implements PaymentGatewayInterface, LegacyPaymentG
256
  /**
257
  * Generate secure gateway route url
258
  *
 
259
  * @since 2.19.0
260
  *
261
- * @param string $gatewayMethod
262
- * @param array|null $args
 
263
  *
264
  * @return string
265
  *
266
  */
267
- public function generateSecureGatewayRouteUrl($gatewayMethod, $args = null)
268
  {
269
- $nonce = new RouteSignature($this->getId(), $gatewayMethod, $args);
270
 
271
  return Call::invoke(
272
  GenerateGatewayRouteUrl::class,
273
  $this->getId(),
274
  $gatewayMethod,
275
  array_merge($args, [
 
276
  'give-route-signature' => $nonce->toNonce()
277
  ])
278
  );
256
  /**
257
  * Generate secure gateway route url
258
  *
259
+ * @since 2.19.4 replace RouteSignature args with unique donationId
260
  * @since 2.19.0
261
  *
262
+ * @param string $gatewayMethod
263
+ * @param int $donationId
264
+ * @param array|null $args
265
  *
266
  * @return string
267
  *
268
  */
269
+ public function generateSecureGatewayRouteUrl($gatewayMethod, $donationId, $args = null)
270
  {
271
+ $nonce = new RouteSignature($this->getId(), $gatewayMethod, $donationId);
272
 
273
  return Call::invoke(
274
  GenerateGatewayRouteUrl::class,
275
  $this->getId(),
276
  $gatewayMethod,
277
  array_merge($args, [
278
+ 'give-route-signature-id' => $donationId,
279
  'give-route-signature' => $nonce->toNonce()
280
  ])
281
  );
src/Framework/PaymentGateways/Routes/GatewayRoute.php CHANGED
@@ -8,6 +8,7 @@ use Give\Framework\PaymentGateways\Log\PaymentGatewayLog;
8
  use Give\Framework\PaymentGateways\PaymentGateway;
9
  use Give\Framework\PaymentGateways\PaymentGatewayRegister;
10
  use Give\Framework\PaymentGateways\Traits\HandleHttpResponses;
 
11
  use function Give\Framework\Http\Response\response;
12
 
13
  /**
@@ -117,16 +118,17 @@ class GatewayRoute
117
  /**
118
  * Validate signature using nonces
119
  *
 
120
  * @since 2.19.0
121
  *
122
- * @param string $routeSignature
123
- * @param GatewayRouteData $data
124
  *
125
  * @return void
126
  */
127
  private function validateSignature($routeSignature, GatewayRouteData $data)
128
  {
129
- $action = new RouteSignature($data->gatewayId, $data->gatewayMethod, $data->queryParams);
130
 
131
  if (!wp_verify_nonce($routeSignature, $action->toString())) {
132
  PaymentGatewayLog::error(
8
  use Give\Framework\PaymentGateways\PaymentGateway;
9
  use Give\Framework\PaymentGateways\PaymentGatewayRegister;
10
  use Give\Framework\PaymentGateways\Traits\HandleHttpResponses;
11
+
12
  use function Give\Framework\Http\Response\response;
13
 
14
  /**
118
  /**
119
  * Validate signature using nonces
120
  *
121
+ * @@since 2.19.4 replace RouteSignature args with unique donationId
122
  * @since 2.19.0
123
  *
124
+ * @param string $routeSignature
125
+ * @param GatewayRouteData $data
126
  *
127
  * @return void
128
  */
129
  private function validateSignature($routeSignature, GatewayRouteData $data)
130
  {
131
+ $action = new RouteSignature($data->gatewayId, $data->gatewayMethod, $data->routeSignatureId);
132
 
133
  if (!wp_verify_nonce($routeSignature, $action->toString())) {
134
  PaymentGatewayLog::error(
src/Framework/PaymentGateways/Routes/RouteSignature.php CHANGED
@@ -14,17 +14,17 @@ class RouteSignature {
14
  private $signature;
15
 
16
  /**
 
 
17
  * @since 2.19.0
18
  *
19
  * @param int $gatewayId
20
  * @param string $gatewayMethod
21
- * @param string[] $args
22
  */
23
- public function __construct($gatewayId, $gatewayMethod, $args)
24
  {
25
- $secureArgs = md5(implode('|', $args));
26
-
27
- $this->signature = "$gatewayId@$gatewayMethod:$secureArgs";
28
  }
29
 
30
  /**
14
  private $signature;
15
 
16
  /**
17
+ * @since 2.19.4 replace RouteSignature args with unique donationId
18
+ *
19
  * @since 2.19.0
20
  *
21
  * @param int $gatewayId
22
  * @param string $gatewayMethod
23
+ * @param int $donationId
24
  */
25
+ public function __construct($gatewayId, $gatewayMethod, $donationId)
26
  {
27
+ $this->signature = "$gatewayId@$gatewayMethod:$donationId";
 
 
28
  }
29
 
30
  /**
src/PaymentGateways/Gateways/PayPalStandard/PayPalStandard.php CHANGED
@@ -76,10 +76,12 @@ class PayPalStandard extends PaymentGateway
76
  $paymentData,
77
  $this->generateSecureGatewayRouteUrl(
78
  'handleSuccessPaymentReturn',
 
79
  ['donation-id' => $paymentData->donationId]
80
  ),
81
  $this->generateSecureGatewayRouteUrl(
82
  'handleFailedPaymentReturn',
 
83
  ['donation-id' => $paymentData->donationId]
84
  ),
85
  $this->generateGatewayRouteUrl(
@@ -93,8 +95,9 @@ class PayPalStandard extends PaymentGateway
93
  * Handle payment redirect after successful payment on PayPal standard.
94
  *
95
  * @since 2.19.0
 
96
  *
97
- * @param array $queryParams Query params in gateway route. {
98
  *
99
  * @type string "donation-id" Donation id.
100
  *
@@ -106,7 +109,10 @@ class PayPalStandard extends PaymentGateway
106
  {
107
  $donationId = (int)$queryParams['donation-id'];
108
  $payment = new Give_Payment($donationId);
109
- $payment->update_status('processing');
 
 
 
110
 
111
  return new RedirectResponse(Call::invoke(GenerateDonationReceiptPageUrl::class, $donationId));
112
  }
76
  $paymentData,
77
  $this->generateSecureGatewayRouteUrl(
78
  'handleSuccessPaymentReturn',
79
+ $paymentData->donationId,
80
  ['donation-id' => $paymentData->donationId]
81
  ),
82
  $this->generateSecureGatewayRouteUrl(
83
  'handleFailedPaymentReturn',
84
+ $paymentData->donationId,
85
  ['donation-id' => $paymentData->donationId]
86
  ),
87
  $this->generateGatewayRouteUrl(
95
  * Handle payment redirect after successful payment on PayPal standard.
96
  *
97
  * @since 2.19.0
98
+ * @since 2.19.4 Only pending PayPal Standard donation set to processing.
99
  *
100
+ * @param array $queryParams Query params in gateway route. {
101
  *
102
  * @type string "donation-id" Donation id.
103
  *
109
  {
110
  $donationId = (int)$queryParams['donation-id'];
111
  $payment = new Give_Payment($donationId);
112
+
113
+ if( 'pending' === $payment->status ) {
114
+ $payment->update_status('processing');
115
+ }
116
 
117
  return new RedirectResponse(Call::invoke(GenerateDonationReceiptPageUrl::class, $donationId));
118
  }
src/PaymentGateways/Gateways/PayPalStandard/Views/PayPalStandardBillingFields.php CHANGED
@@ -54,13 +54,14 @@ class PayPalStandardBillingFields
54
  * Return paypal logo.
55
  *
56
  * @since 2.19.0
 
57
  *
58
  * @return string
59
  */
60
  private function getLogo()
61
  {
62
  return file_get_contents(
63
- GIVE_PLUGIN_DIR . '/src/PaymentGateways/PayPalStandard/resources/templates/paypal-standard-logo.svg'
64
  );
65
  }
66
  }
54
  * Return paypal logo.
55
  *
56
  * @since 2.19.0
57
+ * @since 2.19.4 Use correct logo path.
58
  *
59
  * @return string
60
  */
61
  private function getLogo()
62
  {
63
  return file_get_contents(
64
+ GIVE_PLUGIN_DIR . 'src/PaymentGateways/Gateways/PayPalStandard/resources/templates/paypal-standard-logo.svg'
65
  );
66
  }
67
  }
src/PaymentGateways/Gateways/TestGateway/TestGatewayOffsite.php CHANGED
@@ -85,6 +85,7 @@ class TestGatewayOffsite extends PaymentGateway
85
  {
86
  $redirectUrl = $this->generateSecureGatewayRouteUrl(
87
  'securelyReturnFromOffsiteRedirect',
 
88
  ['give-donation-id' => $paymentData->donationId]
89
  );
90
 
85
  {
86
  $redirectUrl = $this->generateSecureGatewayRouteUrl(
87
  'securelyReturnFromOffsiteRedirect',
88
+ $paymentData->donationId,
89
  ['give-donation-id' => $paymentData->donationId]
90
  );
91
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit4340cd378f114c9394a769b6c18f28b4::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInite9304d023c4911a5fac68f72cfd5b90a::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit4340cd378f114c9394a769b6c18f28b4
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit4340cd378f114c9394a769b6c18f28b4
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit4340cd378f114c9394a769b6c18f28b4', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit4340cd378f114c9394a769b6c18f28b4', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInit4340cd378f114c9394a769b6c18f28b4::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,12 +53,12 @@ class ComposerAutoloaderInit4340cd378f114c9394a769b6c18f28b4
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInit4340cd378f114c9394a769b6c18f28b4::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequire4340cd378f114c9394a769b6c18f28b4($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
@@ -70,7 +70,7 @@ class ComposerAutoloaderInit4340cd378f114c9394a769b6c18f28b4
70
  * @param string $file
71
  * @return void
72
  */
73
- function composerRequire4340cd378f114c9394a769b6c18f28b4($fileIdentifier, $file)
74
  {
75
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
76
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInite9304d023c4911a5fac68f72cfd5b90a
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInite9304d023c4911a5fac68f72cfd5b90a', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInite9304d023c4911a5fac68f72cfd5b90a', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInite9304d023c4911a5fac68f72cfd5b90a::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
+ $includeFiles = Composer\Autoload\ComposerStaticInite9304d023c4911a5fac68f72cfd5b90a::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequiree9304d023c4911a5fac68f72cfd5b90a($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
70
  * @param string $file
71
  * @return void
72
  */
73
+ function composerRequiree9304d023c4911a5fac68f72cfd5b90a($fileIdentifier, $file)
74
  {
75
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
76
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit4340cd378f114c9394a769b6c18f28b4
8
  {
9
  public static $files = array (
10
  '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
@@ -125,9 +125,9 @@ class ComposerStaticInit4340cd378f114c9394a769b6c18f28b4
125
  public static function getInitializer(ClassLoader $loader)
126
  {
127
  return \Closure::bind(function () use ($loader) {
128
- $loader->prefixLengthsPsr4 = ComposerStaticInit4340cd378f114c9394a769b6c18f28b4::$prefixLengthsPsr4;
129
- $loader->prefixDirsPsr4 = ComposerStaticInit4340cd378f114c9394a769b6c18f28b4::$prefixDirsPsr4;
130
- $loader->classMap = ComposerStaticInit4340cd378f114c9394a769b6c18f28b4::$classMap;
131
 
132
  }, null, ClassLoader::class);
133
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInite9304d023c4911a5fac68f72cfd5b90a
8
  {
9
  public static $files = array (
10
  '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
125
  public static function getInitializer(ClassLoader $loader)
126
  {
127
  return \Closure::bind(function () use ($loader) {
128
+ $loader->prefixLengthsPsr4 = ComposerStaticInite9304d023c4911a5fac68f72cfd5b90a::$prefixLengthsPsr4;
129
+ $loader->prefixDirsPsr4 = ComposerStaticInite9304d023c4911a5fac68f72cfd5b90a::$prefixDirsPsr4;
130
+ $loader->classMap = ComposerStaticInite9304d023c4911a5fac68f72cfd5b90a::$classMap;
131
 
132
  }, null, ClassLoader::class);
133
  }
vendor/composer/installed.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php return array(
2
  'root' => array(
3
- 'pretty_version' => '2.19.3',
4
- 'version' => '2.19.3.0',
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => 'd6bdb14b94966a23ea120223d5a39700de76ce70',
9
  'name' => 'impress-org/give',
10
  'dev' => false,
11
  ),
@@ -41,12 +41,12 @@
41
  ),
42
  ),
43
  'impress-org/give' => array(
44
- 'pretty_version' => '2.19.3',
45
- 'version' => '2.19.3.0',
46
  'type' => 'wordpress-plugin',
47
  'install_path' => __DIR__ . '/../../',
48
  'aliases' => array(),
49
- 'reference' => 'd6bdb14b94966a23ea120223d5a39700de76ce70',
50
  'dev_requirement' => false,
51
  ),
52
  'kjohnson/format-object-list' => array(
1
  <?php return array(
2
  'root' => array(
3
+ 'pretty_version' => '2.19.4',
4
+ 'version' => '2.19.4.0',
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => 'e1a1ce50a49a014ade347a63f34ea38dffa55750',
9
  'name' => 'impress-org/give',
10
  'dev' => false,
11
  ),
41
  ),
42
  ),
43
  'impress-org/give' => array(
44
+ 'pretty_version' => '2.19.4',
45
+ 'version' => '2.19.4.0',
46
  'type' => 'wordpress-plugin',
47
  'install_path' => __DIR__ . '/../../',
48
  'aliases' => array(),
49
+ 'reference' => 'e1a1ce50a49a014ade347a63f34ea38dffa55750',
50
  'dev_requirement' => false,
51
  ),
52
  'kjohnson/format-object-list' => array(