WooCommerce PayPal Payments - Version 1.8.1

Version Description

  • Fix - Manual orders return an error for guest users when paying with PayPal Card Processing #530
  • Fix - "No PayPal order found in the current WooCommerce session" error for guests on Pay for Order page #605
  • Fix - Error on order discount by third-party plugins #548
  • Fix - Empty payer data may cause CITY_REQUIRED error for certain checkout countries #632
  • Fix - Mini Cart smart buttons visible after adding subscription product to cart from "shop" page while Vaulting is disabled #624
  • Fix - Smart buttons not loading when free product is in cart but shipping costs are available #606
  • Fix - Smart button & Pay Later messaging disappear on the cart page after changing shipping method #288
  • Fix - Disabling PayPal Checkout on the checkout page also removes the button from the Cart and Product Pages #577
  • Fix - Partial refunds via PayPal are created twice/double in WooCommerce order #522
  • Fix - Emoji in product description causing INVALID_STRING_LENGTH error #491
  • Enhancement - Vaulting & Pay Later UI/UX #174
  • Enhancement - Redirect after updating settings for DCC sends you to PPCP settings screen #392
  • Enhancement - Add Fraud Processor Response as an order note #616
  • Enhancement - Add the Paypal Fee to the Meta Custom Field for export purposes #591
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce PayPal Payments
Version 1.8.1
Comparing to
See all releases

Code changes from version 1.8.0 to 1.8.1

Files changed (39) hide show
  1. changelog.txt +16 -0
  2. modules/ppcp-api-client/services.php +6 -1
  3. modules/ppcp-api-client/src/Endpoint/PaymentsEndpoint.php +6 -4
  4. modules/ppcp-api-client/src/Entity/Capture.php +23 -1
  5. modules/ppcp-api-client/src/Entity/FraudProcessorResponse.php +74 -0
  6. modules/ppcp-api-client/src/Entity/PurchaseUnit.php +9 -0
  7. modules/ppcp-api-client/src/Exception/PayPalApiException.php +9 -0
  8. modules/ppcp-api-client/src/Factory/AmountFactory.php +47 -9
  9. modules/ppcp-api-client/src/Factory/CaptureFactory.php +17 -3
  10. modules/ppcp-api-client/src/Factory/FraudProcessorResponseFactory.php +33 -0
  11. modules/ppcp-api-client/src/Factory/ItemFactory.php +1 -1
  12. modules/ppcp-api-client/src/Factory/PurchaseUnitFactory.php +12 -2
  13. modules/ppcp-button/assets/js/button.js +1 -1
  14. modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js +3 -7
  15. modules/ppcp-button/resources/js/modules/Renderer/MessageRenderer.js +9 -1
  16. modules/ppcp-button/src/Assets/SmartButton.php +75 -43
  17. modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php +48 -8
  18. modules/ppcp-vaulting/src/CustomerApprovalListener.php +2 -1
  19. modules/ppcp-vaulting/src/PaymentTokenChecker.php +1 -1
  20. modules/ppcp-wc-gateway/assets/js/gateway-settings.js +1 -1
  21. modules/ppcp-wc-gateway/resources/js/gateway-settings.js +44 -9
  22. modules/ppcp-wc-gateway/services.php +46 -23
  23. modules/ppcp-wc-gateway/src/Assets/SettingsPageAssets.php +4 -30
  24. modules/ppcp-wc-gateway/src/Checkout/DisableGateways.php +1 -1
  25. modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php +7 -6
  26. modules/ppcp-wc-gateway/src/Processor/OrderMetaTrait.php +1 -1
  27. modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php +2 -1
  28. modules/ppcp-wc-gateway/src/Processor/RefundMetaTrait.php +47 -0
  29. modules/ppcp-wc-gateway/src/Processor/RefundProcessor.php +7 -3
  30. modules/ppcp-wc-gateway/src/Settings/SettingsListener.php +1 -14
  31. modules/ppcp-wc-gateway/src/Settings/SettingsRenderer.php +0 -20
  32. modules/ppcp-wc-gateway/src/WCGatewayModule.php +43 -2
  33. modules/ppcp-webhooks/src/Handler/PaymentCaptureRefunded.php +26 -15
  34. psalm.xml.dist +6 -0
  35. readme.txt +21 -5
  36. vendor/autoload.php +1 -1
  37. vendor/composer/autoload_real.php +7 -7
  38. vendor/composer/autoload_static.php +4 -4
  39. woocommerce-paypal-payments.php +2 -2
changelog.txt CHANGED
@@ -1,5 +1,21 @@
1
  *** Changelog ***
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.8.0 - 2022-05-03 =
4
  * Add - Allow free trial subscriptions #580
5
  * Fix - The Card Processing does not appear as an available payment method when manually creating an order #562
1
  *** Changelog ***
2
 
3
+ = 1.8.1 - 2022-05-31 =
4
+ * Fix - Manual orders return an error for guest users when paying with PayPal Card Processing #530
5
+ * Fix - "No PayPal order found in the current WooCommerce session" error for guests on Pay for Order page #605
6
+ * Fix - Error on order discount by third-party plugins #548
7
+ * Fix - Empty payer data may cause CITY_REQUIRED error for certain checkout countries #632
8
+ * Fix - Mini Cart smart buttons visible after adding subscription product to cart from "shop" page while Vaulting is disabled #624
9
+ * Fix - Smart buttons not loading when free product is in cart but shipping costs are available #606
10
+ * Fix - Smart button & Pay Later messaging disappear on the cart page after changing shipping method #288
11
+ * Fix - Disabling PayPal Checkout on the checkout page also removes the button from the Cart and Product Pages #577
12
+ * Fix - Partial refunds via PayPal are created twice/double in WooCommerce order #522
13
+ * Fix - Emoji in product description causing INVALID_STRING_LENGTH error #491
14
+ * Enhancement - Vaulting & Pay Later UI/UX #174
15
+ * Enhancement - Redirect after updating settings for DCC sends you to PPCP settings screen #392
16
+ * Enhancement - Add Fraud Processor Response as an order note #616
17
+ * Enhancement - Add the Paypal Fee to the Meta Custom Field for export purposes #591
18
+
19
  = 1.8.0 - 2022-05-03 =
20
  * Add - Allow free trial subscriptions #580
21
  * Fix - The Card Processing does not appear as an available payment method when manually creating an order #562
modules/ppcp-api-client/services.php CHANGED
@@ -27,6 +27,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Factory\ApplicationContextFactory;
27
  use WooCommerce\PayPalCommerce\ApiClient\Factory\AuthorizationFactory;
28
  use WooCommerce\PayPalCommerce\ApiClient\Factory\CaptureFactory;
29
  use WooCommerce\PayPalCommerce\ApiClient\Factory\ExchangeRateFactory;
 
30
  use WooCommerce\PayPalCommerce\ApiClient\Factory\ItemFactory;
31
  use WooCommerce\PayPalCommerce\ApiClient\Factory\MoneyFactory;
32
  use WooCommerce\PayPalCommerce\ApiClient\Factory\OrderFactory;
@@ -257,7 +258,8 @@ return array(
257
  $amount_factory = $container->get( 'api.factory.amount' );
258
  return new CaptureFactory(
259
  $amount_factory,
260
- $container->get( 'api.factory.seller-receivable-breakdown' )
 
261
  );
262
  },
263
  'api.factory.purchase-unit' => static function ( ContainerInterface $container ): PurchaseUnitFactory {
@@ -354,6 +356,9 @@ return array(
354
  $container->get( 'api.factory.platform-fee' )
355
  );
356
  },
 
 
 
357
  'api.helpers.dccapplies' => static function ( ContainerInterface $container ) : DccApplies {
358
  return new DccApplies(
359
  $container->get( 'api.dcc-supported-country-currency-matrix' ),
27
  use WooCommerce\PayPalCommerce\ApiClient\Factory\AuthorizationFactory;
28
  use WooCommerce\PayPalCommerce\ApiClient\Factory\CaptureFactory;
29
  use WooCommerce\PayPalCommerce\ApiClient\Factory\ExchangeRateFactory;
30
+ use WooCommerce\PayPalCommerce\ApiClient\Factory\FraudProcessorResponseFactory;
31
  use WooCommerce\PayPalCommerce\ApiClient\Factory\ItemFactory;
32
  use WooCommerce\PayPalCommerce\ApiClient\Factory\MoneyFactory;
33
  use WooCommerce\PayPalCommerce\ApiClient\Factory\OrderFactory;
258
  $amount_factory = $container->get( 'api.factory.amount' );
259
  return new CaptureFactory(
260
  $amount_factory,
261
+ $container->get( 'api.factory.seller-receivable-breakdown' ),
262
+ $container->get( 'api.factory.fraud-processor-response' )
263
  );
264
  },
265
  'api.factory.purchase-unit' => static function ( ContainerInterface $container ): PurchaseUnitFactory {
356
  $container->get( 'api.factory.platform-fee' )
357
  );
358
  },
359
+ 'api.factory.fraud-processor-response' => static function ( ContainerInterface $container ): FraudProcessorResponseFactory {
360
+ return new FraudProcessorResponseFactory();
361
+ },
362
  'api.helpers.dccapplies' => static function ( ContainerInterface $container ) : DccApplies {
363
  return new DccApplies(
364
  $container->get( 'api.dcc-supported-country-currency-matrix' ),
modules/ppcp-api-client/src/Endpoint/PaymentsEndpoint.php CHANGED
@@ -198,11 +198,11 @@ class PaymentsEndpoint {
198
  *
199
  * @param Refund $refund The refund to be processed.
200
  *
201
- * @return void
202
  * @throws RuntimeException If the request fails.
203
  * @throws PayPalApiException If the request fails.
204
  */
205
- public function refund( Refund $refund ) : void {
206
  $bearer = $this->bearer->bearer();
207
  $url = trailingslashit( $this->host ) . 'v2/payments/captures/' . $refund->for_capture()->id() . '/refund';
208
  $args = array(
@@ -216,19 +216,21 @@ class PaymentsEndpoint {
216
  );
217
 
218
  $response = $this->request( $url, $args );
219
- $json = json_decode( $response['body'] );
220
 
221
  if ( is_wp_error( $response ) ) {
222
  throw new RuntimeException( 'Could not refund payment.' );
223
  }
224
 
225
  $status_code = (int) wp_remote_retrieve_response_code( $response );
226
- if ( 201 !== $status_code ) {
 
227
  throw new PayPalApiException(
228
  $json,
229
  $status_code
230
  );
231
  }
 
 
232
  }
233
 
234
  /**
198
  *
199
  * @param Refund $refund The refund to be processed.
200
  *
201
+ * @return string Refund ID.
202
  * @throws RuntimeException If the request fails.
203
  * @throws PayPalApiException If the request fails.
204
  */
205
+ public function refund( Refund $refund ) : string {
206
  $bearer = $this->bearer->bearer();
207
  $url = trailingslashit( $this->host ) . 'v2/payments/captures/' . $refund->for_capture()->id() . '/refund';
208
  $args = array(
216
  );
217
 
218
  $response = $this->request( $url, $args );
 
219
 
220
  if ( is_wp_error( $response ) ) {
221
  throw new RuntimeException( 'Could not refund payment.' );
222
  }
223
 
224
  $status_code = (int) wp_remote_retrieve_response_code( $response );
225
+ $json = json_decode( $response['body'] );
226
+ if ( 201 !== $status_code || ! is_object( $json ) ) {
227
  throw new PayPalApiException(
228
  $json,
229
  $status_code
230
  );
231
  }
232
+
233
+ return $json->id;
234
  }
235
 
236
  /**
modules/ppcp-api-client/src/Entity/Capture.php CHANGED
@@ -58,6 +58,13 @@ class Capture {
58
  */
59
  private $seller_receivable_breakdown;
60
 
 
 
 
 
 
 
 
61
  /**
62
  * The invoice id.
63
  *
@@ -83,6 +90,7 @@ class Capture {
83
  * @param string $invoice_id The invoice id.
84
  * @param string $custom_id The custom id.
85
  * @param SellerReceivableBreakdown|null $seller_receivable_breakdown The detailed breakdown of the capture activity (fees, ...).
 
86
  */
87
  public function __construct(
88
  string $id,
@@ -92,7 +100,8 @@ class Capture {
92
  string $seller_protection,
93
  string $invoice_id,
94
  string $custom_id,
95
- ?SellerReceivableBreakdown $seller_receivable_breakdown
 
96
  ) {
97
 
98
  $this->id = $id;
@@ -103,6 +112,7 @@ class Capture {
103
  $this->invoice_id = $invoice_id;
104
  $this->custom_id = $custom_id;
105
  $this->seller_receivable_breakdown = $seller_receivable_breakdown;
 
106
  }
107
 
108
  /**
@@ -177,6 +187,15 @@ class Capture {
177
  return $this->seller_receivable_breakdown;
178
  }
179
 
 
 
 
 
 
 
 
 
 
180
  /**
181
  * Returns the entity as array.
182
  *
@@ -199,6 +218,9 @@ class Capture {
199
  if ( $this->seller_receivable_breakdown ) {
200
  $data['seller_receivable_breakdown'] = $this->seller_receivable_breakdown->to_array();
201
  }
 
 
 
202
  return $data;
203
  }
204
  }
58
  */
59
  private $seller_receivable_breakdown;
60
 
61
+ /**
62
+ * The fraud processor response (AVS, CVV ...).
63
+ *
64
+ * @var FraudProcessorResponse|null
65
+ */
66
+ protected $fraud_processor_response;
67
+
68
  /**
69
  * The invoice id.
70
  *
90
  * @param string $invoice_id The invoice id.
91
  * @param string $custom_id The custom id.
92
  * @param SellerReceivableBreakdown|null $seller_receivable_breakdown The detailed breakdown of the capture activity (fees, ...).
93
+ * @param FraudProcessorResponse|null $fraud_processor_response The fraud processor response (AVS, CVV ...).
94
  */
95
  public function __construct(
96
  string $id,
100
  string $seller_protection,
101
  string $invoice_id,
102
  string $custom_id,
103
+ ?SellerReceivableBreakdown $seller_receivable_breakdown,
104
+ ?FraudProcessorResponse $fraud_processor_response
105
  ) {
106
 
107
  $this->id = $id;
112
  $this->invoice_id = $invoice_id;
113
  $this->custom_id = $custom_id;
114
  $this->seller_receivable_breakdown = $seller_receivable_breakdown;
115
+ $this->fraud_processor_response = $fraud_processor_response;
116
  }
117
 
118
  /**
187
  return $this->seller_receivable_breakdown;
188
  }
189
 
190
+ /**
191
+ * Returns the fraud processor response (AVS, CVV ...).
192
+ *
193
+ * @return FraudProcessorResponse|null
194
+ */
195
+ public function fraud_processor_response() : ?FraudProcessorResponse {
196
+ return $this->fraud_processor_response;
197
+ }
198
+
199
  /**
200
  * Returns the entity as array.
201
  *
218
  if ( $this->seller_receivable_breakdown ) {
219
  $data['seller_receivable_breakdown'] = $this->seller_receivable_breakdown->to_array();
220
  }
221
+ if ( $this->fraud_processor_response ) {
222
+ $data['fraud_processor_response'] = $this->fraud_processor_response->to_array();
223
+ }
224
  return $data;
225
  }
226
  }
modules/ppcp-api-client/src/Entity/FraudProcessorResponse.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The FraudProcessorResponse object.
4
+ *
5
+ * @package WooCommerce\PayPalCommerce\ApiClient\Entity
6
+ */
7
+
8
+ declare(strict_types=1);
9
+
10
+ namespace WooCommerce\PayPalCommerce\ApiClient\Entity;
11
+
12
+ /**
13
+ * Class FraudProcessorResponse
14
+ */
15
+ class FraudProcessorResponse {
16
+
17
+ /**
18
+ * The AVS response code.
19
+ *
20
+ * @var string|null
21
+ */
22
+ protected $avs_code;
23
+
24
+ /**
25
+ * The CVV response code.
26
+ *
27
+ * @var string|null
28
+ */
29
+ protected $cvv_code;
30
+
31
+ /**
32
+ * FraudProcessorResponse constructor.
33
+ *
34
+ * @param string|null $avs_code The AVS response code.
35
+ * @param string|null $cvv_code The CVV response code.
36
+ */
37
+ public function __construct( ?string $avs_code, ?string $cvv_code ) {
38
+ $this->avs_code = $avs_code;
39
+ $this->cvv_code = $cvv_code;
40
+ }
41
+
42
+ /**
43
+ * Returns the AVS response code.
44
+ *
45
+ * @return string|null
46
+ */
47
+ public function avs_code(): ?string {
48
+ return $this->avs_code;
49
+ }
50
+
51
+ /**
52
+ * Returns the CVV response code.
53
+ *
54
+ * @return string|null
55
+ */
56
+ public function cvv_code(): ?string {
57
+ return $this->cvv_code;
58
+ }
59
+
60
+ /**
61
+ * Returns the object as array.
62
+ *
63
+ * @return array
64
+ */
65
+ public function to_array(): array {
66
+ return array(
67
+ 'avs_code' => $this->avs_code() ?: '',
68
+ 'address_match' => $this->avs_code() === 'M' ? 'Y' : 'N',
69
+ 'postal_match' => $this->avs_code() === 'M' ? 'Y' : 'N',
70
+ 'cvv_match' => $this->cvv_code() === 'M' ? 'Y' : 'N',
71
+ );
72
+ }
73
+
74
+ }
modules/ppcp-api-client/src/Entity/PurchaseUnit.php CHANGED
@@ -175,6 +175,15 @@ class PurchaseUnit {
175
  return $this->shipping;
176
  }
177
 
 
 
 
 
 
 
 
 
 
178
  /**
179
  * Returns the reference id.
180
  *
175
  return $this->shipping;
176
  }
177
 
178
+ /**
179
+ * Sets shipping info.
180
+ *
181
+ * @param Shipping|null $shipping The value to set.
182
+ */
183
+ public function set_shipping( ?Shipping $shipping ): void {
184
+ $this->shipping = $shipping;
185
+ }
186
+
187
  /**
188
  * Returns the reference id.
189
  *
modules/ppcp-api-client/src/Exception/PayPalApiException.php CHANGED
@@ -119,4 +119,13 @@ class PayPalApiException extends RuntimeException {
119
  public function issues(): array {
120
  return $this->response->issues ?? array();
121
  }
 
 
 
 
 
 
 
 
 
122
  }
119
  public function issues(): array {
120
  return $this->response->issues ?? array();
121
  }
122
+
123
+ /**
124
+ * The HTTP status code.
125
+ *
126
+ * @return int
127
+ */
128
+ public function status_code(): int {
129
+ return $this->status_code;
130
+ }
131
  }
modules/ppcp-api-client/src/Factory/AmountFactory.php CHANGED
@@ -124,10 +124,31 @@ class AmountFactory {
124
  $currency = $order->get_currency();
125
  $items = $this->item_factory->from_wc_order( $order );
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  $total_value = (float) $order->get_total();
128
  if ( (
129
  CreditCardGateway::ID === $order->get_payment_method()
130
- || ( PayPalGateway::ID === $order->get_payment_method() && 'card' === $order->get_meta( PayPalGateway::ORDER_PAYMENT_SOURCE ) )
131
  )
132
  && $this->is_free_trial_order( $order )
133
  ) {
@@ -160,14 +181,6 @@ class AmountFactory {
160
  $currency
161
  );
162
 
163
- $discount = null;
164
- if ( (float) $order->get_total_discount( false ) ) {
165
- $discount = new Money(
166
- (float) $order->get_total_discount( false ),
167
- $currency
168
- );
169
- }
170
-
171
  $breakdown = new AmountBreakdown(
172
  $item_total,
173
  $shipping,
@@ -251,4 +264,29 @@ class AmountFactory {
251
 
252
  return new AmountBreakdown( ...$money );
253
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  }
124
  $currency = $order->get_currency();
125
  $items = $this->item_factory->from_wc_order( $order );
126
 
127
+ $discount_value = array_sum(
128
+ array(
129
+ (float) $order->get_total_discount( false ), // Only coupons.
130
+ $this->discounts_from_items( $items ),
131
+ )
132
+ );
133
+ $discount = null;
134
+ if ( $discount_value ) {
135
+ $discount = new Money(
136
+ (float) $discount_value,
137
+ $currency
138
+ );
139
+ }
140
+
141
+ $items = array_filter(
142
+ $items,
143
+ function ( Item $item ): bool {
144
+ return $item->unit_amount()->value() > 0;
145
+ }
146
+ );
147
+
148
  $total_value = (float) $order->get_total();
149
  if ( (
150
  CreditCardGateway::ID === $order->get_payment_method()
151
+ || ( PayPalGateway::ID === $order->get_payment_method() && 'card' === $order->get_meta( PayPalGateway::ORDER_PAYMENT_SOURCE_META_KEY ) )
152
  )
153
  && $this->is_free_trial_order( $order )
154
  ) {
181
  $currency
182
  );
183
 
 
 
 
 
 
 
 
 
184
  $breakdown = new AmountBreakdown(
185
  $item_total,
186
  $shipping,
264
 
265
  return new AmountBreakdown( ...$money );
266
  }
267
+
268
+ /**
269
+ * Returns the sum of items with negative amount;
270
+ *
271
+ * @param Item[] $items PayPal order items.
272
+ * @return float
273
+ */
274
+ private function discounts_from_items( array $items ): float {
275
+ $discounts = array_filter(
276
+ $items,
277
+ function ( Item $item ): bool {
278
+ return $item->unit_amount()->value() < 0;
279
+ }
280
+ );
281
+ return abs(
282
+ array_sum(
283
+ array_map(
284
+ function ( Item $item ): float {
285
+ return (float) $item->quantity() * $item->unit_amount()->value();
286
+ },
287
+ $discounts
288
+ )
289
+ )
290
+ );
291
+ }
292
  }
modules/ppcp-api-client/src/Factory/CaptureFactory.php CHANGED
@@ -32,19 +32,29 @@ class CaptureFactory {
32
  */
33
  private $seller_receivable_breakdown_factory;
34
 
 
 
 
 
 
 
 
35
  /**
36
  * CaptureFactory constructor.
37
  *
38
  * @param AmountFactory $amount_factory The amount factory.
39
  * @param SellerReceivableBreakdownFactory $seller_receivable_breakdown_factory The SellerReceivableBreakdown factory.
 
40
  */
41
  public function __construct(
42
  AmountFactory $amount_factory,
43
- SellerReceivableBreakdownFactory $seller_receivable_breakdown_factory
 
44
  ) {
45
 
46
  $this->amount_factory = $amount_factory;
47
  $this->seller_receivable_breakdown_factory = $seller_receivable_breakdown_factory;
 
48
  }
49
 
50
  /**
@@ -55,12 +65,15 @@ class CaptureFactory {
55
  * @return Capture
56
  */
57
  public function from_paypal_response( \stdClass $data ) : Capture {
58
-
59
  $reason = $data->status_details->reason ?? null;
60
  $seller_receivable_breakdown = isset( $data->seller_receivable_breakdown ) ?
61
  $this->seller_receivable_breakdown_factory->from_paypal_response( $data->seller_receivable_breakdown )
62
  : null;
63
 
 
 
 
 
64
  return new Capture(
65
  (string) $data->id,
66
  new CaptureStatus(
@@ -72,7 +85,8 @@ class CaptureFactory {
72
  (string) $data->seller_protection->status,
73
  (string) $data->invoice_id,
74
  (string) $data->custom_id,
75
- $seller_receivable_breakdown
 
76
  );
77
  }
78
  }
32
  */
33
  private $seller_receivable_breakdown_factory;
34
 
35
+ /**
36
+ * The FraudProcessorResponseFactory factory.
37
+ *
38
+ * @var FraudProcessorResponseFactory
39
+ */
40
+ protected $fraud_processor_response_factory;
41
+
42
  /**
43
  * CaptureFactory constructor.
44
  *
45
  * @param AmountFactory $amount_factory The amount factory.
46
  * @param SellerReceivableBreakdownFactory $seller_receivable_breakdown_factory The SellerReceivableBreakdown factory.
47
+ * @param FraudProcessorResponseFactory $fraud_processor_response_factory The FraudProcessorResponseFactory factory.
48
  */
49
  public function __construct(
50
  AmountFactory $amount_factory,
51
+ SellerReceivableBreakdownFactory $seller_receivable_breakdown_factory,
52
+ FraudProcessorResponseFactory $fraud_processor_response_factory
53
  ) {
54
 
55
  $this->amount_factory = $amount_factory;
56
  $this->seller_receivable_breakdown_factory = $seller_receivable_breakdown_factory;
57
+ $this->fraud_processor_response_factory = $fraud_processor_response_factory;
58
  }
59
 
60
  /**
65
  * @return Capture
66
  */
67
  public function from_paypal_response( \stdClass $data ) : Capture {
 
68
  $reason = $data->status_details->reason ?? null;
69
  $seller_receivable_breakdown = isset( $data->seller_receivable_breakdown ) ?
70
  $this->seller_receivable_breakdown_factory->from_paypal_response( $data->seller_receivable_breakdown )
71
  : null;
72
 
73
+ $fraud_processor_response = isset( $data->processor_response ) ?
74
+ $this->fraud_processor_response_factory->from_paypal_response( $data->processor_response )
75
+ : null;
76
+
77
  return new Capture(
78
  (string) $data->id,
79
  new CaptureStatus(
85
  (string) $data->seller_protection->status,
86
  (string) $data->invoice_id,
87
  (string) $data->custom_id,
88
+ $seller_receivable_breakdown,
89
+ $fraud_processor_response
90
  );
91
  }
92
  }
modules/ppcp-api-client/src/Factory/FraudProcessorResponseFactory.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The FraudProcessorResponseFactory Factory.
4
+ *
5
+ * @package WooCommerce\PayPalCommerce\ApiClient\Factory
6
+ */
7
+
8
+ declare(strict_types=1);
9
+
10
+ namespace WooCommerce\PayPalCommerce\ApiClient\Factory;
11
+
12
+ use stdClass;
13
+ use WooCommerce\PayPalCommerce\ApiClient\Entity\FraudProcessorResponse;
14
+
15
+ /**
16
+ * Class FraudProcessorResponseFactory
17
+ */
18
+ class FraudProcessorResponseFactory {
19
+
20
+ /**
21
+ * Returns a FraudProcessorResponse object based off a PayPal Response.
22
+ *
23
+ * @param stdClass $data The JSON object.
24
+ *
25
+ * @return FraudProcessorResponse
26
+ */
27
+ public function from_paypal_response( stdClass $data ): FraudProcessorResponse {
28
+ $avs_code = $data->avs_code ?: null;
29
+ $cvv_code = $data->cvv_code ?: null;
30
+
31
+ return new FraudProcessorResponse( $avs_code, $cvv_code );
32
+ }
33
+ }
modules/ppcp-api-client/src/Factory/ItemFactory.php CHANGED
@@ -142,7 +142,7 @@ class ItemFactory {
142
  mb_substr( $product->get_name(), 0, 127 ),
143
  new Money( $price_without_tax_rounded, $currency ),
144
  $quantity,
145
- mb_substr( wp_strip_all_tags( $product->get_description() ), 0, 127 ),
146
  $tax,
147
  $product->get_sku(),
148
  ( $product->is_virtual() ) ? Item::DIGITAL_GOODS : Item::PHYSICAL_GOODS
142
  mb_substr( $product->get_name(), 0, 127 ),
143
  new Money( $price_without_tax_rounded, $currency ),
144
  $quantity,
145
+ substr( wp_strip_all_tags( $product->get_description() ), 0, 127 ) ?: '',
146
  $tax,
147
  $product->get_sku(),
148
  ( $product->is_virtual() ) ? Item::DIGITAL_GOODS : Item::PHYSICAL_GOODS
modules/ppcp-api-client/src/Factory/PurchaseUnitFactory.php CHANGED
@@ -107,7 +107,12 @@ class PurchaseUnitFactory {
107
  */
108
  public function from_wc_order( \WC_Order $order ): PurchaseUnit {
109
  $amount = $this->amount_factory->from_wc_order( $order );
110
- $items = $this->item_factory->from_wc_order( $order );
 
 
 
 
 
111
  $shipping = $this->shipping_factory->from_wc_order( $order );
112
  if (
113
  ! $this->shipping_needed( ... array_values( $items ) ) ||
@@ -153,7 +158,12 @@ class PurchaseUnitFactory {
153
  */
154
  public function from_wc_cart( \WC_Cart $cart ): PurchaseUnit {
155
  $amount = $this->amount_factory->from_wc_cart( $cart );
156
- $items = $this->item_factory->from_wc_cart( $cart );
 
 
 
 
 
157
 
158
  $shipping = null;
159
  $customer = \WC()->customer;
107
  */
108
  public function from_wc_order( \WC_Order $order ): PurchaseUnit {
109
  $amount = $this->amount_factory->from_wc_order( $order );
110
+ $items = array_filter(
111
+ $this->item_factory->from_wc_order( $order ),
112
+ function ( Item $item ): bool {
113
+ return $item->unit_amount()->value() > 0;
114
+ }
115
+ );
116
  $shipping = $this->shipping_factory->from_wc_order( $order );
117
  if (
118
  ! $this->shipping_needed( ... array_values( $items ) ) ||
158
  */
159
  public function from_wc_cart( \WC_Cart $cart ): PurchaseUnit {
160
  $amount = $this->amount_factory->from_wc_cart( $cart );
161
+ $items = array_filter(
162
+ $this->item_factory->from_wc_cart( $cart ),
163
+ function ( Item $item ): bool {
164
+ return $item->unit_amount()->value() > 0;
165
+ }
166
+ );
167
 
168
  $shipping = null;
169
  $customer = \WC()->customer;
modules/ppcp-button/assets/js/button.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var __webpack_modules__={536:()=>{eval("\n;// CONCATENATED MODULE: ./resources/js/modules/ErrorHandler.js\nclass ErrorHandler {\n constructor(genericErrorText) {\n this.genericErrorText = genericErrorText;\n this.wrapper = document.querySelector('.woocommerce-notices-wrapper');\n this.messagesList = document.querySelector('ul.woocommerce-error');\n }\n\n genericError() {\n if (this.wrapper.classList.contains('ppcp-persist')) {\n return;\n }\n\n this.clear();\n this.message(this.genericErrorText);\n }\n\n appendPreparedErrorMessageElement(errorMessageElement) {\n if (this.messagesList === null) {\n this.prepareMessagesList();\n }\n\n this.messagesList.replaceWith(errorMessageElement);\n }\n\n message(text, persist = false) {\n if (!typeof String || text.length === 0) {\n throw new Error('A new message text must be a non-empty string.');\n }\n\n if (this.messagesList === null) {\n this.prepareMessagesList();\n }\n\n if (persist) {\n this.wrapper.classList.add('ppcp-persist');\n } else {\n this.wrapper.classList.remove('ppcp-persist');\n }\n\n let messageNode = this.prepareMessagesListItem(text);\n this.messagesList.appendChild(messageNode);\n jQuery.scroll_to_notices(jQuery('.woocommerce-notices-wrapper'));\n }\n\n prepareMessagesList() {\n if (this.messagesList === null) {\n this.messagesList = document.createElement('ul');\n this.messagesList.setAttribute('class', 'woocommerce-error');\n this.messagesList.setAttribute('role', 'alert');\n this.wrapper.appendChild(this.messagesList);\n }\n }\n\n prepareMessagesListItem(message) {\n const li = document.createElement('li');\n li.innerHTML = message;\n return li;\n }\n\n sanitize(text) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = text;\n return textarea.value.replace('Error: ', '');\n }\n\n clear() {\n if (this.messagesList === null) {\n return;\n }\n\n this.messagesList.innerHTML = '';\n }\n\n}\n\n/* harmony default export */ const modules_ErrorHandler = (ErrorHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/OnApproveHandler/onApproveForContinue.js\nconst onApprove = (context, errorHandler) => {\n return (data, actions) => {\n return fetch(context.config.ajax.approve_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: context.config.ajax.approve_order.nonce,\n order_id: data.orderID,\n funding_source: window.ppcpFundingSource\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n if (!data.success) {\n errorHandler.genericError();\n return actions.restart().catch(err => {\n errorHandler.genericError();\n });\n }\n\n location.href = context.config.redirect;\n });\n };\n};\n\n/* harmony default export */ const onApproveForContinue = (onApprove);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/PayerData.js\nconst payerData = () => {\n const payer = PayPalCommerceGateway.payer;\n\n if (!payer) {\n return null;\n }\n\n const phone = document.querySelector('#billing_phone') || typeof payer.phone !== 'undefined' ? {\n phone_type: \"HOME\",\n phone_number: {\n national_number: document.querySelector('#billing_phone') ? document.querySelector('#billing_phone').value : payer.phone.phone_number.national_number\n }\n } : null;\n const payerData = {\n email_address: document.querySelector('#billing_email') ? document.querySelector('#billing_email').value : payer.email_address,\n name: {\n surname: document.querySelector('#billing_last_name') ? document.querySelector('#billing_last_name').value : payer.name.surname,\n given_name: document.querySelector('#billing_first_name') ? document.querySelector('#billing_first_name').value : payer.name.given_name\n },\n address: {\n country_code: document.querySelector('#billing_country') ? document.querySelector('#billing_country').value : payer.address.country_code,\n address_line_1: document.querySelector('#billing_address_1') ? document.querySelector('#billing_address_1').value : payer.address.address_line_1,\n address_line_2: document.querySelector('#billing_address_2') ? document.querySelector('#billing_address_2').value : payer.address.address_line_2,\n admin_area_1: document.querySelector('#billing_state') ? document.querySelector('#billing_state').value : payer.address.admin_area_1,\n admin_area_2: document.querySelector('#billing_city') ? document.querySelector('#billing_city').value : payer.address.admin_area_2,\n postal_code: document.querySelector('#billing_postcode') ? document.querySelector('#billing_postcode').value : payer.address.postal_code\n }\n };\n\n if (phone) {\n payerData.phone = phone;\n }\n\n return payerData;\n};\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/CheckoutMethodState.js\nconst PaymentMethods = {\n PAYPAL: 'ppcp-gateway',\n CARDS: 'ppcp-credit-card-gateway'\n};\nconst ORDER_BUTTON_SELECTOR = '#place_order';\nconst getCurrentPaymentMethod = () => {\n const el = document.querySelector('input[name=\"payment_method\"]:checked');\n\n if (!el) {\n return null;\n }\n\n return el.value;\n};\nconst isSavedCardSelected = () => {\n const savedCardList = document.querySelector('#saved-credit-card');\n return savedCardList && savedCardList.value !== '';\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/CartActionHandler.js\n\n\n\n\nclass CartActionHandler {\n constructor(config, errorHandler) {\n this.config = config;\n this.errorHandler = errorHandler;\n }\n\n configuration() {\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ? this.config.bn_codes[this.config.context] : '';\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n purchase_units: [],\n payment_method: PaymentMethods.PAYPAL,\n funding_source: window.ppcpFundingSource,\n bn_code: bnCode,\n payer,\n context: this.config.context\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n console.error(data);\n throw Error(data.data.message);\n }\n\n return data.data.id;\n });\n };\n\n return {\n createOrder,\n onApprove: onApproveForContinue(this, this.errorHandler),\n onError: error => {\n this.errorHandler.genericError();\n }\n };\n }\n\n}\n\n/* harmony default export */ const ActionHandler_CartActionHandler = (CartActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/MiniCartBootstap.js\n\n\n\nclass MiniCartBootstap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.actionHandler = null;\n }\n\n init() {\n this.actionHandler = new ActionHandler_CartActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.render();\n jQuery(document.body).on('wc_fragments_loaded wc_fragments_refreshed', () => {\n this.render();\n });\n }\n\n shouldRender() {\n return document.querySelector(this.gateway.button.mini_cart_wrapper) !== null || document.querySelector(this.gateway.hosted_fields.mini_cart_wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.renderer.render(this.gateway.button.mini_cart_wrapper, this.gateway.hosted_fields.mini_cart_wrapper, this.actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_MiniCartBootstap = (MiniCartBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/UpdateCart.js\n\n\nclass UpdateCart {\n constructor(endpoint, nonce) {\n this.endpoint = endpoint;\n this.nonce = nonce;\n }\n /**\n *\n * @param onResolve\n * @param {Product[]} products\n * @returns {Promise<unknown>}\n */\n\n\n update(onResolve, products) {\n return new Promise((resolve, reject) => {\n fetch(this.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.nonce,\n products\n })\n }).then(result => {\n return result.json();\n }).then(result => {\n if (!result.success) {\n reject(result.data);\n return;\n }\n\n const resolved = onResolve(result.data);\n resolve(resolved);\n });\n });\n }\n\n}\n\n/* harmony default export */ const Helper_UpdateCart = (UpdateCart);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/ButtonsToggleListener.js\n/**\n * When you can't add something to the cart, the PayPal buttons should not show.\n * Therefore we listen for changes on the add to cart button and show/hide the buttons accordingly.\n */\nclass ButtonsToggleListener {\n constructor(element, showCallback, hideCallback) {\n this.element = element;\n this.showCallback = showCallback;\n this.hideCallback = hideCallback;\n this.observer = null;\n }\n\n init() {\n const config = {\n attributes: true\n };\n\n const callback = () => {\n if (this.element.classList.contains('disabled')) {\n this.hideCallback();\n return;\n }\n\n this.showCallback();\n };\n\n this.observer = new MutationObserver(callback);\n this.observer.observe(this.element, config);\n callback();\n }\n\n disconnect() {\n this.observer.disconnect();\n }\n\n}\n\n/* harmony default export */ const Helper_ButtonsToggleListener = (ButtonsToggleListener);\n;// CONCATENATED MODULE: ./resources/js/modules/Entity/Product.js\nclass Product {\n constructor(id, quantity, variations) {\n this.id = id;\n this.quantity = quantity;\n this.variations = variations;\n }\n\n data() {\n return {\n id: this.id,\n quantity: this.quantity,\n variations: this.variations\n };\n }\n\n}\n\n/* harmony default export */ const Entity_Product = (Product);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/SingleProductActionHandler.js\n\n\n\n\n\n\nclass SingleProductActionHandler {\n constructor(config, updateCart, showButtonCallback, hideButtonCallback, formElement, errorHandler) {\n this.config = config;\n this.updateCart = updateCart;\n this.showButtonCallback = showButtonCallback;\n this.hideButtonCallback = hideButtonCallback;\n this.formElement = formElement;\n this.errorHandler = errorHandler;\n }\n\n configuration() {\n if (this.hasVariations()) {\n const observer = new Helper_ButtonsToggleListener(this.formElement.querySelector('.single_add_to_cart_button'), this.showButtonCallback, this.hideButtonCallback);\n observer.init();\n }\n\n return {\n createOrder: this.createOrder(),\n onApprove: onApproveForContinue(this, this.errorHandler),\n onError: error => {\n this.errorHandler.genericError();\n }\n };\n }\n\n createOrder() {\n var getProducts = null;\n\n if (!this.isGroupedProduct()) {\n getProducts = () => {\n const id = document.querySelector('[name=\"add-to-cart\"]').value;\n const qty = document.querySelector('[name=\"quantity\"]').value;\n const variations = this.variations();\n return [new Entity_Product(id, qty, variations)];\n };\n } else {\n getProducts = () => {\n const products = [];\n this.formElement.querySelectorAll('input[type=\"number\"]').forEach(element => {\n if (!element.value) {\n return;\n }\n\n const elementName = element.getAttribute('name').match(/quantity\\[([\\d]*)\\]/);\n\n if (elementName.length !== 2) {\n return;\n }\n\n const id = parseInt(elementName[1]);\n const quantity = parseInt(element.value);\n products.push(new Entity_Product(id, quantity, null));\n });\n return products;\n };\n }\n\n const createOrder = (data, actions) => {\n this.errorHandler.clear();\n\n const onResolve = purchase_units => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ? this.config.bn_codes[this.config.context] : '';\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n purchase_units,\n payer,\n bn_code: bnCode,\n payment_method: PaymentMethods.PAYPAL,\n funding_source: window.ppcpFundingSource,\n context: this.config.context\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n console.error(data);\n throw Error(data.data.message);\n }\n\n return data.data.id;\n });\n };\n\n const promise = this.updateCart.update(onResolve, getProducts());\n return promise;\n };\n\n return createOrder;\n }\n\n variations() {\n if (!this.hasVariations()) {\n return null;\n }\n\n const attributes = [...this.formElement.querySelectorAll(\"[name^='attribute_']\")].map(element => {\n return {\n value: element.value,\n name: element.name\n };\n });\n return attributes;\n }\n\n hasVariations() {\n return this.formElement.classList.contains('variations_form');\n }\n\n isGroupedProduct() {\n return this.formElement.classList.contains('grouped_form');\n }\n\n}\n\n/* harmony default export */ const ActionHandler_SingleProductActionHandler = (SingleProductActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/SingleProductBootstap.js\n\n\n\n\nclass SingleProductBootstap {\n constructor(gateway, renderer, messages) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n }\n\n handleChange() {\n if (!this.shouldRender()) {\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n this.renderer.hideButtons(this.gateway.button.wrapper);\n return;\n }\n\n this.render();\n }\n\n init() {\n document.querySelector('form.cart').addEventListener('change', this.handleChange.bind(this));\n\n if (!this.shouldRender()) {\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n return;\n }\n\n this.render();\n }\n\n shouldRender() {\n return document.querySelector('form.cart') !== null && !this.priceAmountIsZero();\n }\n\n priceAmountIsZero() {\n let priceText = \"0\";\n\n if (document.querySelector('form.cart ins .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart ins .woocommerce-Price-amount').innerText;\n } else if (document.querySelector('form.cart .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;\n } else if (document.querySelector('.product .woocommerce-Price-amount')) {\n priceText = document.querySelector('.product .woocommerce-Price-amount').innerText;\n }\n\n const amount = parseFloat(priceText.replace(/([^\\d,\\.\\s]*)/g, ''));\n return amount === 0;\n }\n\n render() {\n const actionHandler = new ActionHandler_SingleProductActionHandler(this.gateway, new Helper_UpdateCart(this.gateway.ajax.change_cart.endpoint, this.gateway.ajax.change_cart.nonce), () => {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper);\n let priceText = \"0\";\n\n if (document.querySelector('form.cart ins .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart ins .woocommerce-Price-amount').innerText;\n } else if (document.querySelector('form.cart .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;\n }\n\n const amount = parseInt(priceText.replace(/([^\\d,\\.\\s]*)/g, ''));\n this.messages.renderWithAmount(amount);\n }, () => {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n }, document.querySelector('form.cart'), new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_SingleProductBootstap = (SingleProductBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/CartBootstap.js\n\n\n\nclass CartBootstrap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n }\n\n init() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.render();\n jQuery(document.body).on('updated_cart_totals updated_checkout', () => {\n this.render();\n });\n }\n\n shouldRender() {\n return document.querySelector(this.gateway.button.wrapper) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n const actionHandler = new ActionHandler_CartActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const CartBootstap = (CartBootstrap);\n;// CONCATENATED MODULE: ./resources/js/modules/OnApproveHandler/onApproveForPayNow.js\nconst onApproveForPayNow_onApprove = (context, errorHandler, spinner) => {\n return (data, actions) => {\n spinner.block();\n errorHandler.clear();\n return fetch(context.config.ajax.approve_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: context.config.ajax.approve_order.nonce,\n order_id: data.orderID,\n funding_source: window.ppcpFundingSource\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n spinner.unblock();\n\n if (!data.success) {\n if (data.data.code === 100) {\n errorHandler.message(data.data.message);\n } else {\n errorHandler.genericError();\n }\n\n if (typeof actions !== 'undefined' && typeof actions.restart !== 'undefined') {\n return actions.restart();\n }\n\n throw new Error(data.data.message);\n }\n\n document.querySelector('#place_order').click();\n });\n };\n};\n\n/* harmony default export */ const onApproveForPayNow = (onApproveForPayNow_onApprove);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/CheckoutActionHandler.js\n\n\n\n\nclass CheckoutActionHandler {\n constructor(config, errorHandler, spinner) {\n this.config = config;\n this.errorHandler = errorHandler;\n this.spinner = spinner;\n }\n\n configuration() {\n const spinner = this.spinner;\n\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ? this.config.bn_codes[this.config.context] : '';\n const errorHandler = this.errorHandler;\n const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review';\n const formValues = jQuery(formSelector).serialize();\n const createaccount = jQuery('#createaccount').is(\":checked\") ? true : false;\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n payer,\n bn_code: bnCode,\n context: this.config.context,\n order_id: this.config.order_id,\n payment_method: getCurrentPaymentMethod(),\n funding_source: window.ppcpFundingSource,\n form: formValues,\n createaccount: createaccount\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n spinner.unblock(); //handle both messages sent from Woocommerce (data.messages) and this plugin (data.data.message)\n\n if (typeof data.messages !== 'undefined') {\n const domParser = new DOMParser();\n errorHandler.appendPreparedErrorMessageElement(domParser.parseFromString(data.messages, 'text/html').querySelector('ul'));\n } else {\n errorHandler.clear();\n\n if (data.data.details.length > 0) {\n errorHandler.message(data.data.details.map(d => `${d.issue} ${d.description}`).join('<br/>'), true);\n } else {\n errorHandler.message(data.data.message, true);\n }\n }\n\n return;\n }\n\n const input = document.createElement('input');\n input.setAttribute('type', 'hidden');\n input.setAttribute('name', 'ppcp-resume-order');\n input.setAttribute('value', data.data.purchase_units[0].custom_id);\n document.querySelector(formSelector).append(input);\n return data.data.id;\n });\n };\n\n return {\n createOrder,\n onApprove: onApproveForPayNow(this, this.errorHandler, this.spinner),\n onCancel: () => {\n spinner.unblock();\n },\n onError: () => {\n this.errorHandler.genericError();\n spinner.unblock();\n }\n };\n }\n\n}\n\n/* harmony default export */ const ActionHandler_CheckoutActionHandler = (CheckoutActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Hiding.js\nconst getElement = selectorOrElement => {\n if (typeof selectorOrElement === 'string') {\n return document.querySelector(selectorOrElement);\n }\n\n return selectorOrElement;\n};\n\nconst isVisible = element => {\n return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n};\nconst setVisible = (selectorOrElement, show, important = false) => {\n const element = getElement(selectorOrElement);\n\n if (!element) {\n return;\n }\n\n const currentValue = element.style.getPropertyValue('display');\n\n if (!show) {\n if (currentValue === 'none') {\n return;\n }\n\n element.style.setProperty('display', 'none', important ? 'important' : '');\n } else {\n if (currentValue === 'none') {\n element.style.removeProperty('display');\n } // still not visible (if something else added display: none in CSS)\n\n\n if (!isVisible(element)) {\n element.style.setProperty('display', 'block');\n }\n }\n};\nconst hide = (selectorOrElement, important = false) => {\n setVisible(selectorOrElement, false, important);\n};\nconst show = selectorOrElement => {\n setVisible(selectorOrElement, true);\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/CheckoutBootstap.js\n\n\n\n\n\nclass CheckoutBootstap {\n constructor(gateway, renderer, messages, spinner) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n this.spinner = spinner;\n this.standardOrderButtonSelector = ORDER_BUTTON_SELECTOR;\n this.buttonChangeObserver = new MutationObserver(el => {\n this.updateUi();\n });\n }\n\n init() {\n this.render(); // Unselect saved card.\n // WC saves form values, so with our current UI it would be a bit weird\n // if the user paid with saved, then after some time tries to pay again,\n // but wants to enter a new card, and to do that they have to choose “Select payment” in the list.\n\n jQuery('#saved-credit-card').val(jQuery('#saved-credit-card option:first').val());\n jQuery(document.body).on('updated_checkout', () => {\n this.render();\n });\n jQuery(document.body).on('updated_checkout payment_method_selected', () => {\n this.updateUi();\n });\n jQuery(document).on('hosted_fields_loaded', () => {\n jQuery('#saved-credit-card').on('change', () => {\n this.updateUi();\n });\n });\n this.updateUi();\n }\n\n shouldRender() {\n if (document.querySelector(this.gateway.button.cancel_wrapper)) {\n return false;\n }\n\n return document.querySelector(this.gateway.button.wrapper) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n if (document.querySelector(this.gateway.hosted_fields.wrapper + '>div')) {\n document.querySelector(this.gateway.hosted_fields.wrapper + '>div').setAttribute('style', '');\n }\n\n const actionHandler = new ActionHandler_CheckoutActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic), this.spinner);\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n this.buttonChangeObserver.observe(document.querySelector(this.standardOrderButtonSelector), {\n attributes: true\n });\n }\n\n updateUi() {\n const currentPaymentMethod = getCurrentPaymentMethod();\n const isPaypal = currentPaymentMethod === PaymentMethods.PAYPAL;\n const isCard = currentPaymentMethod === PaymentMethods.CARDS;\n const isSavedCard = isCard && isSavedCardSelected();\n const isNotOurGateway = !isPaypal && !isCard;\n const isFreeTrial = PayPalCommerceGateway.is_free_trial_cart;\n const hasVaultedPaypal = PayPalCommerceGateway.vaulted_paypal_email !== '';\n setVisible(this.standardOrderButtonSelector, isPaypal && isFreeTrial && hasVaultedPaypal || isNotOurGateway || isSavedCard, true);\n setVisible('.ppcp-vaulted-paypal-details', isPaypal);\n setVisible(this.gateway.button.wrapper, isPaypal && !(isFreeTrial && hasVaultedPaypal));\n setVisible(this.gateway.messages.wrapper, isPaypal && !isFreeTrial);\n setVisible(this.gateway.hosted_fields.wrapper, isCard && !isSavedCard);\n\n if (isPaypal && !isFreeTrial) {\n this.messages.render();\n }\n\n if (isCard) {\n if (isSavedCard) {\n this.disableCreditCardFields();\n } else {\n this.enableCreditCardFields();\n }\n }\n }\n\n disableCreditCardFields() {\n jQuery('label[for=\"ppcp-credit-card-gateway-card-number\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-number').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-expiry\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-expiry').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-cvc\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-cvc').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"vault\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').attr(\"disabled\", true);\n this.renderer.disableCreditCardFields();\n }\n\n enableCreditCardFields() {\n jQuery('label[for=\"ppcp-credit-card-gateway-card-number\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-number').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-expiry\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-expiry').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-cvc\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-cvc').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"vault\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').attr(\"disabled\", false);\n this.renderer.enableCreditCardFields();\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_CheckoutBootstap = (CheckoutBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Subscriptions.js\nconst isChangePaymentPage = () => {\n const urlParams = new URLSearchParams(window.location.search);\n return urlParams.has('change_payment_method');\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/PayNowBootstrap.js\n\n\n\nclass PayNowBootstrap extends ContextBootstrap_CheckoutBootstap {\n constructor(gateway, renderer, messages, spinner) {\n super(gateway, renderer, messages, spinner);\n }\n\n updateUi() {\n if (isChangePaymentPage()) {\n return;\n }\n\n super.updateUi();\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_PayNowBootstrap = (PayNowBootstrap);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/Renderer.js\nclass Renderer {\n constructor(creditCardRenderer, defaultConfig, onSmartButtonClick, onSmartButtonsInit) {\n this.defaultConfig = defaultConfig;\n this.creditCardRenderer = creditCardRenderer;\n this.onSmartButtonClick = onSmartButtonClick;\n this.onSmartButtonsInit = onSmartButtonsInit;\n }\n\n render(wrapper, hostedFieldsWrapper, contextConfig) {\n this.renderButtons(wrapper, contextConfig);\n this.creditCardRenderer.render(hostedFieldsWrapper, contextConfig);\n }\n\n renderButtons(wrapper, contextConfig) {\n if (!document.querySelector(wrapper) || this.isAlreadyRendered(wrapper) || 'undefined' === typeof paypal.Buttons) {\n return;\n }\n\n const style = wrapper === this.defaultConfig.button.wrapper ? this.defaultConfig.button.style : this.defaultConfig.button.mini_cart_style;\n paypal.Buttons({\n style,\n ...contextConfig,\n onClick: this.onSmartButtonClick,\n onInit: this.onSmartButtonsInit\n }).render(wrapper);\n }\n\n isAlreadyRendered(wrapper) {\n return document.querySelector(wrapper).hasChildNodes();\n }\n\n hideButtons(element) {\n const domElement = document.querySelector(element);\n\n if (!domElement) {\n return false;\n }\n\n domElement.style.display = 'none';\n return true;\n }\n\n showButtons(element) {\n const domElement = document.querySelector(element);\n\n if (!domElement) {\n return false;\n }\n\n domElement.style.display = 'block';\n return true;\n }\n\n disableCreditCardFields() {\n this.creditCardRenderer.disableFields();\n }\n\n enableCreditCardFields() {\n this.creditCardRenderer.enableFields();\n }\n\n}\n\n/* harmony default export */ const Renderer_Renderer = (Renderer);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/DccInputFactory.js\nconst dccInputFactory = original => {\n const styles = window.getComputedStyle(original);\n const newElement = document.createElement('span');\n newElement.setAttribute('id', original.id);\n Object.values(styles).forEach(prop => {\n if (!styles[prop] || !isNaN(prop)) {\n return;\n }\n\n newElement.style.setProperty(prop, '' + styles[prop]);\n });\n return newElement;\n};\n\n/* harmony default export */ const DccInputFactory = (dccInputFactory);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/CreditCardRenderer.js\n\n\n\nclass CreditCardRenderer {\n constructor(defaultConfig, errorHandler, spinner) {\n this.defaultConfig = defaultConfig;\n this.errorHandler = errorHandler;\n this.spinner = spinner;\n this.cardValid = false;\n this.formValid = false;\n this.currentHostedFieldsInstance = null;\n }\n\n render(wrapper, contextConfig) {\n if (this.defaultConfig.context !== 'checkout' && this.defaultConfig.context !== 'pay-now' || wrapper === null || document.querySelector(wrapper) === null) {\n return;\n }\n\n if (typeof paypal.HostedFields === 'undefined' || !paypal.HostedFields.isEligible()) {\n const wrapperElement = document.querySelector(wrapper);\n wrapperElement.parentNode.removeChild(wrapperElement);\n return;\n }\n\n const buttonSelector = wrapper + ' button';\n\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.teardown().catch(err => console.error(`Hosted fields teardown error: ${err}`));\n this.currentHostedFieldsInstance = null;\n }\n\n const gateWayBox = document.querySelector('.payment_box.payment_method_ppcp-credit-card-gateway');\n const oldDisplayStyle = gateWayBox.style.display;\n gateWayBox.style.display = 'block';\n const hideDccGateway = document.querySelector('#ppcp-hide-dcc');\n\n if (hideDccGateway) {\n hideDccGateway.parentNode.removeChild(hideDccGateway);\n }\n\n const cardNumberField = document.querySelector('#ppcp-credit-card-gateway-card-number');\n const stylesRaw = window.getComputedStyle(cardNumberField);\n let styles = {};\n Object.values(stylesRaw).forEach(prop => {\n if (!stylesRaw[prop]) {\n return;\n }\n\n styles[prop] = '' + stylesRaw[prop];\n });\n const cardNumber = DccInputFactory(cardNumberField);\n cardNumberField.parentNode.replaceChild(cardNumber, cardNumberField);\n const cardExpiryField = document.querySelector('#ppcp-credit-card-gateway-card-expiry');\n const cardExpiry = DccInputFactory(cardExpiryField);\n cardExpiryField.parentNode.replaceChild(cardExpiry, cardExpiryField);\n const cardCodeField = document.querySelector('#ppcp-credit-card-gateway-card-cvc');\n const cardCode = DccInputFactory(cardCodeField);\n cardCodeField.parentNode.replaceChild(cardCode, cardCodeField);\n gateWayBox.style.display = oldDisplayStyle;\n const formWrapper = '.payment_box payment_method_ppcp-credit-card-gateway';\n\n if (this.defaultConfig.enforce_vault && document.querySelector(formWrapper + ' .ppcp-credit-card-vault')) {\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').checked = true;\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').setAttribute('disabled', true);\n }\n\n paypal.HostedFields.render({\n createOrder: contextConfig.createOrder,\n styles: {\n 'input': styles\n },\n fields: {\n number: {\n selector: '#ppcp-credit-card-gateway-card-number',\n placeholder: this.defaultConfig.hosted_fields.labels.credit_card_number\n },\n cvv: {\n selector: '#ppcp-credit-card-gateway-card-cvc',\n placeholder: this.defaultConfig.hosted_fields.labels.cvv\n },\n expirationDate: {\n selector: '#ppcp-credit-card-gateway-card-expiry',\n placeholder: this.defaultConfig.hosted_fields.labels.mm_yy\n }\n }\n }).then(hostedFields => {\n document.dispatchEvent(new CustomEvent(\"hosted_fields_loaded\"));\n this.currentHostedFieldsInstance = hostedFields;\n hostedFields.on('inputSubmitRequest', () => {\n this._submit(contextConfig);\n });\n hostedFields.on('cardTypeChange', event => {\n if (!event.cards.length) {\n this.cardValid = false;\n return;\n }\n\n const validCards = this.defaultConfig.hosted_fields.valid_cards;\n this.cardValid = validCards.indexOf(event.cards[0].type) !== -1;\n });\n hostedFields.on('validityChange', event => {\n const formValid = Object.keys(event.fields).every(function (key) {\n return event.fields[key].isValid;\n });\n this.formValid = formValid;\n });\n show(buttonSelector);\n\n if (document.querySelector(wrapper).getAttribute('data-ppcp-subscribed') !== true) {\n document.querySelector(buttonSelector).addEventListener('click', event => {\n event.preventDefault();\n\n this._submit(contextConfig);\n });\n document.querySelector(wrapper).setAttribute('data-ppcp-subscribed', true);\n }\n });\n document.querySelector('#payment_method_ppcp-credit-card-gateway').addEventListener('click', () => {\n document.querySelector('label[for=ppcp-credit-card-gateway-card-number]').click();\n });\n }\n\n disableFields() {\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.setAttribute({\n field: 'number',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.setAttribute({\n field: 'cvv',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.setAttribute({\n field: 'expirationDate',\n attribute: 'disabled'\n });\n }\n }\n\n enableFields() {\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'number',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'cvv',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'expirationDate',\n attribute: 'disabled'\n });\n }\n }\n\n _submit(contextConfig) {\n this.spinner.block();\n this.errorHandler.clear();\n\n if (this.formValid && this.cardValid) {\n const save_card = this.defaultConfig.can_save_vault_token ? true : false;\n let vault = document.getElementById('ppcp-credit-card-vault') ? document.getElementById('ppcp-credit-card-vault').checked : save_card;\n\n if (this.defaultConfig.enforce_vault) {\n vault = true;\n }\n\n const contingency = this.defaultConfig.hosted_fields.contingency;\n const hostedFieldsData = {\n vault: vault\n };\n\n if (contingency !== 'NO_3D_SECURE') {\n hostedFieldsData.contingencies = [contingency];\n }\n\n if (this.defaultConfig.payer) {\n hostedFieldsData.cardholderName = this.defaultConfig.payer.name.given_name + ' ' + this.defaultConfig.payer.name.surname;\n }\n\n if (!hostedFieldsData.cardholderName) {\n const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value : '';\n const lastName = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value : '';\n\n if (!firstName || !lastName) {\n this.spinner.unblock();\n this.errorHandler.message(this.defaultConfig.hosted_fields.labels.cardholder_name_required);\n return;\n }\n\n hostedFieldsData.cardholderName = firstName + ' ' + lastName;\n }\n\n this.currentHostedFieldsInstance.submit(hostedFieldsData).then(payload => {\n payload.orderID = payload.orderId;\n this.spinner.unblock();\n return contextConfig.onApprove(payload);\n }).catch(err => {\n this.spinner.unblock();\n this.errorHandler.clear();\n\n if (err.details) {\n this.errorHandler.message(err.details.map(d => `${d.issue} ${d.description}`).join('<br/>'), true);\n }\n });\n } else {\n this.spinner.unblock();\n const message = !this.cardValid ? this.defaultConfig.hosted_fields.labels.card_not_supported : this.defaultConfig.hosted_fields.labels.fields_not_valid;\n this.errorHandler.message(message);\n }\n }\n\n}\n\n/* harmony default export */ const Renderer_CreditCardRenderer = (CreditCardRenderer);\n;// CONCATENATED MODULE: ./resources/js/modules/DataClientIdAttributeHandler.js\nconst storageKey = 'ppcp-data-client-id';\n\nconst validateToken = (token, user) => {\n if (!token) {\n return false;\n }\n\n if (token.user !== user) {\n return false;\n }\n\n const currentTime = new Date().getTime();\n const isExpired = currentTime >= token.expiration * 1000;\n return !isExpired;\n};\n\nconst storedTokenForUser = user => {\n const token = JSON.parse(sessionStorage.getItem(storageKey));\n\n if (validateToken(token, user)) {\n return token.token;\n }\n\n return null;\n};\n\nconst storeToken = token => {\n sessionStorage.setItem(storageKey, JSON.stringify(token));\n};\n\nconst dataClientIdAttributeHandler = (script, config) => {\n fetch(config.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: config.nonce\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n const isValid = validateToken(data, config.user);\n\n if (!isValid) {\n return;\n }\n\n storeToken(data);\n script.setAttribute('data-client-token', data.token);\n document.body.append(script);\n });\n};\n\n/* harmony default export */ const DataClientIdAttributeHandler = (dataClientIdAttributeHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/MessageRenderer.js\nclass MessageRenderer {\n constructor(config) {\n this.config = config;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n paypal.Messages({\n amount: this.config.amount,\n placement: this.config.placement,\n style: this.config.style\n }).render(this.config.wrapper);\n }\n\n renderWithAmount(amount) {\n if (!this.shouldRender()) {\n return;\n }\n\n const newWrapper = document.createElement('div');\n newWrapper.setAttribute('id', this.config.wrapper.replace('#', ''));\n const sibling = document.querySelector(this.config.wrapper).nextSibling;\n document.querySelector(this.config.wrapper).parentElement.removeChild(document.querySelector(this.config.wrapper));\n sibling.parentElement.insertBefore(newWrapper, sibling);\n paypal.Messages({\n amount,\n placement: this.config.placement,\n style: this.config.style\n }).render(this.config.wrapper);\n }\n\n shouldRender() {\n if (typeof paypal.Messages === 'undefined' || typeof this.config.wrapper === 'undefined') {\n return false;\n }\n\n if (!document.querySelector(this.config.wrapper)) {\n return false;\n }\n\n return true;\n }\n\n}\n\n/* harmony default export */ const Renderer_MessageRenderer = (MessageRenderer);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Spinner.js\nclass Spinner {\n constructor(target = 'form.woocommerce-checkout') {\n this.target = target;\n }\n\n setTarget(target) {\n this.target = target;\n }\n\n block() {\n jQuery(this.target).block({\n message: null,\n overlayCSS: {\n background: '#fff',\n opacity: 0.6\n }\n });\n }\n\n unblock() {\n jQuery(this.target).unblock();\n }\n\n}\n\n/* harmony default export */ const Helper_Spinner = (Spinner);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/FreeTrialHandler.js\n\n\n\nclass FreeTrialHandler {\n constructor(config, spinner, errorHandler) {\n this.config = config;\n this.spinner = spinner;\n this.errorHandler = errorHandler;\n }\n\n handle() {\n this.spinner.block();\n fetch(this.config.ajax.vault_paypal.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.vault_paypal.nonce,\n return_url: location.href\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n if (!data.success) {\n this.spinner.unblock();\n console.error(data);\n this.errorHandler.message(data.data.message);\n throw Error(data.data.message);\n }\n\n location.href = data.data.approve_link;\n }).catch(error => {\n this.spinner.unblock();\n console.error(error);\n this.errorHandler.genericError();\n });\n }\n\n}\n\n/* harmony default export */ const ActionHandler_FreeTrialHandler = (FreeTrialHandler);\n;// CONCATENATED MODULE: ./resources/js/button.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst buttonsSpinner = new Helper_Spinner('.ppc-button-wrapper');\nconst cardsSpinner = new Helper_Spinner('#ppcp-hosted-fields');\n\nconst bootstrap = () => {\n const errorHandler = new modules_ErrorHandler(PayPalCommerceGateway.labels.error.generic);\n const spinner = new Helper_Spinner();\n const creditCardRenderer = new Renderer_CreditCardRenderer(PayPalCommerceGateway, errorHandler, spinner);\n const freeTrialHandler = new ActionHandler_FreeTrialHandler(PayPalCommerceGateway, spinner, errorHandler);\n\n const onSmartButtonClick = (data, actions) => {\n window.ppcpFundingSource = data.fundingSource;\n const form = document.querySelector('form.woocommerce-checkout');\n\n if (form) {\n jQuery('#ppcp-funding-source-form-input').remove();\n form.insertAdjacentHTML('beforeend', `<input type=\"hidden\" name=\"ppcp-funding-source\" value=\"${data.fundingSource}\" id=\"ppcp-funding-source-form-input\">`);\n }\n\n const isFreeTrial = PayPalCommerceGateway.is_free_trial_cart;\n\n if (isFreeTrial && data.fundingSource !== 'card') {\n freeTrialHandler.handle();\n return actions.reject();\n }\n };\n\n const onSmartButtonsInit = () => {\n buttonsSpinner.unblock();\n };\n\n const renderer = new Renderer_Renderer(creditCardRenderer, PayPalCommerceGateway, onSmartButtonClick, onSmartButtonsInit);\n const messageRenderer = new Renderer_MessageRenderer(PayPalCommerceGateway.messages);\n const context = PayPalCommerceGateway.context;\n\n if (context === 'mini-cart' || context === 'product') {\n if (PayPalCommerceGateway.mini_cart_buttons_enabled === '1') {\n const miniCartBootstrap = new ContextBootstrap_MiniCartBootstap(PayPalCommerceGateway, renderer);\n miniCartBootstrap.init();\n }\n }\n\n if (context === 'product' && PayPalCommerceGateway.single_product_buttons_enabled === '1') {\n const singleProductBootstrap = new ContextBootstrap_SingleProductBootstap(PayPalCommerceGateway, renderer, messageRenderer);\n singleProductBootstrap.init();\n }\n\n if (context === 'cart') {\n const cartBootstrap = new CartBootstap(PayPalCommerceGateway, renderer);\n cartBootstrap.init();\n }\n\n if (context === 'checkout') {\n const checkoutBootstap = new ContextBootstrap_CheckoutBootstap(PayPalCommerceGateway, renderer, messageRenderer, spinner);\n checkoutBootstap.init();\n }\n\n if (context === 'pay-now') {\n const payNowBootstrap = new ContextBootstrap_PayNowBootstrap(PayPalCommerceGateway, renderer, messageRenderer, spinner);\n payNowBootstrap.init();\n }\n\n if (context !== 'checkout') {\n messageRenderer.render();\n }\n};\n\ndocument.addEventListener('DOMContentLoaded', () => {\n if (!typeof PayPalCommerceGateway) {\n console.error('PayPal button could not be configured.');\n return;\n }\n\n if (PayPalCommerceGateway.context !== 'checkout' && PayPalCommerceGateway.data_client_id.user === 0 && PayPalCommerceGateway.data_client_id.has_subscriptions) {\n return;\n } // Sometimes PayPal script takes long time to load,\n // so we additionally hide the standard order button here to avoid failed orders.\n // Normally it is hidden later after the script load.\n\n\n const hideOrderButtonIfPpcpGateway = () => {\n // only in checkout and pay now page, otherwise it may break things (e.g. payment via product page),\n // and also the loading spinner may look weird on other pages\n if (!['checkout', 'pay-now'].includes(PayPalCommerceGateway.context) || isChangePaymentPage() || PayPalCommerceGateway.is_free_trial_cart && PayPalCommerceGateway.vaulted_paypal_email !== '') {\n return;\n }\n\n const currentPaymentMethod = getCurrentPaymentMethod();\n const isPaypal = currentPaymentMethod === PaymentMethods.PAYPAL;\n const isCards = currentPaymentMethod === PaymentMethods.CARDS;\n setVisible(ORDER_BUTTON_SELECTOR, !isPaypal && !isCards, true);\n\n if (isPaypal) {\n // stopped after the first rendering of the buttons, in onInit\n buttonsSpinner.block();\n } else {\n buttonsSpinner.unblock();\n }\n\n if (isCards) {\n cardsSpinner.block();\n } else {\n cardsSpinner.unblock();\n }\n };\n\n jQuery(document).on('hosted_fields_loaded', () => {\n cardsSpinner.unblock();\n });\n let bootstrapped = false;\n hideOrderButtonIfPpcpGateway();\n jQuery(document.body).on('updated_checkout payment_method_selected', () => {\n if (bootstrapped) {\n return;\n }\n\n hideOrderButtonIfPpcpGateway();\n });\n const script = document.createElement('script');\n script.addEventListener('load', event => {\n bootstrapped = true;\n bootstrap();\n });\n script.setAttribute('src', PayPalCommerceGateway.button.url);\n Object.entries(PayPalCommerceGateway.script_attributes).forEach(keyValue => {\n script.setAttribute(keyValue[0], keyValue[1]);\n });\n\n if (PayPalCommerceGateway.data_client_id.set_attribute) {\n DataClientIdAttributeHandler(script, PayPalCommerceGateway.data_client_id);\n return;\n }\n\n document.body.append(script);\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTM2LmpzIiwibWFwcGluZ3MiOiI7O0FBQUEsTUFBTUEsWUFBTixDQUFtQjtBQUVmQyxFQUFBQSxXQUFXLENBQUNDLGdCQUFELEVBQ1g7QUFDSSxTQUFLQSxnQkFBTCxHQUF3QkEsZ0JBQXhCO0FBQ0EsU0FBS0MsT0FBTCxHQUFlQyxRQUFRLENBQUNDLGFBQVQsQ0FBdUIsOEJBQXZCLENBQWY7QUFDQSxTQUFLQyxZQUFMLEdBQW9CRixRQUFRLENBQUNDLGFBQVQsQ0FBdUIsc0JBQXZCLENBQXBCO0FBQ0g7O0FBRURFLEVBQUFBLFlBQVksR0FBRztBQUNYLFFBQUksS0FBS0osT0FBTCxDQUFhSyxTQUFiLENBQXVCQyxRQUF2QixDQUFnQyxjQUFoQyxDQUFKLEVBQXFEO0FBQ2pEO0FBQ0g7O0FBQ0QsU0FBS0MsS0FBTDtBQUNBLFNBQUtDLE9BQUwsQ0FBYSxLQUFLVCxnQkFBbEI7QUFDSDs7QUFFRFUsRUFBQUEsaUNBQWlDLENBQUNDLG1CQUFELEVBQ2pDO0FBQ0ksUUFBRyx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CAnJyk7XG4gICAgfVxuXG4gICAgY2xlYXIoKVxuICAgIHtcbiAgICAgICAgaWYgKHRoaXMubWVzc2FnZXNMaXN0ID09PSBudWxsKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLm1lc3NhZ2VzTGlzdC5pbm5lckhUTUwgPSAnJztcbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IEVycm9ySGFuZGxlcjtcbiIsImNvbnN0IG9uQXBwcm92ZSA9IChjb250ZXh0LCBlcnJvckhhbmRsZXIpID0+IHtcbiAgICByZXR1cm4gKGRhdGEsIGFjdGlvbnMpID0+IHtcbiAgICAgICAgcmV0dXJuIGZldGNoKGNvbnRleHQuY29uZmlnLmFqYXguYXBwcm92ZV9vcmRlci5lbmRwb2ludCwge1xuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgbm9uY2U6IGNvbnRleHQuY29uZmlnLmFqYXguYXBwcm92ZV9vcmRlci5ub25jZSxcbiAgICAgICAgICAgICAgICBvcmRlcl9pZDpkYXRhLm9yZGVySUQsXG4gICAgICAgICAgICAgICAgZnVuZGluZ19zb3VyY2U6IHdpbmRvdy5wcGNwRnVuZGluZ1NvdXJjZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH0pLnRoZW4oKHJlcyk9PntcbiAgICAgICAgICAgIHJldHVybiByZXMuanNvbigpO1xuICAgICAgICB9KS50aGVuKChkYXRhKT0+e1xuICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIuZ2VuZXJpY0Vycm9yKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjdGlvbnMucmVzdGFydCgpLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGVycm9ySGFuZGxlci5nZW5l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y5jb250ZXh0XSAhPT0gJ3VuZGVmaW5lZCcgP1xuICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLmJuX2NvZGVzW3RoaXMuY29uZmlnLmNvbnRleHRdIDogJyc7XG4gICAgICAgICAgICByZXR1cm4gZmV0Y2godGhpcy5jb25maWcuYWpheC5jcmVhdGVfb3JkZXIuZW5kcG9pbnQsIHtcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgIG5vbmNlOiB0aGlzLmNvbmZpZy5hamF4LmNyZWF0ZV9vcmRlci5ub25jZSxcbiAgICAgICAgICAgICAgICAgICAgcHVyY2hhc2VfdW5pdHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBwYXltZW50X21ldGhvZDogUGF5bWVudE1ldGhvZHMuUEFZUEFMLFxuICAgICAgICAgICAgICAgICAgICBmdW5kaW5nX3NvdXJjZTogd2luZG93LnBwY3BGdW5kaW5nU291cmNlLFxuICAgICAgICAgICAgICAgICAgICBibl9jb2RlOmJuQ29kZSxcbiAgICAgICAgICAgICAgICAgICAgcGF5ZXIsXG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQ6dGhpcy5jb25maWcuY29udGV4dFxuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbihyZXMpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzLmpzb24oKTtcbiAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24oZGF0YSkge1xuICAgICAgICAgICAgICAgIGlmICghZGF0YS5zdWNjZXNzKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IEVycm9yKGRhdGEuZGF0YS5tZXNzYWdlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICA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AgICAgICB0aGlzLm5vbmNlID0gbm9uY2U7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICpcbiAgICAgKiBAcGFyYW0gb25SZXNvbHZlXG4gICAgICogQHBhcmFtIHtQcm9kdWN0W119IHByb2R1Y3RzXG4gICAgICogQHJldHVybnMge1Byb21pc2U8dW5rbm93bj59XG4gICAgICovXG4gICAgdXBkYXRlKG9uUmVzb2x2ZSwgcHJvZHVjdHMpXG4gICAge1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgZmV0Y2goXG4gICAgICAgICAgICAgICAgdGhpcy5lbmRwb2ludCxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBub25jZTogdGhpcy5ub25jZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y3RzLFxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICkudGhlbihcbiAgICAgICAgICAgICAgICAocmVzdWx0KSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdC5qc29uKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKS50aGVuKChyZXN1bHQpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoISByZXN1bHQuc3VjY2Vzcykge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QocmVzdWx0LmRhdGEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc29sdmVkID0gb25SZXNvbHZlKHJlc3VsdC5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXNvbHZl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tcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBvYnNlcnZlci5pbml0KCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY3JlYXRlT3JkZXI6IHRoaXMuY3JlYXRlT3JkZXIoKSxcbiAgICAgICAgICAgIG9uQXBwcm92ZTogb25BcHByb3ZlKHRoaXMsIHRoaXMuZXJyb3JIYW5kbGVyKSxcbiAgICAgICAgICAgIG9uRXJyb3I6IChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuZXJyb3JIYW5kbGVyLmdlbmVyaWNFcnJvcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY3JlYXRlT3JkZXIoKVxuICAgIHtcbiAgICAgICAgdmFyIGdldFByb2R1Y3RzID0gbnVsbDtcbiAgICAgICAgaWYgKCEgdGhpcy5pc0dyb3VwZWRQcm9kdWN0KCkgKSB7XG4gICAgICAgICAgICBnZXRQcm9kdWN0cyA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBpZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ1tuYW1lPVwiYWRkLXRvLWNhcnRcIl0nKS52YWx1ZTtcbiAgICAgICAgICAgICAgICBjb25zdCBxdHkgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdbbmFtZT1cInF1YW50aXR5XCJdJykudmFsdWU7XG4gICAgICAgICAgICAgICAgY29uc3QgdmFyaWF0aW9ucyA9IHRoaXMudmFyaWF0aW9ucygpO1xuICAgICAgICAgICAgICAgIHJldHVybiBbbmV3IFByb2R1Y3QoaWQsIHF0eSwgdmFyaWF0aW9ucyldO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZ2V0UHJvZHVjdHMgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgcHJvZHVjdHMgPSBbXTtcbiAgICAgICAgICAgICAgICB0aGlzLmZvcm1FbGVtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ2lucHV0W3R5cGU9XCJudW1iZXJcIl0nKS5mb3JFYWNoKChlbGVtZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghIGVsZW1lbnQudmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50TmFtZSA9IGVsZW1lbnQuZ2V0QXR0cmlidXRlKCduYW1lJykubWF0Y2goL3F1YW50aXR5XFxbKFtcXGRdKilcXF0vKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW1lbnROYW1lLmxlbmd0aCAhPT0gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGlkID0gcGFyc2VJbnQoZWxlbWVudE5hbWVbMV0pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBxdWFudGl0eSA9IHBhcnNlSW50KGVsZW1lbnQudmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICBwcm9kdWN0cy5wdXNoKG5ldyBQcm9kdWN0KGlkLCBxdWFudGl0eSwgbnVsbCkpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHByb2R1Y3RzO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNyZWF0ZU9yZGVyID0gKGRhdGEsIGFjdGlvbnMpID0+IHtcbiAgICAgICAgICAgIHRoaXMuZXJyb3JIYW5kbGVyLmNsZWFyKCk7XG5cbiAgICAgICAgICAgIGNvbnN0IG9uUmVzb2x2ZSA9IChwdXJjaGFzZV91bml0cykgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHBheWVyID0gcGF5ZXJEYXRhKCk7XG4gICAgICAgICAgICAgICAgY29uc3QgYm5Db2RlID0gdHlwZW9mIHRoaXMuY29uZmlnLmJuX2NvZGVzW3RoaXMuY29uZmlnLmNvbnRleHRdICE9PSAndW5kZWZpbmVkJyA/XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLmJuX2NvZGVzW3RoaXMuY29uZmlnLmNvbnRleHRdIDogJyc7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZldGNoKHRoaXMuY29uZmlnLmFqYXguY3JlYXRlX29yZGVyLmVuZHBvaW50LCB7XG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBub25jZTogdGhpcy5jb25maWcuYWpheC5jcmVhdGVfb3JkZXIubm9uY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXJjaGFzZV91bml0cyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBheWVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgYm5fY29kZTpibkNvZGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXltZW50X21ldGhvZDogUGF5bWVudE1ldGhvZHMuUEFZUEFMLFxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuZGluZ19zb3VyY2U6IHdpbmRvdy5wcGNwRnVuZGluZ1NvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQ6dGhpcy5jb25maWcuY29udGV4dFxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKHJlcykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzLmpzb24oKTtcbiAgICAgICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghZGF0YS5zdWNjZXNzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoZGF0YS5kYXRhLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBkYXRhLmRhdGEuaWQ7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBjb25zdCBwcm9taXNlID0gdGhpcy51cGRhdGVDYXJ0LnVwZGF0ZShvblJlc29sdmUsIGdldFByb2R1Y3RzKCkpO1xuICAgICAgICAgICAgcmV0dXJuIHByb21pc2U7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBjcmVhdGVPcmRlcjtcbiAgICB9XG5cbiAgICB2YXJpYXRpb25zKClcbiAgICB7XG5cbiAgICAgICAgaWYgKCEgdGhpcy5oYXNWYXJpYXRpb25zKCkpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGF0dHJpYnV0ZXMgPSBbLi4udGhpcy5mb3JtRWxlbWVudC5xdWVyeVNlbGVjdG9yQWxsKFwiW25hbWVePSdhdHRyaWJ1dGVfJ11cIildLm1hcChcbiAgICAgICAgICAgIChlbGVtZW50KSA9PiB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZTplbGVtZW50LnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICBuYW1lOmVsZW1lbnQubmFtZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIGF0dHJpYnV0ZXM7XG4gICAgfVxuXG4gICAgaGFzVmFyaWF0aW9ucygpXG4gICAge1xuICAgICAgICByZXR1cm4gdGhpcy5mb3JtRWxlbWVudC5jbGFzc0xpc3QuY29udGFpbnMoJ3ZhcmlhdGlvbnNfZm9ybScpO1xuICAgIH1cblxuICAg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LWFtb3VudCcpLmlubmVyVGV4dDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucHJvZHVjdCAud29vY29tbWVyY2UtUHJpY2UtYW1vdW50JykpIHtcbiAgICAgICAgICAgIHByaWNlVGV4dCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wcm9kdWN0IC53b29jb21tZXJjZS1QcmljZS1hbW91bnQnKS5pbm5lclRleHQ7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgYW1vdW50ID0gcGFyc2VGbG9hdChwcmljZVRleHQucmVwbGFjZSgvKFteXFxkLFxcLlxcc10qKS9nLCAnJykpO1xuICAgICAgICByZXR1cm4gYW1vdW50ID09PSAwO1xuXG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICBjb25zdCBhY3Rpb25IYW5kbGVyID0gbmV3IFNpbmdsZVByb2R1Y3RBY3Rpb25IYW5kbGVyKFxuICAgICAgICAgICAgdGhpcy5nYXRld2F5LFxuICAgICAgICAgICAgbmV3IFVwZGF0ZUNhcnQoXG4gICAgICAgICAgICAgICAgdGhpcy5nYXRld2F5LmFqYXguY2hhbmdlX2NhcnQuZW5kcG9pbnQsXG4gICAgICAgICAgICAgICAgdGhpcy5nYXRld2F5LmFqYXguY2hhbmdlX2NhcnQubm9uY2UsXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2hvd0J1dHRvbnModGhpcy5nYXRld2F5LmJ1dHRvbi53cmFwcGVyKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNob3dCdXR0b25zKHRoaXMuZ2F0ZXdheS5ob3N0ZWRfZmllbGRzLndyYXBwZXIpO1xuICAgICAgICAgICAgICAgIGxldCBwcmljZVRleHQgPSBcIjBcIjtcbiAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignZm9ybS5jYXJ0IGlucyAud29vY29tbWVyY2UtUHJpY2UtYW1vdW50JykpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpY2VUZXh0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignZm9ybS5jYXJ0IGlucyAud29vY29tbWVyY2UtUHJpY2UtYW1vdW50JykuaW5uZXJUZXh0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdmb3JtLmNhcnQgLndvb2NvbW1lcmNlLVByaWNlLWFtb3VudCcpKSB7XG4gICAgICAgICAgICAgICAgICAgIHByaWNlVGV4dCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ2Zvcm0uY2FydCAud29vY29tbWVyY2UtUHJpY2UtYW1vdW50JykuaW5uZXJUZXh0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBhbW91bnQgPSBwYXJzZUludChwcmljZVRleHQucmVwbGFjZSgvKFteXFxkLFxcLlxcc10qKS9nLCAnJykpO1xuICAgICAgICAgICAgICAgIHRoaXMubWVzc2FnZXMucmVuZGVyV2l0aEFtb3VudChhbW91bnQpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuaGlkZUJ1dHRvbnModGhpcy5nYXRld2F5LmJ1dHRvbi53cmFwcGVyKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLmhpZGVCdXR0b25zKHRoaXMuZ2F0ZXdheS5ob3N0ZWRfZmllbGRzLndyYXBwZXIpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ2Zvcm0uY2FydCcpLFxuICAgICAgICAgICAgbmV3IEVycm9ySGFuZGxlcih0aGlzLmdhdGV3YXkubGFiZWxzLmVyc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bmNlOiBjb250ZXh0LmNvbmZpZy5hamF4LmFwcHJvdmVfb3JkZXIubm9uY2UsXG4gICAgICAgICAgICAgICAgb3JkZXJfaWQ6ZGF0YS5vcmRlcklELFxuICAgICAgICAgICAgICAgIGZ1bmRpbmdfc291cmNlOiB3aW5kb3cucHBjcEZ1bmRpbmdTb3VyY2UsXG4gICAgICAgICAgICB9KVxuICAgICAgICB9KS50aGVuKChyZXMpPT57XG4gICAgICAgICAgICByZXR1cm4gcmVzLmpzb24oKTtcbiAgICAgICAgfSkudGhlbigoZGF0YSk9PntcbiAgICAgICAgICAgIHNwaW5uZXIudW5ibG9jaygpO1xuICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5kYXRhLmNvZGUgPT09IDEwMCkge1xuICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIubWVzc2FnZShkYXRhLmRhdGEubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLmdlbmVyaWNFcnJvcigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGFjdGlvbnMgIT09ICd1bmRlZmluZWQnICYmIHR5cGVvZiBhY3Rpb25zLnJlc3RhcnQgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhY3Rpb25zLnJlc3RhcnQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGRhdGEuZGF0YS5tZXNzYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwbGFjZV9vcmRlcicpLmNsaWNrKClcbiAgICAgICAgfSk7XG5cbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IG9uQXBwcm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Zm9ybS5jaGVja291dCcgOiAnZm9ybSNvcmRlcl9yZXZpZXcnO1xuICAgICAgICAgICAgY29uc3QgZm9ybVZhbHVlcyA9IGpRdWVyeShmb3JtU2VsZWN0b3IpLnNlcmlhbGl6ZSgpO1xuXG4gICAgICAgICAgICBjb25zdCBjcmVhdGVhY2NvdW50ID0galF1ZXJ5KCcjY3JlYXRlYWNjb3VudCcpLmlzKFwiOmNoZWNrZWRcIikgPyB0cnVlIDogZmFsc2U7XG5cbiAgICAgICAgICAgIHJldHVybiBmZXRjaCh0aGlzLmNvbmZpZy5hamF4LmNyZWF0ZV9vcmRlci5lbmRwb2ludCwge1xuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgbm9uY2U6IHRoaXMuY29uZmlnLmFqYXguY3JlYXRlX29yZGVyLm5vbmNlLFxuICAgICAgICAgICAgICAgICAgICBwYXllcixcbiAgICAgICAgICAgICAgICAgICAgYm5fY29kZTpibkNvZGUsXG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQ6dGhpcy5jb25maWcuY29udGV4dCxcbiAgICAgICAgICAgICAgICAgICAgb3JkZXJfaWQ6dGhpcy5jb25maWcub3JkZXJfaWQsXG4gICAgICAgICAgICAgICAgICAgIHBheW1lbnRfbWV0aG9kOiBnZXRDdXJyZW50UGF5bWVudE1ldGhvZCgpLFxuICAgICAgICAgICAgICAgICAgICBmdW5kaW5nX3NvdXJjZTogd2luZG93LnBwY3BGdW5kaW5nU291cmNlLFxuICAgICAgICAgICAgICAgICAgICBmb3JtOmZvcm1WYWx1ZXMsXG4gICAgICAgICAgICAgICAgICAgIGNyZWF0ZWFjY291bnQ6IGNyZWF0ZWFjY291bnRcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlcy5qc29uKCk7XG4gICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgc3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgICAgIC8vaGFuZGxlIGJvdGggbWVzc2FnZXMgc2VudCBmcm9tIFdvb2NvbW1lcmNlIChkYXRhLm1lc3NhZ2VzKSBhbmQgdGhpcyBwbHVnaW4gKGRhdGEuZGF0YS5tZXNzYWdlKVxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mKGRhdGEubWVzc2FnZXMpICE9PSAndW5kZWZpbmVkJyApXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRvbVBhcnNlciA9IG5ldyBET01QYXJzZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9ySGFuZGxlci5hcHBlbmRQcmVwYXJlZEVycm9yTWVzc2FnZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9tUGFyc2VyLnBhcnNlRnJvbVN0cmluZyhkYXRhLm1lc3NhZ2VzLCAndGV4dC9odG1sJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnF1ZXJ5U2VsZWN0b3IoJ3VsJylcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIuY2xlYXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmRhdGEuZGV0YWlscy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLm1lc3NhZ2UoZGF0YS5kYXRhLmRldGFpbHMubWFwKGQgPT4gYCR7ZC5pc3N1ZX0gJHtkLmRlc2NyaXB0aW9ufWApLmpvaW4oJzxici8+JyksIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIubWVzc2FnZShkYXRhLmRhdGEubWVzc2FnZSwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IGlucHV0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnaW5wdXQnKTtcbiAgICAgICAgICAgICAgICBpbnB1dC5zZXRBdHRyaWJ1dGUoJ3R5cGUnLCAnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgaW5wdXQuc2V0QXR0cmlidXRlKCduYW1lJywgJ3BwY3AtcmVzdW1lLW9yZGVyJyk7XG4gICAgICAgICAgICAgICAgaW5wdXQuc2V0QXR0cmlidXRlKCd2YWx1ZScsIGRhdGEuZGF0YS5wdXJjaGFzZV91bml0c1swXS5jdXN0b21faWQpO1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoZm9ybVNlbGVjdG9yKS5hcHBlbmQoaW5wdXQpO1xuICAgICAgICAgICAgICAgIHJldHVybiBkYXRhLmRhdGEuaWQ7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY3JlYXRlT3JkZXIsXG4gICAgICAgICAgICBvbkFwcHJvdmU6b25BcHByb3ZlKHRoaXMsIHRoaXMuZXJyb3JIYW5kbGVyLCB0aGlzLnNwaW5uZXIpLFxuICAgICAgICAgICAgb25DYW5jZWw6ICgpID0+IHtcbiAgICAgICAgICAgICAgICBzcGlubmVyLnVuYmxvY2soKTtcbiAgICAgICAgICAgIH0sXG4g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Gl0LWNhcmQtdmF1bHQnKS5zZXRBdHRyaWJ1dGUoJ2Rpc2FibGVkJywgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgcGF5cGFsLkhvc3RlZEZpZWxkcy5yZW5kZXIoe1xuICAgICAgICAgICAgY3JlYXRlT3JkZXI6IGNvbnRleHRDb25maWcuY3JlYXRlT3JkZXIsXG4gICAgICAgICAgICBzdHlsZXM6IHtcbiAgICAgICAgICAgICAgICAnaW5wdXQnOiBzdHlsZXNcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBmaWVsZHM6IHtcbiAgICAgICAgICAgICAgICBudW1iZXI6IHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICcjcHBjcC1jcmVkaXQtY2FyZC1nYXRld2F5LWNhcmQtbnVtYmVyJyxcbiAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6IHRoaXMuZGVmYXVsdENvbmZpZy5ob3N0ZWRfZmllbGRzLmxhYmVscy5jcmVkaXRfY2FyZF9udW1iZXIsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBjdnY6IHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3I6ICcjcHBjcC1jcmVkaXQtY2FyZC1nYXRld2F5LWNhcmQtY3ZjJyxcbiAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6IHRoaXMuZGVmYXVsdENvbmZpZy5ob3N0ZWRfZmllbGRzLmxhYmVscy5jdnYsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBleHBpcmF0aW9uRGF0ZToge1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJyNwcGNwLWNyZWRpdC1jYXJkLWdhdGV3YXktY2FyZC1leHBpcnknLFxuICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogdGhpcy5kZWZhdWx0Q29uZmlnLmhvc3RlZF9maWVsZHMubGFiZWxzLm1tX3l5LFxuICAgICAgICA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rZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV2ZW50LmZpZWxkc1trZXldLmlzVmFsaWQ7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICB0aGlzLmZvcm1WYWxpZCA9IGZvcm1WYWxpZDtcblxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHNob3coYnV0dG9uU2VsZWN0b3IpO1xuXG4gICAgICAgICAgICBpZiAoZG9jdW1lbnQucXVlcnlTZWxlY3Rvcih3cmFwcGVyKS5nZXRBdHRyaWJ1dGUoJ2RhdGEtcHBjcC1zdWJzY3JpYmVkJykgIT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGJ1dHRvblNlbGVjdG9yKS5hZGRFdmVudExpc3RlbmVyKFxuICAgICAgICAgICAgICAgICAgICAnY2xpY2snLFxuICAgICAgICAgICAgICAgICAgICBldmVudCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3VibWl0KGNvbnRleHRDb25maWcpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3Iod3JhcHBlcikuc2V0QXR0cmlidXRlKCdkYXRhLXBwY3Atc3Vic2NyaWJlZCcsIHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcGF5bWVudF9tZXRob2RfcHBjcC1jcmVkaXQtY2FyZC1nYXRld2F5JykuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgICAgICdjbGljaycsXG4gICAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3Rvcignb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saW5nX2xhc3RfbmFtZScpLnZhbHVlIDogJyc7XG5cbiAgICAgICAgICAgICAgICBpZiAoIWZpcnN0TmFtZSB8fCAhbGFzdE5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGlubmVyLnVuYmxvY2soKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5lcnJvckhhbmRsZXIubWVzc2FnZSh0aGlzLmRlZmF1bHRDb25maWcuaG9zdGVkX2ZpZWxkcy5sYWJlbHMuY2FyZGhvbGRlcl9uYW1lX3JlcXVpcmVkKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGhvc3RlZEZpZWxkc0RhdGEuY2FyZGhvbGRlck5hbWUgPSBmaXJzdE5hbWUgKyAnICcgKyBsYXN0TmFtZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5jdXJyZW50SG9zdGVkRmllbGRzSW5zdGFuY2Uuc3VibWl0KGhvc3RlZEZpZWxkc0RhdGEpLnRoZW4oKHBheWxvYWQpID0+IHtcbiAgICAgICAgICAgICAgICBwYXlsb2FkLm9yZGVySUQgPSBwYXlsb2FkLm9yZGVySWQ7XG4gICAgICAgICAgICAgICAgdGhpcy5zcGlubmVyLnVuYmxvY2soKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29udGV4dENvbmZpZy5vbkFwcHJvdmUocGF5bG9hZCk7XG4gICAgICAgICAgICB9KS5jYXRjaChlcnIgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuc3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5lcnJvckhhbmRsZXIuY2xlYXIoKTtcblxuICAgICAgICAgICAgICAgIGlmIChlcnIuZGV0YWlscykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVycm9ySGFuZGxlci5tZXNzYWdlKGVyci5kZXRhaWxzLm1hcChkID0+IGAke2QuaXNzd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AgICAgICAgICBiYWNrZ3JvdW5kOiAnI2ZmZicsXG4gICAgICAgICAgICAgICAgb3BhY2l0eTogMC42XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHVuYmxvY2soKSB7XG5cbiAgICAgICAgalF1ZXJ5KCB0aGlzLnRhcmdldCApLnVuYmxvY2soKTtcbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFNwaW5uZXI7XG4iLCJpbXBvcnQge1BheW1lbnRNZXRob2RzfSBmcm9tIFwiLi4vSGVscGVyL0NoZWNrb3V0TWV0aG9kU3RhdGVcIjtcbmltcG9ydCBlcnJvckhhbmRsZXIgZnJvbSBcIi4uL0Vycm9ySGFuZGxlclwiO1xuXG5jbGFzcyBGcmVlVHJpYWxIYW5kbGVyIHtcbiAgICBjb25zdHJ1Y3RvcihcbiAgICAgICAgY29uZmlnLFxuICAgICAgICBzcGlubmVyLFxuICAgICAgICBlcnJvckhhbmRsZXJcbiAgICApIHtcbiAgICAgICAgdGhpcy5jb25maWcgPSBjb25maWc7XG4gICAgICAgIHRoaXMuc3Bpbm5lciA9IHNwaW5uZXI7XG4gICAgICAgIHRoaXMuZXJyb3JIYW5kbGVyID0gZXJyb3JIYW5kbGVyO1xuICAgIH1cblxuICAgIGhhbmRsZSgpXG4gICAge1xuICAgICAgICB0aGlzLnNwaW5uZXIuYmxvY2soKTtcblxuICAgICAgICBmZXRjaCh0aGlzLmNvbmZpZy5hamF4LnZhdWx0X3BheXBhbC5lbmRwb2ludCwge1xuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgbm9uY2U6IHRoaXMuY29uZmlnLmFqYXgudmF1bHRfcGF5cGFsLm5vbmNlLFxuICAgICAgICAgICAgICAgIHJldHVybl91cmw6IGxvY2F0aW9uLmhyZWZcbiAgICAgICAgICAgIH0pLFxuICAgICAgICB9KS50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aWYgKGNvbnRleHQgPT09ICdtaW5pLWNhcnQnIHx8IGNvbnRleHQgPT09ICdwcm9kdWN0Jykge1xuICAgICAgICBpZiAoUGF5UGFsQ29tbWVyY2VHYXRld2F5Lm1pbmlfY2FydF9idXR0b25zX2VuYWJsZWQgPT09ICcxJykge1xuICAgICAgICAgICAgY29uc3QgbWluaUNhcnRCb290c3RyYXAgPSBuZXcgTWluaUNhcnRCb290c3RhcChcbiAgICAgICAgICAgICAgICBQYXlQYWxDb21tZXJjZUdhdGV3YXksXG4gICAgICAgICAgICAgICAgcmVuZGVyZXJcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgIG1pbmlDYXJ0Qm9vdHN0cmFwLmluaXQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChjb250ZXh0ID09PSAncHJvZHVjdCcgJiYgUGF5UGFsQ29tbWVyY2VHYXRld2F5LnNpbmdsZV9wcm9kdWN0X2J1dHRvbnNfZW5hYmxlZCA9PT0gJzEnKSB7XG4gICAgICAgIGNvbnN0IHNpbmdsZVByb2R1Y3RCb290c3RyYXAgPSBuZXcgU2luZ2xlUHJvZHVjdEJvb3RzdGFwKFxuICAgICAgICAgICAgUGF5UGFsQ29tbWVyY2VHYXRld2F5LFxuICAgICAgICAgICAgcmVuZGVyZXIsXG4gICAgICAgICAgICBtZXNzYWdlUmVuZGVyZXIsXG4gICAgICAgICk7XG5cbiAgICAgICAgc2luZ2xlUHJvZHVjdEJvb3RzdHJhcC5pbml0KCk7XG4gICAgfVxuXG4gICAgaWYgKGNvbnRleHQgPT09ICdjYXJ0Jykge1xuICAgICAgICBjb25zdCBjYXJ0Qm9vdHN0cmFwID0gbmV3IENhcnRCb290c3RyYXAoXG4gICAgICAgICAgICBQYXlQYWxDb21tZXJjZUdhdGV3YXksXG4gICAgICAgICAgICByZW5kZXJlcixcbiAgICAgICAgKTtcblxuICAgICAgICBjYXJ0Qm9vdHN0cmFwLmluaXQoKTtcbiAgICB9XG5cbiAgICBpZiAoY29udGV4dCA9PT0gJ2NoZWNrb3V0Jykge1xuICAgICAgICBjb25zdCBjaGVja291dEJvb3RzdGFwID0gbmV3IENoZWNrb3V0Qm9vdHN0YXAoXG4gICAgICAgICAgICBQYXlQYWxDb21tZXJjZUdhdGV3YXksXG4gICAgICAgICAgICByZW5kZXJlcixcbiAgICAgICAgICAgIG1lc3NhZ2VSZW5kZXJlcixcbiAgICAgICAgICAgIHNwaW5uZXJcbiAgICAgICAgKTtcblxuICAgICAgICBjaGVja291dEJvb3RzdGFwLmluaXQoKTtcbiAgICB9XG5cbiAgICBpZiAoY29udGV4dCA9PT0gJ3BheS1ub3cnICkge1xuICAgICAgICBjb25zdCBwYXlOb3dCb290c3RyYXAgPSBuZXcgUGF5Tm93Qm9vdHN0cmFwKFxuICAgICAgICAgICAgUGF5UGFsQ29tbWVyY2VHYXRld2F5LFxuICAgICAgICAgICAgcmVuZGVyZXIsXG4gICAgICAgICAgICBtZXNzYWdlUmVuZGVyZXIsXG4gICAgICAgICAgICBzcGlubmVyXG4gICAgICAgICk7XG4gICAgICAgIHBheU5vd0Jvb3RzdHJhcC5pbml0KCk7XG4gICAgfVxuXG4gICAgaWYgKGNvbnRleHQgIT09ICdjaGVja291dCcpIHtcbiAgICAgICAgbWVzc2FnZVJlbmRlcmVyLnJlbmRlcigpO1xuICAgIH1cbn07XG5kb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKFxuICAgICdET01Db250ZW50TG9hZGVkJyxcbiAgICAoKSA9PiB7XG4gICAgICAgIGlmICghdHlwZW9mIChQYXlQYWxDb21tZXJjZUdhdGV3YXkpKSB7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKCdQYXlQYWwgYnV0dG9uIGNvdWxkIG5vdCBiZSBjb25maWd1cmVkLicpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKFxuICAgICAgICAgICAgUGF5UGFsQ29tbWVyY2VHYXRld2F5LmNvbnRleHQ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dGV3YXkuaXNfZnJlZV90cmlhbF9jYXJ0ICYmIFBheVBhbENvbW1lcmNlR2F0ZXdheS52YXVsdGVkX3BheXBhbF9lbWFpbCAhPT0gJycpXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRQYXltZW50TWV0aG9kID0gZ2V0Q3VycmVudFBheW1lbnRNZXRob2QoKTtcbiAgICAgICAgICAgIGNvbnN0IGlzUGF5cGFsID0gY3VycmVudFBheW1lbnRNZXRob2QgPT09IFBheW1lbnRNZXRob2RzLlBBWVBBTDtcbiAgICAgICAgICAgIGNvbnN0IGlzQ2FyZHMgPSBjdXJyZW50UGF5bWVudE1ldGhvZCA9PT0gUGF5bWVudE1ldGhvZHMuQ0FSRFM7XG5cbiAgICAgICAgICAgIHNldFZpc2libGUoT1JERVJfQlVUVE9OX1NFTEVDVE9SLCAhaXNQYXlwYWwgJiYgIWlzQ2FyZHMsIHRydWUpO1xuXG4gICAgICAgICAgICBpZiAoaXNQYXlwYWwpIHtcbiAgICAgICAgICAgICAgICAvLyBzdG9wcGVkIGFmdGVyIHRoZSBmaXJzdCByZW5kZXJpbmcgb2YgdGhlIGJ1dHRvbnMsIGluIG9uSW5pdFxuICAgICAgICAgICAgICAgIGJ1dHRvbnNTcGlubmVyLmJsb2NrKCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGJ1dHRvbnNTcGlubmVyLnVuYmxvY2soKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGlzQ2FyZHMpIHtcbiAgICAgICAgICAgICAgICBjYXJkc1NwaW5uZXIuYmxvY2soKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY2FyZHNTcGlubmVyLnVuYmxvY2soKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGpRdWVyeSh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={};__webpack_modules__[536]()})();
1
+ (()=>{"use strict";var __webpack_modules__={536:()=>{eval("\n;// CONCATENATED MODULE: ./resources/js/modules/ErrorHandler.js\nclass ErrorHandler {\n constructor(genericErrorText) {\n this.genericErrorText = genericErrorText;\n this.wrapper = document.querySelector('.woocommerce-notices-wrapper');\n this.messagesList = document.querySelector('ul.woocommerce-error');\n }\n\n genericError() {\n if (this.wrapper.classList.contains('ppcp-persist')) {\n return;\n }\n\n this.clear();\n this.message(this.genericErrorText);\n }\n\n appendPreparedErrorMessageElement(errorMessageElement) {\n if (this.messagesList === null) {\n this.prepareMessagesList();\n }\n\n this.messagesList.replaceWith(errorMessageElement);\n }\n\n message(text, persist = false) {\n if (!typeof String || text.length === 0) {\n throw new Error('A new message text must be a non-empty string.');\n }\n\n if (this.messagesList === null) {\n this.prepareMessagesList();\n }\n\n if (persist) {\n this.wrapper.classList.add('ppcp-persist');\n } else {\n this.wrapper.classList.remove('ppcp-persist');\n }\n\n let messageNode = this.prepareMessagesListItem(text);\n this.messagesList.appendChild(messageNode);\n jQuery.scroll_to_notices(jQuery('.woocommerce-notices-wrapper'));\n }\n\n prepareMessagesList() {\n if (this.messagesList === null) {\n this.messagesList = document.createElement('ul');\n this.messagesList.setAttribute('class', 'woocommerce-error');\n this.messagesList.setAttribute('role', 'alert');\n this.wrapper.appendChild(this.messagesList);\n }\n }\n\n prepareMessagesListItem(message) {\n const li = document.createElement('li');\n li.innerHTML = message;\n return li;\n }\n\n sanitize(text) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = text;\n return textarea.value.replace('Error: ', '');\n }\n\n clear() {\n if (this.messagesList === null) {\n return;\n }\n\n this.messagesList.innerHTML = '';\n }\n\n}\n\n/* harmony default export */ const modules_ErrorHandler = (ErrorHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/OnApproveHandler/onApproveForContinue.js\nconst onApprove = (context, errorHandler) => {\n return (data, actions) => {\n return fetch(context.config.ajax.approve_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: context.config.ajax.approve_order.nonce,\n order_id: data.orderID,\n funding_source: window.ppcpFundingSource\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n if (!data.success) {\n errorHandler.genericError();\n return actions.restart().catch(err => {\n errorHandler.genericError();\n });\n }\n\n location.href = context.config.redirect;\n });\n };\n};\n\n/* harmony default export */ const onApproveForContinue = (onApprove);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/PayerData.js\nconst payerData = () => {\n const payer = PayPalCommerceGateway.payer;\n\n if (!payer) {\n return null;\n }\n\n const phone = document.querySelector('#billing_phone') || typeof payer.phone !== 'undefined' ? {\n phone_type: \"HOME\",\n phone_number: {\n national_number: document.querySelector('#billing_phone') ? document.querySelector('#billing_phone').value : payer.phone.phone_number.national_number\n }\n } : null;\n const payerData = {\n email_address: document.querySelector('#billing_email') ? document.querySelector('#billing_email').value : payer.email_address,\n name: {\n surname: document.querySelector('#billing_last_name') ? document.querySelector('#billing_last_name').value : payer.name.surname,\n given_name: document.querySelector('#billing_first_name') ? document.querySelector('#billing_first_name').value : payer.name.given_name\n },\n address: {\n country_code: document.querySelector('#billing_country') ? document.querySelector('#billing_country').value : payer.address.country_code,\n address_line_1: document.querySelector('#billing_address_1') ? document.querySelector('#billing_address_1').value : payer.address.address_line_1,\n address_line_2: document.querySelector('#billing_address_2') ? document.querySelector('#billing_address_2').value : payer.address.address_line_2,\n admin_area_1: document.querySelector('#billing_state') ? document.querySelector('#billing_state').value : payer.address.admin_area_1,\n admin_area_2: document.querySelector('#billing_city') ? document.querySelector('#billing_city').value : payer.address.admin_area_2,\n postal_code: document.querySelector('#billing_postcode') ? document.querySelector('#billing_postcode').value : payer.address.postal_code\n }\n };\n\n if (phone) {\n payerData.phone = phone;\n }\n\n return payerData;\n};\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/CheckoutMethodState.js\nconst PaymentMethods = {\n PAYPAL: 'ppcp-gateway',\n CARDS: 'ppcp-credit-card-gateway'\n};\nconst ORDER_BUTTON_SELECTOR = '#place_order';\nconst getCurrentPaymentMethod = () => {\n const el = document.querySelector('input[name=\"payment_method\"]:checked');\n\n if (!el) {\n return null;\n }\n\n return el.value;\n};\nconst isSavedCardSelected = () => {\n const savedCardList = document.querySelector('#saved-credit-card');\n return savedCardList && savedCardList.value !== '';\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/CartActionHandler.js\n\n\n\n\nclass CartActionHandler {\n constructor(config, errorHandler) {\n this.config = config;\n this.errorHandler = errorHandler;\n }\n\n configuration() {\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ? this.config.bn_codes[this.config.context] : '';\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n purchase_units: [],\n payment_method: PaymentMethods.PAYPAL,\n funding_source: window.ppcpFundingSource,\n bn_code: bnCode,\n payer,\n context: this.config.context\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n console.error(data);\n throw Error(data.data.message);\n }\n\n return data.data.id;\n });\n };\n\n return {\n createOrder,\n onApprove: onApproveForContinue(this, this.errorHandler),\n onError: error => {\n this.errorHandler.genericError();\n }\n };\n }\n\n}\n\n/* harmony default export */ const ActionHandler_CartActionHandler = (CartActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/MiniCartBootstap.js\n\n\n\nclass MiniCartBootstap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.actionHandler = null;\n }\n\n init() {\n this.actionHandler = new ActionHandler_CartActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.render();\n jQuery(document.body).on('wc_fragments_loaded wc_fragments_refreshed', () => {\n this.render();\n });\n }\n\n shouldRender() {\n return document.querySelector(this.gateway.button.mini_cart_wrapper) !== null || document.querySelector(this.gateway.hosted_fields.mini_cart_wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.renderer.render(this.gateway.button.mini_cart_wrapper, this.gateway.hosted_fields.mini_cart_wrapper, this.actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_MiniCartBootstap = (MiniCartBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/UpdateCart.js\n\n\nclass UpdateCart {\n constructor(endpoint, nonce) {\n this.endpoint = endpoint;\n this.nonce = nonce;\n }\n /**\n *\n * @param onResolve\n * @param {Product[]} products\n * @returns {Promise<unknown>}\n */\n\n\n update(onResolve, products) {\n return new Promise((resolve, reject) => {\n fetch(this.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.nonce,\n products\n })\n }).then(result => {\n return result.json();\n }).then(result => {\n if (!result.success) {\n reject(result.data);\n return;\n }\n\n const resolved = onResolve(result.data);\n resolve(resolved);\n });\n });\n }\n\n}\n\n/* harmony default export */ const Helper_UpdateCart = (UpdateCart);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/ButtonsToggleListener.js\n/**\n * When you can't add something to the cart, the PayPal buttons should not show.\n * Therefore we listen for changes on the add to cart button and show/hide the buttons accordingly.\n */\nclass ButtonsToggleListener {\n constructor(element, showCallback, hideCallback) {\n this.element = element;\n this.showCallback = showCallback;\n this.hideCallback = hideCallback;\n this.observer = null;\n }\n\n init() {\n const config = {\n attributes: true\n };\n\n const callback = () => {\n if (this.element.classList.contains('disabled')) {\n this.hideCallback();\n return;\n }\n\n this.showCallback();\n };\n\n this.observer = new MutationObserver(callback);\n this.observer.observe(this.element, config);\n callback();\n }\n\n disconnect() {\n this.observer.disconnect();\n }\n\n}\n\n/* harmony default export */ const Helper_ButtonsToggleListener = (ButtonsToggleListener);\n;// CONCATENATED MODULE: ./resources/js/modules/Entity/Product.js\nclass Product {\n constructor(id, quantity, variations) {\n this.id = id;\n this.quantity = quantity;\n this.variations = variations;\n }\n\n data() {\n return {\n id: this.id,\n quantity: this.quantity,\n variations: this.variations\n };\n }\n\n}\n\n/* harmony default export */ const Entity_Product = (Product);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/SingleProductActionHandler.js\n\n\n\n\n\n\nclass SingleProductActionHandler {\n constructor(config, updateCart, showButtonCallback, hideButtonCallback, formElement, errorHandler) {\n this.config = config;\n this.updateCart = updateCart;\n this.showButtonCallback = showButtonCallback;\n this.hideButtonCallback = hideButtonCallback;\n this.formElement = formElement;\n this.errorHandler = errorHandler;\n }\n\n configuration() {\n if (this.hasVariations()) {\n const observer = new Helper_ButtonsToggleListener(this.formElement.querySelector('.single_add_to_cart_button'), this.showButtonCallback, this.hideButtonCallback);\n observer.init();\n }\n\n return {\n createOrder: this.createOrder(),\n onApprove: onApproveForContinue(this, this.errorHandler),\n onError: error => {\n this.errorHandler.genericError();\n }\n };\n }\n\n createOrder() {\n var getProducts = null;\n\n if (!this.isGroupedProduct()) {\n getProducts = () => {\n const id = document.querySelector('[name=\"add-to-cart\"]').value;\n const qty = document.querySelector('[name=\"quantity\"]').value;\n const variations = this.variations();\n return [new Entity_Product(id, qty, variations)];\n };\n } else {\n getProducts = () => {\n const products = [];\n this.formElement.querySelectorAll('input[type=\"number\"]').forEach(element => {\n if (!element.value) {\n return;\n }\n\n const elementName = element.getAttribute('name').match(/quantity\\[([\\d]*)\\]/);\n\n if (elementName.length !== 2) {\n return;\n }\n\n const id = parseInt(elementName[1]);\n const quantity = parseInt(element.value);\n products.push(new Entity_Product(id, quantity, null));\n });\n return products;\n };\n }\n\n const createOrder = (data, actions) => {\n this.errorHandler.clear();\n\n const onResolve = purchase_units => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ? this.config.bn_codes[this.config.context] : '';\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n purchase_units,\n payer,\n bn_code: bnCode,\n payment_method: PaymentMethods.PAYPAL,\n funding_source: window.ppcpFundingSource,\n context: this.config.context\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n console.error(data);\n throw Error(data.data.message);\n }\n\n return data.data.id;\n });\n };\n\n const promise = this.updateCart.update(onResolve, getProducts());\n return promise;\n };\n\n return createOrder;\n }\n\n variations() {\n if (!this.hasVariations()) {\n return null;\n }\n\n const attributes = [...this.formElement.querySelectorAll(\"[name^='attribute_']\")].map(element => {\n return {\n value: element.value,\n name: element.name\n };\n });\n return attributes;\n }\n\n hasVariations() {\n return this.formElement.classList.contains('variations_form');\n }\n\n isGroupedProduct() {\n return this.formElement.classList.contains('grouped_form');\n }\n\n}\n\n/* harmony default export */ const ActionHandler_SingleProductActionHandler = (SingleProductActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/SingleProductBootstap.js\n\n\n\n\nclass SingleProductBootstap {\n constructor(gateway, renderer, messages) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n }\n\n handleChange() {\n if (!this.shouldRender()) {\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n this.renderer.hideButtons(this.gateway.button.wrapper);\n return;\n }\n\n this.render();\n }\n\n init() {\n document.querySelector('form.cart').addEventListener('change', this.handleChange.bind(this));\n\n if (!this.shouldRender()) {\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n return;\n }\n\n this.render();\n }\n\n shouldRender() {\n return document.querySelector('form.cart') !== null && !this.priceAmountIsZero();\n }\n\n priceAmountIsZero() {\n let priceText = \"0\";\n\n if (document.querySelector('form.cart ins .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart ins .woocommerce-Price-amount').innerText;\n } else if (document.querySelector('form.cart .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;\n } else if (document.querySelector('.product .woocommerce-Price-amount')) {\n priceText = document.querySelector('.product .woocommerce-Price-amount').innerText;\n }\n\n const amount = parseFloat(priceText.replace(/([^\\d,\\.\\s]*)/g, ''));\n return amount === 0;\n }\n\n render() {\n const actionHandler = new ActionHandler_SingleProductActionHandler(this.gateway, new Helper_UpdateCart(this.gateway.ajax.change_cart.endpoint, this.gateway.ajax.change_cart.nonce), () => {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper);\n let priceText = \"0\";\n\n if (document.querySelector('form.cart ins .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart ins .woocommerce-Price-amount').innerText;\n } else if (document.querySelector('form.cart .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;\n }\n\n const amount = parseInt(priceText.replace(/([^\\d,\\.\\s]*)/g, ''));\n this.messages.renderWithAmount(amount);\n }, () => {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n }, document.querySelector('form.cart'), new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_SingleProductBootstap = (SingleProductBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/CartBootstap.js\n\n\n\nclass CartBootstrap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n }\n\n init() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.render();\n jQuery(document.body).on('updated_cart_totals updated_checkout', () => {\n this.render();\n });\n }\n\n shouldRender() {\n return document.querySelector(this.gateway.button.wrapper) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n const actionHandler = new ActionHandler_CartActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const CartBootstap = (CartBootstrap);\n;// CONCATENATED MODULE: ./resources/js/modules/OnApproveHandler/onApproveForPayNow.js\nconst onApproveForPayNow_onApprove = (context, errorHandler, spinner) => {\n return (data, actions) => {\n spinner.block();\n errorHandler.clear();\n return fetch(context.config.ajax.approve_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: context.config.ajax.approve_order.nonce,\n order_id: data.orderID,\n funding_source: window.ppcpFundingSource\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n spinner.unblock();\n\n if (!data.success) {\n if (data.data.code === 100) {\n errorHandler.message(data.data.message);\n } else {\n errorHandler.genericError();\n }\n\n if (typeof actions !== 'undefined' && typeof actions.restart !== 'undefined') {\n return actions.restart();\n }\n\n throw new Error(data.data.message);\n }\n\n document.querySelector('#place_order').click();\n });\n };\n};\n\n/* harmony default export */ const onApproveForPayNow = (onApproveForPayNow_onApprove);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/CheckoutActionHandler.js\n\n\n\n\nclass CheckoutActionHandler {\n constructor(config, errorHandler, spinner) {\n this.config = config;\n this.errorHandler = errorHandler;\n this.spinner = spinner;\n }\n\n configuration() {\n const spinner = this.spinner;\n\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ? this.config.bn_codes[this.config.context] : '';\n const errorHandler = this.errorHandler;\n const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review';\n const formValues = jQuery(formSelector).serialize();\n const createaccount = jQuery('#createaccount').is(\":checked\") ? true : false;\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n payer,\n bn_code: bnCode,\n context: this.config.context,\n order_id: this.config.order_id,\n payment_method: getCurrentPaymentMethod(),\n funding_source: window.ppcpFundingSource,\n form: formValues,\n createaccount: createaccount\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n spinner.unblock(); //handle both messages sent from Woocommerce (data.messages) and this plugin (data.data.message)\n\n if (typeof data.messages !== 'undefined') {\n const domParser = new DOMParser();\n errorHandler.appendPreparedErrorMessageElement(domParser.parseFromString(data.messages, 'text/html').querySelector('ul'));\n } else {\n errorHandler.clear();\n\n if (data.data.details.length > 0) {\n errorHandler.message(data.data.details.map(d => `${d.issue} ${d.description}`).join('<br/>'), true);\n } else {\n errorHandler.message(data.data.message, true);\n }\n }\n\n return;\n }\n\n const input = document.createElement('input');\n input.setAttribute('type', 'hidden');\n input.setAttribute('name', 'ppcp-resume-order');\n input.setAttribute('value', data.data.purchase_units[0].custom_id);\n document.querySelector(formSelector).append(input);\n return data.data.id;\n });\n };\n\n return {\n createOrder,\n onApprove: onApproveForPayNow(this, this.errorHandler, this.spinner),\n onCancel: () => {\n spinner.unblock();\n },\n onError: () => {\n this.errorHandler.genericError();\n spinner.unblock();\n }\n };\n }\n\n}\n\n/* harmony default export */ const ActionHandler_CheckoutActionHandler = (CheckoutActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Hiding.js\nconst getElement = selectorOrElement => {\n if (typeof selectorOrElement === 'string') {\n return document.querySelector(selectorOrElement);\n }\n\n return selectorOrElement;\n};\n\nconst isVisible = element => {\n return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n};\nconst setVisible = (selectorOrElement, show, important = false) => {\n const element = getElement(selectorOrElement);\n\n if (!element) {\n return;\n }\n\n const currentValue = element.style.getPropertyValue('display');\n\n if (!show) {\n if (currentValue === 'none') {\n return;\n }\n\n element.style.setProperty('display', 'none', important ? 'important' : '');\n } else {\n if (currentValue === 'none') {\n element.style.removeProperty('display');\n } // still not visible (if something else added display: none in CSS)\n\n\n if (!isVisible(element)) {\n element.style.setProperty('display', 'block');\n }\n }\n};\nconst hide = (selectorOrElement, important = false) => {\n setVisible(selectorOrElement, false, important);\n};\nconst show = selectorOrElement => {\n setVisible(selectorOrElement, true);\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/CheckoutBootstap.js\n\n\n\n\n\nclass CheckoutBootstap {\n constructor(gateway, renderer, messages, spinner) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n this.spinner = spinner;\n this.standardOrderButtonSelector = ORDER_BUTTON_SELECTOR;\n this.buttonChangeObserver = new MutationObserver(el => {\n this.updateUi();\n });\n }\n\n init() {\n this.render(); // Unselect saved card.\n // WC saves form values, so with our current UI it would be a bit weird\n // if the user paid with saved, then after some time tries to pay again,\n // but wants to enter a new card, and to do that they have to choose “Select payment” in the list.\n\n jQuery('#saved-credit-card').val(jQuery('#saved-credit-card option:first').val());\n jQuery(document.body).on('updated_checkout', () => {\n this.render();\n });\n jQuery(document.body).on('updated_checkout payment_method_selected', () => {\n this.updateUi();\n });\n jQuery(document).on('hosted_fields_loaded', () => {\n jQuery('#saved-credit-card').on('change', () => {\n this.updateUi();\n });\n });\n this.updateUi();\n }\n\n shouldRender() {\n if (document.querySelector(this.gateway.button.cancel_wrapper)) {\n return false;\n }\n\n return document.querySelector(this.gateway.button.wrapper) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n if (document.querySelector(this.gateway.hosted_fields.wrapper + '>div')) {\n document.querySelector(this.gateway.hosted_fields.wrapper + '>div').setAttribute('style', '');\n }\n\n const actionHandler = new ActionHandler_CheckoutActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic), this.spinner);\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n this.buttonChangeObserver.observe(document.querySelector(this.standardOrderButtonSelector), {\n attributes: true\n });\n }\n\n updateUi() {\n const currentPaymentMethod = getCurrentPaymentMethod();\n const isPaypal = currentPaymentMethod === PaymentMethods.PAYPAL;\n const isCard = currentPaymentMethod === PaymentMethods.CARDS;\n const isSavedCard = isCard && isSavedCardSelected();\n const isNotOurGateway = !isPaypal && !isCard;\n const isFreeTrial = PayPalCommerceGateway.is_free_trial_cart;\n const hasVaultedPaypal = PayPalCommerceGateway.vaulted_paypal_email !== '';\n setVisible(this.standardOrderButtonSelector, isPaypal && isFreeTrial && hasVaultedPaypal || isNotOurGateway || isSavedCard, true);\n setVisible('.ppcp-vaulted-paypal-details', isPaypal);\n setVisible(this.gateway.button.wrapper, isPaypal && !(isFreeTrial && hasVaultedPaypal));\n setVisible(this.gateway.messages.wrapper, isPaypal && !isFreeTrial);\n setVisible(this.gateway.hosted_fields.wrapper, isCard && !isSavedCard);\n\n if (isPaypal && !isFreeTrial) {\n this.messages.render();\n }\n\n if (isCard) {\n if (isSavedCard) {\n this.disableCreditCardFields();\n } else {\n this.enableCreditCardFields();\n }\n }\n }\n\n disableCreditCardFields() {\n jQuery('label[for=\"ppcp-credit-card-gateway-card-number\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-number').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-expiry\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-expiry').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-cvc\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-cvc').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"vault\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').attr(\"disabled\", true);\n this.renderer.disableCreditCardFields();\n }\n\n enableCreditCardFields() {\n jQuery('label[for=\"ppcp-credit-card-gateway-card-number\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-number').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-expiry\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-expiry').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-cvc\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-cvc').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"vault\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').attr(\"disabled\", false);\n this.renderer.enableCreditCardFields();\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_CheckoutBootstap = (CheckoutBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Subscriptions.js\nconst isChangePaymentPage = () => {\n const urlParams = new URLSearchParams(window.location.search);\n return urlParams.has('change_payment_method');\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/PayNowBootstrap.js\n\n\n\nclass PayNowBootstrap extends ContextBootstrap_CheckoutBootstap {\n constructor(gateway, renderer, messages, spinner) {\n super(gateway, renderer, messages, spinner);\n }\n\n updateUi() {\n if (isChangePaymentPage()) {\n return;\n }\n\n super.updateUi();\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_PayNowBootstrap = (PayNowBootstrap);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/Renderer.js\nclass Renderer {\n constructor(creditCardRenderer, defaultConfig, onSmartButtonClick, onSmartButtonsInit) {\n this.defaultConfig = defaultConfig;\n this.creditCardRenderer = creditCardRenderer;\n this.onSmartButtonClick = onSmartButtonClick;\n this.onSmartButtonsInit = onSmartButtonsInit;\n }\n\n render(wrapper, hostedFieldsWrapper, contextConfig) {\n this.renderButtons(wrapper, contextConfig);\n this.creditCardRenderer.render(hostedFieldsWrapper, contextConfig);\n }\n\n renderButtons(wrapper, contextConfig) {\n if (!document.querySelector(wrapper) || this.isAlreadyRendered(wrapper) || 'undefined' === typeof paypal.Buttons) {\n return;\n }\n\n const style = wrapper === this.defaultConfig.button.wrapper ? this.defaultConfig.button.style : this.defaultConfig.button.mini_cart_style;\n paypal.Buttons({\n style,\n ...contextConfig,\n onClick: this.onSmartButtonClick,\n onInit: this.onSmartButtonsInit\n }).render(wrapper);\n }\n\n isAlreadyRendered(wrapper) {\n return document.querySelector(wrapper).hasChildNodes();\n }\n\n hideButtons(element) {\n const domElement = document.querySelector(element);\n\n if (!domElement) {\n return false;\n }\n\n domElement.style.display = 'none';\n return true;\n }\n\n showButtons(element) {\n const domElement = document.querySelector(element);\n\n if (!domElement) {\n return false;\n }\n\n domElement.style.display = 'block';\n return true;\n }\n\n disableCreditCardFields() {\n this.creditCardRenderer.disableFields();\n }\n\n enableCreditCardFields() {\n this.creditCardRenderer.enableFields();\n }\n\n}\n\n/* harmony default export */ const Renderer_Renderer = (Renderer);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/DccInputFactory.js\nconst dccInputFactory = original => {\n const styles = window.getComputedStyle(original);\n const newElement = document.createElement('span');\n newElement.setAttribute('id', original.id);\n Object.values(styles).forEach(prop => {\n if (!styles[prop] || !isNaN(prop)) {\n return;\n }\n\n newElement.style.setProperty(prop, '' + styles[prop]);\n });\n return newElement;\n};\n\n/* harmony default export */ const DccInputFactory = (dccInputFactory);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/CreditCardRenderer.js\n\n\n\nclass CreditCardRenderer {\n constructor(defaultConfig, errorHandler, spinner) {\n this.defaultConfig = defaultConfig;\n this.errorHandler = errorHandler;\n this.spinner = spinner;\n this.cardValid = false;\n this.formValid = false;\n this.currentHostedFieldsInstance = null;\n }\n\n render(wrapper, contextConfig) {\n if (this.defaultConfig.context !== 'checkout' && this.defaultConfig.context !== 'pay-now' || wrapper === null || document.querySelector(wrapper) === null) {\n return;\n }\n\n if (typeof paypal.HostedFields === 'undefined' || !paypal.HostedFields.isEligible()) {\n const wrapperElement = document.querySelector(wrapper);\n wrapperElement.parentNode.removeChild(wrapperElement);\n return;\n }\n\n const buttonSelector = wrapper + ' button';\n\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.teardown().catch(err => console.error(`Hosted fields teardown error: ${err}`));\n this.currentHostedFieldsInstance = null;\n }\n\n const gateWayBox = document.querySelector('.payment_box.payment_method_ppcp-credit-card-gateway');\n\n if (!gateWayBox) {\n return;\n }\n\n const oldDisplayStyle = gateWayBox.style.display;\n gateWayBox.style.display = 'block';\n const hideDccGateway = document.querySelector('#ppcp-hide-dcc');\n\n if (hideDccGateway) {\n hideDccGateway.parentNode.removeChild(hideDccGateway);\n }\n\n const cardNumberField = document.querySelector('#ppcp-credit-card-gateway-card-number');\n const stylesRaw = window.getComputedStyle(cardNumberField);\n let styles = {};\n Object.values(stylesRaw).forEach(prop => {\n if (!stylesRaw[prop]) {\n return;\n }\n\n styles[prop] = '' + stylesRaw[prop];\n });\n const cardNumber = DccInputFactory(cardNumberField);\n cardNumberField.parentNode.replaceChild(cardNumber, cardNumberField);\n const cardExpiryField = document.querySelector('#ppcp-credit-card-gateway-card-expiry');\n const cardExpiry = DccInputFactory(cardExpiryField);\n cardExpiryField.parentNode.replaceChild(cardExpiry, cardExpiryField);\n const cardCodeField = document.querySelector('#ppcp-credit-card-gateway-card-cvc');\n const cardCode = DccInputFactory(cardCodeField);\n cardCodeField.parentNode.replaceChild(cardCode, cardCodeField);\n gateWayBox.style.display = oldDisplayStyle;\n const formWrapper = '.payment_box payment_method_ppcp-credit-card-gateway';\n\n if (this.defaultConfig.enforce_vault && document.querySelector(formWrapper + ' .ppcp-credit-card-vault')) {\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').checked = true;\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').setAttribute('disabled', true);\n }\n\n paypal.HostedFields.render({\n createOrder: contextConfig.createOrder,\n styles: {\n 'input': styles\n },\n fields: {\n number: {\n selector: '#ppcp-credit-card-gateway-card-number',\n placeholder: this.defaultConfig.hosted_fields.labels.credit_card_number\n },\n cvv: {\n selector: '#ppcp-credit-card-gateway-card-cvc',\n placeholder: this.defaultConfig.hosted_fields.labels.cvv\n },\n expirationDate: {\n selector: '#ppcp-credit-card-gateway-card-expiry',\n placeholder: this.defaultConfig.hosted_fields.labels.mm_yy\n }\n }\n }).then(hostedFields => {\n document.dispatchEvent(new CustomEvent(\"hosted_fields_loaded\"));\n this.currentHostedFieldsInstance = hostedFields;\n hostedFields.on('inputSubmitRequest', () => {\n this._submit(contextConfig);\n });\n hostedFields.on('cardTypeChange', event => {\n if (!event.cards.length) {\n this.cardValid = false;\n return;\n }\n\n const validCards = this.defaultConfig.hosted_fields.valid_cards;\n this.cardValid = validCards.indexOf(event.cards[0].type) !== -1;\n });\n hostedFields.on('validityChange', event => {\n const formValid = Object.keys(event.fields).every(function (key) {\n return event.fields[key].isValid;\n });\n this.formValid = formValid;\n });\n show(buttonSelector);\n\n if (document.querySelector(wrapper).getAttribute('data-ppcp-subscribed') !== true) {\n document.querySelector(buttonSelector).addEventListener('click', event => {\n event.preventDefault();\n\n this._submit(contextConfig);\n });\n document.querySelector(wrapper).setAttribute('data-ppcp-subscribed', true);\n }\n });\n document.querySelector('#payment_method_ppcp-credit-card-gateway').addEventListener('click', () => {\n document.querySelector('label[for=ppcp-credit-card-gateway-card-number]').click();\n });\n }\n\n disableFields() {\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.setAttribute({\n field: 'number',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.setAttribute({\n field: 'cvv',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.setAttribute({\n field: 'expirationDate',\n attribute: 'disabled'\n });\n }\n }\n\n enableFields() {\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'number',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'cvv',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'expirationDate',\n attribute: 'disabled'\n });\n }\n }\n\n _submit(contextConfig) {\n this.spinner.block();\n this.errorHandler.clear();\n\n if (this.formValid && this.cardValid) {\n const save_card = this.defaultConfig.can_save_vault_token ? true : false;\n let vault = document.getElementById('ppcp-credit-card-vault') ? document.getElementById('ppcp-credit-card-vault').checked : save_card;\n\n if (this.defaultConfig.enforce_vault) {\n vault = true;\n }\n\n const contingency = this.defaultConfig.hosted_fields.contingency;\n const hostedFieldsData = {\n vault: vault\n };\n\n if (contingency !== 'NO_3D_SECURE') {\n hostedFieldsData.contingencies = [contingency];\n }\n\n if (this.defaultConfig.payer) {\n hostedFieldsData.cardholderName = this.defaultConfig.payer.name.given_name + ' ' + this.defaultConfig.payer.name.surname;\n }\n\n if (!hostedFieldsData.cardholderName) {\n const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value : '';\n const lastName = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value : '';\n hostedFieldsData.cardholderName = firstName + ' ' + lastName;\n }\n\n this.currentHostedFieldsInstance.submit(hostedFieldsData).then(payload => {\n payload.orderID = payload.orderId;\n this.spinner.unblock();\n return contextConfig.onApprove(payload);\n }).catch(err => {\n this.spinner.unblock();\n this.errorHandler.clear();\n\n if (err.details) {\n this.errorHandler.message(err.details.map(d => `${d.issue} ${d.description}`).join('<br/>'), true);\n }\n });\n } else {\n this.spinner.unblock();\n const message = !this.cardValid ? this.defaultConfig.hosted_fields.labels.card_not_supported : this.defaultConfig.hosted_fields.labels.fields_not_valid;\n this.errorHandler.message(message);\n }\n }\n\n}\n\n/* harmony default export */ const Renderer_CreditCardRenderer = (CreditCardRenderer);\n;// CONCATENATED MODULE: ./resources/js/modules/DataClientIdAttributeHandler.js\nconst storageKey = 'ppcp-data-client-id';\n\nconst validateToken = (token, user) => {\n if (!token) {\n return false;\n }\n\n if (token.user !== user) {\n return false;\n }\n\n const currentTime = new Date().getTime();\n const isExpired = currentTime >= token.expiration * 1000;\n return !isExpired;\n};\n\nconst storedTokenForUser = user => {\n const token = JSON.parse(sessionStorage.getItem(storageKey));\n\n if (validateToken(token, user)) {\n return token.token;\n }\n\n return null;\n};\n\nconst storeToken = token => {\n sessionStorage.setItem(storageKey, JSON.stringify(token));\n};\n\nconst dataClientIdAttributeHandler = (script, config) => {\n fetch(config.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: config.nonce\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n const isValid = validateToken(data, config.user);\n\n if (!isValid) {\n return;\n }\n\n storeToken(data);\n script.setAttribute('data-client-token', data.token);\n document.body.append(script);\n });\n};\n\n/* harmony default export */ const DataClientIdAttributeHandler = (dataClientIdAttributeHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/MessageRenderer.js\nclass MessageRenderer {\n constructor(config) {\n this.config = config;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n paypal.Messages({\n amount: this.config.amount,\n placement: this.config.placement,\n style: this.config.style\n }).render(this.config.wrapper);\n jQuery(document.body).on('updated_cart_totals', () => {\n paypal.Messages({\n amount: this.config.amount,\n placement: this.config.placement,\n style: this.config.style\n }).render(this.config.wrapper);\n });\n }\n\n renderWithAmount(amount) {\n if (!this.shouldRender()) {\n return;\n }\n\n const newWrapper = document.createElement('div');\n newWrapper.setAttribute('id', this.config.wrapper.replace('#', ''));\n const sibling = document.querySelector(this.config.wrapper).nextSibling;\n document.querySelector(this.config.wrapper).parentElement.removeChild(document.querySelector(this.config.wrapper));\n sibling.parentElement.insertBefore(newWrapper, sibling);\n paypal.Messages({\n amount,\n placement: this.config.placement,\n style: this.config.style\n }).render(this.config.wrapper);\n }\n\n shouldRender() {\n if (typeof paypal.Messages === 'undefined' || typeof this.config.wrapper === 'undefined') {\n return false;\n }\n\n if (!document.querySelector(this.config.wrapper)) {\n return false;\n }\n\n return true;\n }\n\n}\n\n/* harmony default export */ const Renderer_MessageRenderer = (MessageRenderer);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Spinner.js\nclass Spinner {\n constructor(target = 'form.woocommerce-checkout') {\n this.target = target;\n }\n\n setTarget(target) {\n this.target = target;\n }\n\n block() {\n jQuery(this.target).block({\n message: null,\n overlayCSS: {\n background: '#fff',\n opacity: 0.6\n }\n });\n }\n\n unblock() {\n jQuery(this.target).unblock();\n }\n\n}\n\n/* harmony default export */ const Helper_Spinner = (Spinner);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/FreeTrialHandler.js\n\n\n\nclass FreeTrialHandler {\n constructor(config, spinner, errorHandler) {\n this.config = config;\n this.spinner = spinner;\n this.errorHandler = errorHandler;\n }\n\n handle() {\n this.spinner.block();\n fetch(this.config.ajax.vault_paypal.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.vault_paypal.nonce,\n return_url: location.href\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n if (!data.success) {\n this.spinner.unblock();\n console.error(data);\n this.errorHandler.message(data.data.message);\n throw Error(data.data.message);\n }\n\n location.href = data.data.approve_link;\n }).catch(error => {\n this.spinner.unblock();\n console.error(error);\n this.errorHandler.genericError();\n });\n }\n\n}\n\n/* harmony default export */ const ActionHandler_FreeTrialHandler = (FreeTrialHandler);\n;// CONCATENATED MODULE: ./resources/js/button.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst buttonsSpinner = new Helper_Spinner('.ppc-button-wrapper');\nconst cardsSpinner = new Helper_Spinner('#ppcp-hosted-fields');\n\nconst bootstrap = () => {\n const errorHandler = new modules_ErrorHandler(PayPalCommerceGateway.labels.error.generic);\n const spinner = new Helper_Spinner();\n const creditCardRenderer = new Renderer_CreditCardRenderer(PayPalCommerceGateway, errorHandler, spinner);\n const freeTrialHandler = new ActionHandler_FreeTrialHandler(PayPalCommerceGateway, spinner, errorHandler);\n\n const onSmartButtonClick = (data, actions) => {\n window.ppcpFundingSource = data.fundingSource;\n const form = document.querySelector('form.woocommerce-checkout');\n\n if (form) {\n jQuery('#ppcp-funding-source-form-input').remove();\n form.insertAdjacentHTML('beforeend', `<input type=\"hidden\" name=\"ppcp-funding-source\" value=\"${data.fundingSource}\" id=\"ppcp-funding-source-form-input\">`);\n }\n\n const isFreeTrial = PayPalCommerceGateway.is_free_trial_cart;\n\n if (isFreeTrial && data.fundingSource !== 'card') {\n freeTrialHandler.handle();\n return actions.reject();\n }\n };\n\n const onSmartButtonsInit = () => {\n buttonsSpinner.unblock();\n };\n\n const renderer = new Renderer_Renderer(creditCardRenderer, PayPalCommerceGateway, onSmartButtonClick, onSmartButtonsInit);\n const messageRenderer = new Renderer_MessageRenderer(PayPalCommerceGateway.messages);\n const context = PayPalCommerceGateway.context;\n\n if (context === 'mini-cart' || context === 'product') {\n if (PayPalCommerceGateway.mini_cart_buttons_enabled === '1') {\n const miniCartBootstrap = new ContextBootstrap_MiniCartBootstap(PayPalCommerceGateway, renderer);\n miniCartBootstrap.init();\n }\n }\n\n if (context === 'product' && PayPalCommerceGateway.single_product_buttons_enabled === '1') {\n const singleProductBootstrap = new ContextBootstrap_SingleProductBootstap(PayPalCommerceGateway, renderer, messageRenderer);\n singleProductBootstrap.init();\n }\n\n if (context === 'cart') {\n const cartBootstrap = new CartBootstap(PayPalCommerceGateway, renderer);\n cartBootstrap.init();\n }\n\n if (context === 'checkout') {\n const checkoutBootstap = new ContextBootstrap_CheckoutBootstap(PayPalCommerceGateway, renderer, messageRenderer, spinner);\n checkoutBootstap.init();\n }\n\n if (context === 'pay-now') {\n const payNowBootstrap = new ContextBootstrap_PayNowBootstrap(PayPalCommerceGateway, renderer, messageRenderer, spinner);\n payNowBootstrap.init();\n }\n\n if (context !== 'checkout') {\n messageRenderer.render();\n }\n};\n\ndocument.addEventListener('DOMContentLoaded', () => {\n if (!typeof PayPalCommerceGateway) {\n console.error('PayPal button could not be configured.');\n return;\n }\n\n if (PayPalCommerceGateway.context !== 'checkout' && PayPalCommerceGateway.data_client_id.user === 0 && PayPalCommerceGateway.data_client_id.has_subscriptions) {\n return;\n } // Sometimes PayPal script takes long time to load,\n // so we additionally hide the standard order button here to avoid failed orders.\n // Normally it is hidden later after the script load.\n\n\n const hideOrderButtonIfPpcpGateway = () => {\n // only in checkout and pay now page, otherwise it may break things (e.g. payment via product page),\n // and also the loading spinner may look weird on other pages\n if (!['checkout', 'pay-now'].includes(PayPalCommerceGateway.context) || isChangePaymentPage() || PayPalCommerceGateway.is_free_trial_cart && PayPalCommerceGateway.vaulted_paypal_email !== '') {\n return;\n }\n\n const currentPaymentMethod = getCurrentPaymentMethod();\n const isPaypal = currentPaymentMethod === PaymentMethods.PAYPAL;\n const isCards = currentPaymentMethod === PaymentMethods.CARDS;\n setVisible(ORDER_BUTTON_SELECTOR, !isPaypal && !isCards, true);\n\n if (isPaypal) {\n // stopped after the first rendering of the buttons, in onInit\n buttonsSpinner.block();\n } else {\n buttonsSpinner.unblock();\n }\n\n if (isCards) {\n cardsSpinner.block();\n } else {\n cardsSpinner.unblock();\n }\n };\n\n jQuery(document).on('hosted_fields_loaded', () => {\n cardsSpinner.unblock();\n });\n let bootstrapped = false;\n hideOrderButtonIfPpcpGateway();\n jQuery(document.body).on('updated_checkout payment_method_selected', () => {\n if (bootstrapped) {\n return;\n }\n\n hideOrderButtonIfPpcpGateway();\n });\n const script = document.createElement('script');\n script.addEventListener('load', event => {\n bootstrapped = true;\n bootstrap();\n });\n script.setAttribute('src', PayPalCommerceGateway.button.url);\n Object.entries(PayPalCommerceGateway.script_attributes).forEach(keyValue => {\n script.setAttribute(keyValue[0], keyValue[1]);\n });\n\n if (PayPalCommerceGateway.data_client_id.set_attribute) {\n DataClientIdAttributeHandler(script, PayPalCommerceGateway.data_client_id);\n return;\n }\n\n document.body.append(script);\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTM2LmpzIiwibWFwcGluZ3MiOiI7O0FBQUEsTUFBTUEsWUFBTixDQUFtQjtBQUVmQyxFQUFBQSxXQUF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ChkYXRhLCBhY3Rpb25zKSA9PiB7XG4gICAgICAgIHJldHVybiBmZXRjaChjb250ZXh0LmNvbmZpZy5hamF4LmFwcHJvdmVfb3JkZXIuZW5kcG9pbnQsIHtcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgIG5vbmNlOiBjb250ZXh0LmNvbmZpZy5hamF4LmFwcHJvdmVfb3JkZXIubm9uY2UsXG4gICAgICAgICAgICAgICAgb3JkZXJfaWQ6ZGF0YS5vcmRlcklELFxuICAgICAgICAgICAgICAgIGZ1bmRpbmdfc291cmNlOiB3aW5kb3cucHBjcEZ1bmRpbmdTb3VyY2UsXG4gICAgICAgICAgICB9KVxuICAgICAgICB9KS50aGVuKChyZXMpPT57XG4gICAgICAgICAgICByZXR1cm4gcmVzLmpzb24oKTtcbiAgICAgICAgfSkudGhlbigoZGF0YSk9PntcbiAgICAgICAgICAgIGlmICghZGF0YS5zdWNjZXNzKSB7XG4gICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLmdlbmVyaWNFcnJvcigpO1xuICAgICAgICAgICAgICAgIHJldHVybiBhY3Rpb25zLnJlc3RhcnQoKS5jYXRjaChlcnIgPT4ge1xuICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIuZ2VuZXJpY0Vycm9yKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gY29udGV4dC5jb25maWcucmVkaXJlY3Q7XG4gICAgICAgIH0pO1xuXG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBvbkFwcHJvdmU7XG4iLCJleHBvcnQgY29uc3QgcGF5ZXJEYXRhID0gKCkgPT4ge1xuICAgIGNvbnN0IHBheWVyID0gUGF5UGFsQ29tbWVyY2VHYXRld2F5LnBheWVyO1xuICAgIGlmICghIHBheWVyKSB7XG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ICAgICAgICAgICAgICAgIHB1cmNoYXNlX3VuaXRzOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgcGF5bWVudF9tZXRob2Q6IFBheW1lbnRNZXRob2RzLlBBWVBBTCxcbiAgICAgICAgICAgICAgICAgICAgZnVuZGluZ19zb3VyY2U6IHdpbmRvdy5wcGNwRnVuZGluZ1NvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgYm5fY29kZTpibkNvZGUsXG4gICAgICAgICAgICAgICAgICAgIHBheWVyLFxuICAgICAgICAgICAgICAgICAgICBjb250ZXh0OnRoaXMuY29uZmlnLmNvbnRleHRcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24ocmVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlcy5qc29uKCk7XG4gICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uKGRhdGEpIHtcbiAgICAgICAgICAgICAgICBpZiAoIWRhdGEuc3VjY2Vzcykge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcihkYXRhLmRhdGEubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBkYXRhLmRhdGEuaWQ7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY3JlYXRlT3JkZXIsXG4gICAgICAgICAgICBvbkFwcHJvdmU6IG9uQXBwcm92ZSh0aGlzLCB0aGlzLmVycm9ySGFuZGxlciksXG4gICAgICAgICAgICBvbkVycm9yOiAoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmVycm9ySGFuZGxlci5nZW5lcmljRXJyb3IoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IENhcnR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AgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9uY2U6IHRoaXMubm9uY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9kdWN0cyxcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApLnRoZW4oXG4gICAgICAgICAgICAgICAgKHJlc3VsdCkgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQuanNvbigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICkudGhlbigocmVzdWx0KSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKCEgcmVzdWx0LnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KHJlc3VsdC5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXNvbHZlZCA9IG9uUmVzb2x2ZShyZXN1bHQuZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzb2x2ZWQpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgIH0pO1xuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgVXBkYXRlQ2FydDsiLCIvKipcbiAqIFdoZW4geW91IGNhbid0IGFkZCBzb21ldGhpbmcgdG8gdGhlIGNhcnQsIHRoZSBQYXlQYWwgYnV0dG9ucyBzaG91bGQgbm90IHNob3cuXG4gKiBUaGVyZWZvcmUgd2UgbGlzdGVuIGZvciBjaGFuZ2VzIG9uIHRoZSBhZGQgdG8gY2FydCBidXR0b24gYW5kIHNob3cvaGlkZSB0aGUgYnV0dG9ucyBhY2NvcmRpbmdseS5cbiAqL1xuXG5jbGFzcyBCdXR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H1cblxuICAgIGNyZWF0ZU9yZGVyKClcbiAgICB7XG4gICAgICAgIHZhciBnZXRQcm9kdWN0cyA9IG51bGw7XG4gICAgICAgIGlmICghIHRoaXMuaXNHcm91cGVkUHJvZHVjdCgpICkge1xuICAgICAgICAgICAgZ2V0UHJvZHVjdHMgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgaWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdbbmFtZT1cImFkZC10by1jYXJ0XCJdJykudmFsdWU7XG4gICAgICAgICAgICAgICAgY29uc3QgcXR5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignW25hbWU9XCJxdWFudGl0eVwiXScpLnZhbHVlO1xuICAgICAgICAgICAgICAgIGNvbnN0IHZhcmlhdGlvbnMgPSB0aGlzLnZhcmlhdGlvbnMoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW25ldyBQcm9kdWN0KGlkLCBxdHksIHZhcmlhdGlvbnMpXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGdldFByb2R1Y3RzID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHByb2R1Y3RzID0gW107XG4gICAgICAgICAgICAgICAgdGhpcy5mb3JtRWxlbWVudC5xdWVyeVNlbGVjdG9yQWxsKCdpbnB1dFt0eXBlPVwibnVtYmVyXCJdJykuZm9yRWFjaCgoZWxlbWVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoISBlbGVtZW50LnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudE5hbWUgPSBlbGVtZW50LmdldEF0dHJpYnV0ZSgnbmFtZScpLm1hdGNoKC9xdWFudGl0eVxcWyhbXFxkXSopXFxdLyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50TmFtZS5sZW5ndGggIT09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBpZCA9IHBhcnNlSW50KGVsZW1lbnROYW1lWzFdKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcXVhbnRpdHkgPSBwYXJzZUludChlbGVtZW50LnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgcHJvZHVjdHMucHVzaChuZXcgUHJvZHVjdChpZCwgcXVhbnRpdHksIG51bGwpKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIHJldHVybiBwcm9kdWN0cztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjb25zdCBjcmVhdGVPcmRlciA9IChkYXRhLCBhY3Rpb25zKSA9PiB7XG4gICAgICAgICAgICB0aGlzLmVycm9ySGFuZGxlci5jbGVhcigpO1xuXG4gICAgICAgICAgICBjb25zdCBvblJlc29sdmUgPSAocHVyY2hhc2VfdW5pdHMpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXllciA9IHBheWVyRGF0YSgpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGJuQ29kZSA9IHR5cGVvZiB0aGlzLmNvbmZpZy5ibl9jb2Rlc1t0aGlzLmNvbmZpZy5jb250ZXh0XSAhPT0gJ3VuZGVmaW5lZCcgP1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbmZpZy5ibl9jb2Rlc1t0aGlzLmNvbmZpZy5jb250ZXh0XSA6ICcnO1xuICAgICAgICAgICAgICAgIHJldHVybiBmZXRjaCh0aGlzLmNvbmZpZy5hamF4LmNyZWF0ZV9vcmRlci5lbmRwb2ludCwge1xuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9uY2U6IHRoaXMuY29uZmlnLmFqYXguY3JlYXRlX29yZGVyLm5vbmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcHVyY2hhc2VfdW5pdHMsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXllcixcbiAgICAgICAgICAgICAgICAgICAgICAgIGJuX2NvZGU6Ym5Db2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGF5bWVudF9tZXRob2Q6IFBheW1lbnRNZXRob2RzLlBBWVBBTCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmRpbmdfc291cmNlOiB3aW5kb3cucHBjcEZ1bmRpbmdTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0OnRoaXMuY29uZmlnLmNvbnRleHRcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChyZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcy5qc29uKCk7XG4gICAgICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEuc3VjY2Vzcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IEVycm9yKGRhdGEuZGF0YS5tZXNzYWdlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGF0YS5kYXRhLmlkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgY29uc3QgcHJvbWlzZSA9IHRoaXMudXBkYXRlQ2FydC51cGRhdGUob25SZXNvbHZlLCBnZXRQcm9kdWN0cygpKTtcbiAgICAgICAgICAgIHJldHVybiBwcm9taXNlO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gY3Jl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iZWxzLmVycm9yLmdlbmVyaWMpLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMucmVuZGVyZXIucmVuZGVyKFxuICAgICAgICAgICAgdGhpcy5nYXRld2F5LmJ1dHRvbi53cmFwcGVyLFxuICAgICAgICAgICAgdGhpcy5nYXRld2F5Lmhvc3RlZF9maWVsZHMud3JhcHBlcixcbiAgICAgICAgICAgIGFjdGlvbkhhbmRsZXIuY29uZmlndXJhdGlvbigpLFxuICAgICAgICApO1xuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ2FydEJvb3RzdHJhcDtcbiIsImNvbnN0IG9uQXBwcm92ZSA9IChjb250ZXh0LCBlcnJvckhhbmRsZXIsIHNwaW5uZXIpID0+IHtcbiAgICByZXR1cm4gKGRhdGEsIGFjdGlvbnMpID0+IHtcbiAgICAgICAgc3Bpbm5lci5ibG9jaygpO1xuICAgICAgICBlcnJvckhhbmRsZXIuY2xlYXIoKTtcblxuICAgICAgICByZXR1cm4gZmV0Y2goY29udGV4dC5jb25maWcuYWpheC5hcHByb3ZlX29yZGVyLmVuZHBvaW50LCB7XG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICBub25jZTogY29udGV4dC5jb25maWcuYWpheC5hcHByb3ZlX29yZGVyLm5vbmNlLFxuICAgICAgICAgICAgICAgIG9yZGVyX2lkOmRhdGEub3JkZXJJRCxcbiAgICAgICAgICAgICAgICBmdW5kaW5nX3NvdXJjZTogd2luZG93LnBwY3BGdW5kaW5nU291cmNlLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgfSkudGhlbigocmVzKT0+e1xuICAgICAgICAgICAgcmV0dXJuIHJlcy5qc29uKCk7XG4gICAgICAgIH0pLnRoZW4oKGRhdGEpPT57XG4gICAgICAgICAgICBzcGlubmVyLnVuYmxvY2soKTtcbiAgICAgICAgICAgIGlmICghZGF0YS5zd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QsIHtcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgIG5vbmNlOiB0aGlzLmNvbmZpZy5hamF4LmNyZWF0ZV9vcmRlci5ub25jZSxcbiAgICAgICAgICAgICAgICAgICAgcGF5ZXIsXG4gICAgICAgICAgICAgICAgICAgIGJuX2NvZGU6Ym5Db2RlLFxuICAgICAgICAgICAgICAgICAgICBjb250ZXh0OnRoaXMuY29uZmlnLmNvbnRleHQsXG4gICAgICAgICAgICAgICAgICAgIG9yZGVyX2lkOnRoaXMuY29uZmlnLm9yZGVyX2lkLFxuICAgICAgICAgICAgICAgICAgICBwYXltZW50X21ldGhvZDogZ2V0Q3VycmVudFBheW1lbnRNZXRob2QoKSxcbiAgICAgICAgICAgICAgICAgICAgZnVuZGluZ19zb3VyY2U6IHdpbmRvdy5wcGNwRnVuZGluZ1NvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgZm9ybTpmb3JtVmFsdWVzLFxuICAgICAgICAgICAgICAgICAgICBjcmVhdGVhY2NvdW50OiBjcmVhdGVhY2NvdW50XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKHJlcykge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXMuanNvbigpO1xuICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICAgICAgICAgIGlmICghZGF0YS5zdWNjZXNzKSB7XG4gICAgICAgICAgICAgICAgICAgIHNwaW5uZXIudW5ibG9jaygpO1xuICAgICAgICAgICAgICAgICAgICAvL2hhbmRsZSBib3RoIG1lc3NhZ2VzIHNlbnQgZnJvbSBXb29jb21tZXJjZSAoZGF0YS5tZXNzYWdlcykgYW5kIHRoaXMgcGx1Z2luIChkYXRhLmRhdGEubWVzc2FnZSlcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZihkYXRhLm1lc3NhZ2VzKSAhPT0gJ3VuZGVmaW5lZCcgKVxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBkb21QYXJzZXIgPSBuZXcgRE9NUGFyc2VyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIuYXBwZW5kUHJlcGFyZWRFcnJvck1lc3NhZ2VFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbVBhcnNlci5wYXJzZUZyb21TdHJpbmcoZGF0YS5tZXNzYWdlcywgJ3RleHQvaHRtbCcpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5xdWVyeVNlbGVjdG9yKCd1bCcpXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLmNsZWFyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5kYXRhLmRldGFpbHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9ySGFuZGxlci5tZXNzYWdlKGRhdGEuZGF0YS5kZXRhaWxzLm1hcChkID0+IGAke2QuaXNzdWV9ICR7ZC5kZXNjcmlwdGlvbn1gKS5qb2luKCc8YnIvPicpLCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLm1lc3NhZ2UoZGF0YS5kYXRhLm1lc3NhZ2UsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBpbnB1dCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2lucHV0Jyk7XG4gICAgICAgICAgICAgICAgaW5wdXQuc2V0QXR0cmlidXRlKCd0eXBlJywgJ2hpZGRlbicpO1xuICAgICAgICAgICAgICAgIGlucHV0LnNldEF0dHJpYnV0ZSgnbmFtZScsICdwcGNwLXJlc3VtZS1vcmRlcicpO1xuICAgICAgICAgICAgICAgIGlucHV0LnNldEF0dHJpYnV0ZSgndmFsdWUnLCBkYXRhLmRhdGEucHVyY2hhc2VfdW5pdHNbMF0uY3VzdG9tX2lkKTtcbiAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGZvcm1TZWxlY3RvcikuYXBwZW5kKGlucHV0KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGF0YS5kYXRhLmlkO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNyZWF0ZU9yZGVyLFxuICAgICAgICAgICAgb25BcHByb3ZlOm9uQXBwcm92ZSh0aGlzLCB0aGlzLmVycm9ySGFuZGxlciwgdGhpcy5zcGlubmVyKSxcbiAgICAgICAgICAgIG9uQ2FuY2VsOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgc3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgb25FcnJvcjogKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuZXJyb3JIYW5kbGVyLmdlbmVyaWNFcnJvcigpO1xuICAgICAgICAgICAgICAgIHNwaW5uZXIudW5ibG9jaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBDaGVja291dEFjdGlvbkhhbmRsZXI7XG4iLCJjb25zdCBnZXRFbGVtZW50ID0gKHNlbGVjdG9yT3JFbGVtZW50KSA9PiB7XG4gICAgaWYgKHR5cGVvZiBzZWxlY3Rvck9yRWxlbWVud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pZWxkcy5vbignaW5wdXRTdWJtaXRSZXF1ZXN0JywgKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuX3N1Ym1pdChjb250ZXh0Q29uZmlnKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaG9zdGVkRmllbGRzLm9uKCdjYXJkVHlwZUNoYW5nZScsIChldmVudCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmICggISBldmVudC5jYXJkcy5sZW5ndGggKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2FyZFZhbGlkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgdmFsaWRDYXJkcyA9IHRoaXMuZGVmYXVsdENvbmZpZy5ob3N0ZWRfZmllbGRzLnZhbGlkX2NhcmRzO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FyZFZhbGlkID0gdmFsaWRDYXJkcy5pbmRleE9mKGV2ZW50LmNhcmRzWzBdLnR5cGUpICE9PSAtMTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICBob3N0ZWRGaWVsZHMub24oJ3ZhbGlkaXR5Q2hhbmdlJywgKGV2ZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgZm9ybVZhbGlkID0gT2JqZWN0LmtleXMoZXZlbnQuZmllbGRzKS5ldmVyeShmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBldmVudC5maWVsZHNba2V5XS5pc1ZhbGlkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgdGhpcy5mb3JtVmFsaWQgPSBmb3JtVmFsaWQ7XG5cbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBzaG93KGJ1dHRvblNlbGVjdG9yKTtcblxuICAgICAgICAgICAgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3Iod3JhcHBlcikuZ2V0QXR0cmlidXRlKCdkYXRhLXBwY3Atc3Vic2NyaWJlZCcpICE9PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcihidXR0b25TZWxlY3RvcikuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgICAgICAgICAgICAgJ2NsaWNrJyxcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3N1Ym1pdChjb250ZXh0Q29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKHdyYXBwZXIpLnNldEF0dHJpYnV0ZSgnZGF0YS1wcGNwLXN1YnNjcmliZWQnLCB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BheW1lbnRfbWV0aG9kX3BwY3AtY3JlZGl0LWNhcmQtZ2F0ZXdheScpLmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICAgICAnY2xpY2snLFxuICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ2xhYmVsW2Zvcj1wcGNwLWNyZWRpdC1jYXJkLWdhdGV3YXktY2FyZC1udW1iZXJdJykuY2xpY2soKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgKVxuICAgIH1cblxuICAgIGRpc2FibGVGaWVsZHMoKSB7XG4gICAgICAgIGlmICh0aGlzLmN1cnJlbnRIb3N0ZWRGaWVsZHNJbnN0YW5jZSkge1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50SG9zdGVkRmllbGRzSW5zdGFuY2Uuc2V0QXR0cmlidXRlKHtcbiAgICAgICAgICAgICAgICBmaWVsZDogJ251bWJlcicsXG4gICAgICAgICAgICAgICAgYXR0cmlidXRlOiAnZGlzYWJsZWQnXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgdGhpcy5jdXJyZW50SG9zdGVkRmllbGRzSW5zdGFuY2Uuc2V0QXR0cmlidXRlKHtcbiAgICAgICAgICAgICAgICBmaWVsZDogJ2N2dicsXG4gICAgICAgICAgICAgICAgYXR0cmlidXRlOiAnZGlzYWJsZWQnXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgdGhpcy5jdXJyZW50SG9zdGVkRmllbGRzSW5zdGFuY2Uuc2V0QXR0cmlidXRlKHtcbiAgICAgICAgICAgICAgICBmaWVsZDogJ2V4cGlyYXRpb25EYXRlJyxcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGU6ICdkaXNhYmxlZCdcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBlbmFibGVGaWVsZHMoKSB7XG4gICAgICAgIGlmICh0aGlzLmN1cnJlbnRIb3N0ZWRGaWVsZHNJbnN0YW5jZSkge1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50SG9zdGVkRmllbGRzSW5zdGFuY2UucmVtb3ZlQXR0cmlidXRlKHtcbiAgICAgICAgICAgICAgICBmaWVsZDogJ251bWJlcicsXG4gICAgICAgICAgICAgICAgYXR0cmlidXRlOiAnZGlzYWJsZWQnXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgdGhpcy5jdXJyZW50SG9zdGVkRmllbGRzSW5zdGFuY2UucmVtb3ZlQXR0cmlidXRlKHtcbiAgICAgICAgICAgICAgICBmaWVsZDogJ2N2dicsXG4gICAgICAgICAgICAgICAgYXR0cmlidXRlOiAnZGlzYWJsZWQnXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgdGhpcy5jdXJyZW50SG9zdGVkRmllbGRzSW5zdGFuY2UucmVtb3ZlQXR0cmlidXRlKHtcbiAgICAgICAgICAgICAgICBmaWVsZDogJ2V4cGlyYXRpb25EYXRlJyxcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGU6ICdkaXNhYmxlZCdcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBfc3VibWl0KGNvbnRleHRDb25maWcpIHtcbiAgICAgICAgdGhpcy5zcGlubmVyLmJsb2NrKCk7XG4gICAgICAgIHRoaXMuZXJyb3JIYW5kbGVyLmNsZWFyKCk7XG5cbiAgICAgICAgaWYgKHRoaXMuZm9ybVZhbGlkICYmIHRoaXMuY2FyZFZhbGlkKSB7XG4gICAgICAgICAgICBjb25zdCBzYXZlX2NhcmQgPSB0aGlzLmRlZmF1bHRDb25maWcuY2FuX3NhdmVfdmF1bHRfdG9rZW4gPyB0cnVlIDogZmFsc2U7XG4gICAgICAgICAgICBsZXQgdmF1bHQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgncHBjcC1jcmVkaXQtY2FyZC12YXVsdCcpID9cbiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgncHBjcC1jcmVkaXQtY2FyZC12YXVsdCcpLmNoZWNrZWQgOiBzYXZlX2NhcmQ7XG4gICAgICAgICAgICBpZiAodGhpcy5kZWZhdWx0Q29uZmlnLmVuZm9yY2VfdmF1bHQpIHtcbiAgICAgICAgICAgICAgICB2YXVsdCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCBjb250aW5nZW5jeSA9IHRoaXMuZGVmYXVsdENvbmZpZy5ob3N0ZWRfZmllbGRzLmNvbnRpbmdlbmN5O1xuICAgICAgICAgICAgY29uc3QgaG9zdGVkRmllbGRzRGF0YSA9IHtcbiAgICAgICAgICAgICAgICB2YXVsdDogdmF1bHRcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBpZiAoY29udGluZ2VuY3kgIT09ICdOT18zRF9TRUNVUkUnKSB7XG4gICAgICAgIC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hbGlkID0gdmFsaWRhdGVUb2tlbihkYXRhLCBjb25maWcudXNlcik7XG4gICAgICAgIGlmICghaXNWYWxpZCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHN0b3JlVG9rZW4oZGF0YSk7XG4gICAgICAgIHNjcmlwdC5zZXRBdHRyaWJ1dGUoJ2RhdGEtY2xpZW50LXRva2VuJywgZGF0YS50b2tlbik7XG4gICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kKHNjcmlwdCk7XG4gICAgfSk7XG59XG5cbmV4cG9ydCBkZWZhdWx0IGRhdGFDbGllbnRJZEF0dHJpYnV0ZUhhbmRsZXI7XG4iLCJjbGFzcyBNZXNzYWdlUmVuZGVyZXIge1xuXG4gICAgY29uc3RydWN0b3IoY29uZmlnKSB7XG4gICAgICAgIHRoaXMuY29uZmlnID0gY29uZmlnO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgaWYgKCEgdGhpcy5zaG91bGRSZW5kZXIoKSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgcGF5cGFsLk1lc3NhZ2VzKHtcbiAgICAgICAgICAgIGFtb3VudDogdGhpcy5jb25maWcuYW1vdW50LFxuICAgICAgICAgICAgcGxhY2VtZW50OiB0aGlzLmNvbmZpZy5wbGFjZW1lbnQsXG4gICAgICAgICAgICBzdHlsZTogdGhpcy5jb25maWcuc3R5bGVcbiAgICAgICAgfSkucmVuZGVyKHRoaXMuY29uZmlnLndyYXBwZXIpO1xuXG4gICAgICAgIGpRdWVyeShkb2N1bWVudC5ib2R5KS5vbigndXBkYXRlZF9jYXJ0X3RvdGFscycsICgpID0+IHtcbiAgICAgICAgICAgIHBheXBhbC5NZXNzYWdlcyh7XG4gICAgICAgICAgICAgICAgYW1vdW50OiB0aGlzLmNvbmZpZy5hbW91bnQsXG4gICAgICAgICAgICAgICAgcGxhY2VtZW50OiB0aGlzLmNvbmZpZy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gZnJvbSBcIi4uL0hlbHBlci9DaGVja291dE1ldGhvZFN0YXRlXCI7XG5pbXBvcnQgZXJyb3JIYW5kbGVyIGZyb20gXCIuLi9FcnJvckhhbmRsZXJcIjtcblxuY2xhc3MgRnJlZVRyaWFsSGFuZGxlciB7XG4gICAgY29uc3RydWN0b3IoXG4gICAgICAgIGNvbmZpZyxcbiAgICAgICAgc3Bpbm5lcixcbiAgICAgICAgZXJyb3JIYW5kbGVyXG4gICAgKSB7XG4gICAgICAgIHRoaXMuY29uZmlnID0gY29uZmlnO1xuICAgICAgICB0aGlzLnNwaW5uZXIgPSBzcGlubmVyO1xuICAgICAgICB0aGlzLmVycm9ySGFuZGxlciA9IGVycm9ySGFuZGxlcjtcbiAgICB9XG5cbiAgICBoYW5kbGUoKVxuICAgIHtcbiAgICAgICAgdGhpcy5zcGlubmVyLmJsb2NrKCk7XG5cbiAgICAgICAgZmV0Y2godGhpcy5jb25maWcuYWpheC52YXVsdF9wYXlwYWwuZW5kcG9pbnQsIHtcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgIG5vbmNlOiB0aGlzLmNvbmZpZy5hamF4LnZhdWx0X3BheXBhbC5ub25jZSxcbiAgICAgICAgICAgICAgICByZXR1cm5fdXJsOiBsb2NhdGlvbi5ocmVmXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgfSkudGhlbihyZXMgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIHJlcy5qc29uKCk7XG4gICAgICAgIH0pLnRoZW4oZGF0YSA9PiB7XG4gICAgICAgICAgICBpZiAoIWRhdGEuc3VjY2Vzcykge1xuICAgICAgICAgICAgICAgIHRoaXMuc3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihkYXRhKTtcbiAgICAgICAgICAgICAgICB0aGlzLmVycm9ySGFuZGxlci5tZXNzY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uICAgICAgICAgICAgICAgIHJlbmRlcmVyXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBtaW5pQ2FydEJvb3RzdHJhcC5pbml0KCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoY29udGV4dCA9PT0gJ3Byb2R1Y3QnICYmIFBheVBhbENvbW1lcmNlR2F0ZXdheS5zaW5nbGVfcHJvZHVjdF9idXR0b25zX2VuYWJsZWQgPT09ICcxJykge1xuICAgICAgICBjb25zdCBzaW5nbGVQcm9kdWN0Qm9vdHN0cmFwID0gbmV3IFNpbmdsZVByb2R1Y3RCb290c3RhcChcbiAgICAgICAgICAgIFBheVBhbENvbW1lcmNlR2F0ZXdheSxcbiAgICAgICAgICAgIHJlbmRlcmVyLFxuICAgICAgICAgICAgbWVzc2FnZVJlbmRlcmVyLFxuICAgICAgICApO1xuXG4gICAgICAgIHNpbmdsZVByb2R1Y3RCb290c3RyYXAuaW5pdCgpO1xuICAgIH1cblxuICAgIGlmIChjb250ZXh0ID09PSAnY2FydCcpIHtcbiAgICAgICAgY29uc3QgY2FydEJvb3RzdHJhcCA9IG5ldyBDYXJ0Qm9vdHN0cmFwKFxuICAgICAgICAgICAgUGF5UGFsQ29tbWVyY2VHYXRld2F5LFxuICAgICAgICAgICAgcmVuZGVyZXIsXG4gICAgICAgICk7XG5cbiAgICAgICAgY2FydEJvb3RzdHJhcC5pbml0KCk7XG4gICAgfVxuXG4gICAgaWYgKGNvbnRleHQgPT09ICdjaGVja291dCcpIHtcbiAgICAgICAgY29uc3QgY2hlY2tvdXRCb290c3RhcCA9IG5ldyBDaGVja291dEJvb3RzdGFwKFxuICAgICAgICAgICAgUGF5UGFsQ29tbWVyY2VHYXRld2F5LFxuICAgICAgICAgICAgcmVuZGVyZXIsXG4gICAgICAgICAgICBtZXNzYWdlUmVuZGVyZXIsXG4gICAgICAgICAgICBzcGlubmVyXG4gICAgICAgICk7XG5cbiAgICAgICAgY2hlY2tvdXRCb290c3RhcC5pbml0KCk7XG4gICAgfVxuXG4gICAgaWYgKGNvbnRleHQgPT09ICdwYXktbm93JyApIHtcbiAgICAgICAgY29uc3QgcGF5Tm93Qm9vdHN0cmFwID0gbmV3IFBheU5vd0Jvb3RzdHJhcChcbiAgICAgICAgICAgIFBheVBhbENvbW1lcmNlR2F0ZXdheSxcbiAgICAgICAgICAgIHJlbmRlcmVyLFxuICAgICAgICAgICAgbWVzc2FnZVJlbmRlcmVyLFxuICAgICAgICAgICAgc3Bpbm5lclxuICAgICAgICApO1xuICAgICAgICBwYXlOb3dCb290c3RyYXAuaW5pdCgpO1xuICAgIH1cblxuICAgIGlmIChjb250ZXh0ICE9PSAnY2hlY2tvdXQnKSB7XG4gICAgICAgIG1lc3NhZ2VSZW5kZXJlci5yZW5kZXIoKTtcbiAgICB9XG59O1xuZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAnRE9NQ29udGVudExvYWRlZCcsXG4gICAgKCkgPT4ge1xuICAgICAgICBpZiAoIXR5cGVvZiAoUGF5UGFsQ29tbWVyY2VHYXRld2F5KSkge1xuICAgICAgICAgICAgY29uc29sZS5lcnJvcignUGF5UGFsIGJ1dHRvbiBjb3VsZCBub3QgYmUgY29uZmlndXJlZC4nKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChcbiAgICAgICAgICAgIFBheVBhbENvbW1lcmNlR2F0ZXdheS5jb250ZXh0ICE9PSAnY2hlY2tvdXQnXG4gICAgICAgICAgICAmJiBQYXlQYWxDb21tZXJjZUdhdGV3YXkuZGF0YV9jbGllbnRfaWQudXNlciA9PT0gMFxuICAgICAgICAgICAgJiYgUGF5UGFsQ29tbWVyY2VHYXRld2F5LmRhdGFfY2xpZW50X2lkLmhhc19zdWJzY3JpcHRpb25zXG4gICAgICAgICkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gU29tZXRpbWVzIFBheVBhbCBzY3J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BhbCA9IGN1cnJlbnRQYXltZW50TWV0aG9kID09PSBQYXltZW50TWV0aG9kcy5QQVlQQUw7XG4gICAgICAgICAgICBjb25zdCBpc0NhcmRzID0gY3VycmVudFBheW1lbnRNZXRob2QgPT09IFBheW1lbnRNZXRob2RzLkNBUkRTO1xuXG4gICAgICAgICAgICBzZXRWaXNpYmxlKE9SREVSX0JVVFRPTl9TRUxFQ1RPUiwgIWlzUGF5cGFsICYmICFpc0NhcmRzLCB0cnVlKTtcblxuICAgICAgICAgICAgaWYgKGlzUGF5cGFsKSB7XG4gICAgICAgICAgICAgICAgLy8gc3RvcHBlZCBhZnRlciB0aGUgZmlyc3QgcmVuZGVyaW5nIG9mIHRoZSBidXR0b25zLCBpbiBvbkluaXRcbiAgICAgICAgICAgICAgICBidXR0b25zU3Bpbm5lci5ibG9jaygpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBidXR0b25zU3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChpc0NhcmRzKSB7XG4gICAgICAgICAgICAgICAgY2FyZHNTcGlubmVyLmJsb2NrKCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNhcmRzU3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBqUXVlcnkoZG9jdW1lbnQpLm9uKCdob3N0ZWRfZmllbGRzX2xvYWRlZCcsICgpID0+IHtcbiAgICAgICAgICAgIGNhcmRzU3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGxldCBib290c3RyYXBwZWQgPSBmYWxzZTtcblxuICAgICAgICBoaWRlT3JkZXJCdXR0b25JZlBwY3BHYXRld2F5KCk7XG5cbiAgICAgICAgalF1ZXJ5KGRvY3VtZW50LmJvZHkpLm9uKCd1cGRhdGVkX2NoZWNrb3V0IHBheW1lbnRfbWV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RsZXIiLCJoYW5kbGUiLCJ2YXVsdF9wYXlwYWwiLCJyZXR1cm5fdXJsIiwiYXBwcm92ZV9saW5rIiwiYnV0dG9uc1NwaW5uZXIiLCJjYXJkc1NwaW5uZXIiLCJib290c3RyYXAiLCJmcmVlVHJpYWxIYW5kbGVyIiwiZnVuZGluZ1NvdXJjZSIsImluc2VydEFkamFjZW50SFRNTCIsIm1lc3NhZ2VSZW5kZXJlciIsIm1pbmlfY2FydF9idXR0b25zX2VuYWJsZWQiLCJtaW5pQ2FydEJvb3RzdHJhcCIsInNpbmdsZV9wcm9kdWN0X2J1dHRvbnNfZW5hYmxlZCIsInNpbmdsZVByb2R1Y3RCb290c3RyYXAiLCJjYXJ0Qm9vdHN0cmFwIiwiY2hlY2tvdXRCb290c3RhcCIsInBheU5vd0Jvb3RzdHJhcCIsImRhdGFfY2xpZW50X2lkIiwiaGFzX3N1YnNjcmlwdGlvbnMiLCJoaWRlT3JkZXJCdXR0b25JZlBwY3BHYXRld2F5IiwiaW5jbHVkZXMiLCJpc0NhcmRzIiwiYm9vdHN0cmFwcGVkIiwidXJsIiwiZW50cmllcyIsInNjcmlwdF9hdHRyaWJ1dGVzIiwia2V5VmFsdWUiLCJzZXRfYXR0cmlidXRlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///536\n")}},__webpack_exports__={};__webpack_modules__[536]()})();
modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js CHANGED
@@ -13,7 +13,6 @@ class CreditCardRenderer {
13
  }
14
 
15
  render(wrapper, contextConfig) {
16
-
17
  if (
18
  (
19
  this.defaultConfig.context !== 'checkout'
@@ -42,6 +41,9 @@ class CreditCardRenderer {
42
  }
43
 
44
  const gateWayBox = document.querySelector('.payment_box.payment_method_ppcp-credit-card-gateway');
 
 
 
45
  const oldDisplayStyle = gateWayBox.style.display;
46
  gateWayBox.style.display = 'block';
47
 
@@ -207,12 +209,6 @@ class CreditCardRenderer {
207
  const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value : '';
208
  const lastName = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value : '';
209
 
210
- if (!firstName || !lastName) {
211
- this.spinner.unblock();
212
- this.errorHandler.message(this.defaultConfig.hosted_fields.labels.cardholder_name_required);
213
- return;
214
- }
215
-
216
  hostedFieldsData.cardholderName = firstName + ' ' + lastName;
217
  }
218
 
13
  }
14
 
15
  render(wrapper, contextConfig) {
 
16
  if (
17
  (
18
  this.defaultConfig.context !== 'checkout'
41
  }
42
 
43
  const gateWayBox = document.querySelector('.payment_box.payment_method_ppcp-credit-card-gateway');
44
+ if(! gateWayBox) {
45
+ return
46
+ }
47
  const oldDisplayStyle = gateWayBox.style.display;
48
  gateWayBox.style.display = 'block';
49
 
209
  const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value : '';
210
  const lastName = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value : '';
211
 
 
 
 
 
 
 
212
  hostedFieldsData.cardholderName = firstName + ' ' + lastName;
213
  }
214
 
modules/ppcp-button/resources/js/modules/Renderer/MessageRenderer.js CHANGED
@@ -14,6 +14,14 @@ class MessageRenderer {
14
  placement: this.config.placement,
15
  style: this.config.style
16
  }).render(this.config.wrapper);
 
 
 
 
 
 
 
 
17
  }
18
 
19
  renderWithAmount(amount) {
@@ -46,4 +54,4 @@ class MessageRenderer {
46
  return true;
47
  }
48
  }
49
- export default MessageRenderer;
14
  placement: this.config.placement,
15
  style: this.config.style
16
  }).render(this.config.wrapper);
17
+
18
+ jQuery(document.body).on('updated_cart_totals', () => {
19
+ paypal.Messages({
20
+ amount: this.config.amount,
21
+ placement: this.config.placement,
22
+ style: this.config.style
23
+ }).render(this.config.wrapper);
24
+ });
25
  }
26
 
27
  renderWithAmount(amount) {
54
  return true;
55
  }
56
  }
57
+ export default MessageRenderer;
modules/ppcp-button/src/Assets/SmartButton.php CHANGED
@@ -11,6 +11,7 @@ namespace WooCommerce\PayPalCommerce\Button\Assets;
11
 
12
  use Exception;
13
  use Psr\Log\LoggerInterface;
 
14
  use WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentToken;
15
  use WooCommerce\PayPalCommerce\ApiClient\Factory\PayerFactory;
16
  use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
@@ -220,16 +221,15 @@ class SmartButton implements SmartButtonInterface {
220
  * @throws \WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException When a setting was not found.
221
  */
222
  public function render_wrapper(): bool {
223
-
224
- if ( ! $this->can_save_vault_token() && $this->has_subscriptions() ) {
225
- return false;
226
- }
227
-
228
  if ( $this->settings->has( 'enabled' ) && $this->settings->get( 'enabled' ) ) {
229
  $this->render_button_wrapper_registrar();
230
  $this->render_message_wrapper_registrar();
231
  }
232
 
 
 
 
 
233
  if (
234
  $this->settings->has( 'dcc_enabled' )
235
  && $this->settings->get( 'dcc_enabled' )
@@ -341,19 +341,17 @@ class SmartButton implements SmartButtonInterface {
341
 
342
  $not_enabled_on_cart = $this->settings->has( 'message_cart_enabled' ) &&
343
  ! $this->settings->get( 'message_cart_enabled' );
344
- if (
345
- is_cart()
346
- && ! $not_enabled_on_cart
347
- ) {
348
- add_action(
349
- $this->proceed_to_checkout_button_renderer_hook(),
350
- array(
351
- $this,
352
- 'message_renderer',
353
- ),
354
- 19
355
- );
356
- }
357
 
358
  $not_enabled_on_product_page = $this->settings->has( 'message_product_enabled' ) &&
359
  ! $this->settings->get( 'message_product_enabled' );
@@ -432,6 +430,10 @@ class SmartButton implements SmartButtonInterface {
432
  add_action(
433
  $this->mini_cart_button_renderer_hook(),
434
  function () {
 
 
 
 
435
  if ( $this->is_cart_price_total_zero() || $this->is_free_trial_cart() ) {
436
  return;
437
  }
@@ -445,28 +447,21 @@ class SmartButton implements SmartButtonInterface {
445
  );
446
  }
447
 
448
- if ( $this->is_cart_price_total_zero() && ! $this->is_free_trial_cart() ) {
449
- return false;
450
- }
451
 
452
  $not_enabled_on_cart = $this->settings->has( 'button_cart_enabled' ) &&
453
  ! $this->settings->get( 'button_cart_enabled' );
454
- if (
455
- is_cart()
456
- && ! $not_enabled_on_cart
457
- && ! $this->is_free_trial_cart()
458
- ) {
459
- add_action(
460
- $this->proceed_to_checkout_button_renderer_hook(),
461
- array(
462
- $this,
463
- 'button_renderer',
464
- ),
465
- 20
466
- );
467
- }
468
 
469
- add_action( $this->checkout_button_renderer_hook(), array( $this, 'button_renderer' ), 10 );
 
 
 
470
 
471
  return true;
472
  }
@@ -521,13 +516,16 @@ class SmartButton implements SmartButtonInterface {
521
  * Renders the HTML for the buttons.
522
  */
523
  public function button_renderer() {
 
 
 
 
 
524
  $product = wc_get_product();
 
525
  if (
526
- ! is_checkout() && is_a( $product, \WC_Product::class )
527
- && (
528
- $product->is_type( array( 'external', 'grouped' ) )
529
- || ! $product->is_in_stock()
530
- )
531
  ) {
532
 
533
  return;
@@ -548,6 +546,21 @@ class SmartButton implements SmartButtonInterface {
548
  * Renders the HTML for the credit messaging.
549
  */
550
  public function message_renderer() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
551
 
552
  echo '<div id="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
553
  }
@@ -568,7 +581,7 @@ class SmartButton implements SmartButtonInterface {
568
  }
569
  $placement = 'product';
570
  $product = wc_get_product();
571
- $amount = ( is_a( $product, \WC_Product::class ) ) ? wc_get_price_including_tax( $product ) : 0;
572
  $layout = $this->settings->has( 'message_product_layout' ) ?
573
  $this->settings->get( 'message_product_layout' ) : 'text';
574
  $logo_type = $this->settings->has( 'message_product_logo' ) ?
@@ -1221,10 +1234,29 @@ class SmartButton implements SmartButtonInterface {
1221
  * Check if cart product price total is 0.
1222
  *
1223
  * @return bool true if is 0, otherwise false.
 
1224
  */
1225
  protected function is_cart_price_total_zero(): bool {
1226
  // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
1227
- return WC()->cart->get_cart_contents_total() == 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1228
  }
1229
 
1230
  /**
11
 
12
  use Exception;
13
  use Psr\Log\LoggerInterface;
14
+ use WC_Product;
15
  use WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentToken;
16
  use WooCommerce\PayPalCommerce\ApiClient\Factory\PayerFactory;
17
  use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
221
  * @throws \WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException When a setting was not found.
222
  */
223
  public function render_wrapper(): bool {
 
 
 
 
 
224
  if ( $this->settings->has( 'enabled' ) && $this->settings->get( 'enabled' ) ) {
225
  $this->render_button_wrapper_registrar();
226
  $this->render_message_wrapper_registrar();
227
  }
228
 
229
+ if ( ! $this->can_save_vault_token() && $this->has_subscriptions() ) {
230
+ return false;
231
+ }
232
+
233
  if (
234
  $this->settings->has( 'dcc_enabled' )
235
  && $this->settings->get( 'dcc_enabled' )
341
 
342
  $not_enabled_on_cart = $this->settings->has( 'message_cart_enabled' ) &&
343
  ! $this->settings->get( 'message_cart_enabled' );
344
+
345
+ add_action(
346
+ $this->proceed_to_checkout_button_renderer_hook(),
347
+ function() use ( $not_enabled_on_cart ) {
348
+ if ( ! is_cart() || $not_enabled_on_cart ) {
349
+ return;
350
+ }
351
+ $this->message_renderer();
352
+ },
353
+ 19
354
+ );
 
 
355
 
356
  $not_enabled_on_product_page = $this->settings->has( 'message_product_enabled' ) &&
357
  ! $this->settings->get( 'message_product_enabled' );
430
  add_action(
431
  $this->mini_cart_button_renderer_hook(),
432
  function () {
433
+ if ( ! $this->can_save_vault_token() && $this->has_subscriptions() ) {
434
+ return;
435
+ }
436
+
437
  if ( $this->is_cart_price_total_zero() || $this->is_free_trial_cart() ) {
438
  return;
439
  }
447
  );
448
  }
449
 
450
+ add_action( $this->checkout_button_renderer_hook(), array( $this, 'button_renderer' ), 10 );
 
 
451
 
452
  $not_enabled_on_cart = $this->settings->has( 'button_cart_enabled' ) &&
453
  ! $this->settings->get( 'button_cart_enabled' );
454
+ add_action(
455
+ $this->proceed_to_checkout_button_renderer_hook(),
456
+ function() use ( $not_enabled_on_cart ) {
457
+ if ( ! is_cart() || $not_enabled_on_cart || $this->is_free_trial_cart() || $this->is_cart_price_total_zero() ) {
458
+ return;
459
+ }
 
 
 
 
 
 
 
 
460
 
461
+ $this->button_renderer();
462
+ },
463
+ 20
464
+ );
465
 
466
  return true;
467
  }
516
  * Renders the HTML for the buttons.
517
  */
518
  public function button_renderer() {
519
+
520
+ if ( ! $this->can_save_vault_token() && $this->has_subscriptions() ) {
521
+ return;
522
+ }
523
+
524
  $product = wc_get_product();
525
+
526
  if (
527
+ ! is_checkout() && is_a( $product, WC_Product::class )
528
+ && ! $this->product_supports_payment( $product )
 
 
 
529
  ) {
530
 
531
  return;
546
  * Renders the HTML for the credit messaging.
547
  */
548
  public function message_renderer() {
549
+ if ( ! $this->can_save_vault_token() && $this->has_subscriptions() ) {
550
+ return false;
551
+ }
552
+
553
+ $product = wc_get_product();
554
+
555
+ if (
556
+ ! is_checkout() && is_a( $product, WC_Product::class )
557
+ /**
558
+ * The filter returning true if PayPal buttons can be rendered, or false otherwise.
559
+ */
560
+ && ! $this->product_supports_payment( $product )
561
+ ) {
562
+ return;
563
+ }
564
 
565
  echo '<div id="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
566
  }
581
  }
582
  $placement = 'product';
583
  $product = wc_get_product();
584
+ $amount = ( is_a( $product, WC_Product::class ) ) ? wc_get_price_including_tax( $product ) : 0;
585
  $layout = $this->settings->has( 'message_product_layout' ) ?
586
  $this->settings->get( 'message_product_layout' ) : 'text';
587
  $logo_type = $this->settings->has( 'message_product_logo' ) ?
1234
  * Check if cart product price total is 0.
1235
  *
1236
  * @return bool true if is 0, otherwise false.
1237
+ * @psalm-suppress RedundantConditionGivenDocblockType
1238
  */
1239
  protected function is_cart_price_total_zero(): bool {
1240
  // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
1241
+ return WC()->cart && WC()->cart->get_total( 'numeric' ) == 0;
1242
+ }
1243
+
1244
+ /**
1245
+ * Checks if PayPal buttons/messages can be rendered for the given product.
1246
+ *
1247
+ * @param WC_Product $product The product.
1248
+ *
1249
+ * @return bool
1250
+ */
1251
+ protected function product_supports_payment( WC_Product $product ): bool {
1252
+ /**
1253
+ * The filter returning true if PayPal buttons/messages can be rendered for this product, or false otherwise.
1254
+ */
1255
+ return apply_filters(
1256
+ 'woocommerce_paypal_payments_product_supports_payment_request_button',
1257
+ ! $product->is_type( array( 'external', 'grouped' ) ) && $product->is_in_stock(),
1258
+ $product
1259
+ );
1260
  }
1261
 
1262
  /**
modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php CHANGED
@@ -11,6 +11,7 @@ namespace WooCommerce\PayPalCommerce\Button\Endpoint;
11
 
12
  use Exception;
13
  use Psr\Log\LoggerInterface;
 
14
  use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
15
  use WooCommerce\PayPalCommerce\ApiClient\Entity\Amount;
16
  use WooCommerce\PayPalCommerce\ApiClient\Entity\Money;
@@ -242,6 +243,13 @@ class CreateOrderEndpoint implements EndpointInterface {
242
  }
243
 
244
  $order = $this->create_paypal_order( $wc_order );
 
 
 
 
 
 
 
245
  wp_send_json_success( $order->to_array() );
246
  return true;
247
 
@@ -317,19 +325,51 @@ class CreateOrderEndpoint implements EndpointInterface {
317
  * @return Order Created PayPal order.
318
  *
319
  * @throws RuntimeException If create order request fails.
 
 
320
  */
321
  private function create_paypal_order( \WC_Order $wc_order = null ): Order {
322
  $needs_shipping = WC()->cart instanceof \WC_Cart && WC()->cart->needs_shipping();
323
  $shipping_address_is_fix = $needs_shipping && 'checkout' === $this->parsed_request_data['context'];
324
 
325
- return $this->api_endpoint->create(
326
- $this->purchase_units,
327
- $this->payer( $this->parsed_request_data, $wc_order ),
328
- null,
329
- $this->payment_method(),
330
- '',
331
- $shipping_address_is_fix
332
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  }
334
 
335
  /**
11
 
12
  use Exception;
13
  use Psr\Log\LoggerInterface;
14
+ use stdClass;
15
  use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
16
  use WooCommerce\PayPalCommerce\ApiClient\Entity\Amount;
17
  use WooCommerce\PayPalCommerce\ApiClient\Entity\Money;
243
  }
244
 
245
  $order = $this->create_paypal_order( $wc_order );
246
+
247
+ if ( 'pay-now' === $data['context'] && is_a( $wc_order, \WC_Order::class ) ) {
248
+ $wc_order->update_meta_data( PayPalGateway::ORDER_ID_META_KEY, $order->id() );
249
+ $wc_order->update_meta_data( PayPalGateway::INTENT_META_KEY, $order->intent() );
250
+ $wc_order->save_meta_data();
251
+ }
252
+
253
  wp_send_json_success( $order->to_array() );
254
  return true;
255
 
325
  * @return Order Created PayPal order.
326
  *
327
  * @throws RuntimeException If create order request fails.
328
+ * @throws PayPalApiException If create order request fails.
329
+ * phpcs:disable Squiz.Commenting.FunctionCommentThrowTag.WrongNumber
330
  */
331
  private function create_paypal_order( \WC_Order $wc_order = null ): Order {
332
  $needs_shipping = WC()->cart instanceof \WC_Cart && WC()->cart->needs_shipping();
333
  $shipping_address_is_fix = $needs_shipping && 'checkout' === $this->parsed_request_data['context'];
334
 
335
+ try {
336
+ return $this->api_endpoint->create(
337
+ $this->purchase_units,
338
+ $this->payer( $this->parsed_request_data, $wc_order ),
339
+ null,
340
+ $this->payment_method(),
341
+ '',
342
+ $shipping_address_is_fix
343
+ );
344
+ } catch ( PayPalApiException $exception ) {
345
+ // Looks like currently there is no proper way to validate the shipping address for PayPal,
346
+ // so we cannot make some invalid addresses null in PurchaseUnitFactory,
347
+ // which causes failure e.g. for guests using the button on products pages when the country does not have postal codes.
348
+ if ( 422 === $exception->status_code()
349
+ && array_filter(
350
+ $exception->details(),
351
+ function ( stdClass $detail ): bool {
352
+ return isset( $detail->field ) && str_contains( (string) $detail->field, 'shipping/address' );
353
+ }
354
+ ) ) {
355
+ $this->logger->info( 'Invalid shipping address for order creation, retrying without it.' );
356
+
357
+ foreach ( $this->purchase_units as $purchase_unit ) {
358
+ $purchase_unit->set_shipping( null );
359
+ }
360
+
361
+ return $this->api_endpoint->create(
362
+ $this->purchase_units,
363
+ $this->payer( $this->parsed_request_data, $wc_order ),
364
+ null,
365
+ $this->payment_method(),
366
+ '',
367
+ $shipping_address_is_fix
368
+ );
369
+ }
370
+
371
+ throw $exception;
372
+ }
373
  }
374
 
375
  /**
modules/ppcp-vaulting/src/CustomerApprovalListener.php CHANGED
@@ -58,7 +58,8 @@ class CustomerApprovalListener {
58
  return;
59
  }
60
 
61
- $url = (string) filter_input( INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL );
 
62
 
63
  $query = wp_parse_url( $url, PHP_URL_QUERY );
64
  if ( $query && str_contains( $query, 'ppcp_vault=cancel' ) ) {
58
  return;
59
  }
60
 
61
+ // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
62
+ $url = (string) filter_var( $_SERVER['REQUEST_URI'] ?? '', FILTER_SANITIZE_URL );
63
 
64
  $query = wp_parse_url( $url, PHP_URL_QUERY );
65
  if ( $query && str_contains( $query, 'ppcp_vault=cancel' ) ) {
modules/ppcp-vaulting/src/PaymentTokenChecker.php CHANGED
@@ -119,7 +119,7 @@ class PaymentTokenChecker {
119
  try {
120
  if ( $this->is_free_trial_order( $wc_order ) ) {
121
  if ( CreditCardGateway::ID === $wc_order->get_payment_method()
122
- || ( PayPalGateway::ID === $wc_order->get_payment_method() && 'card' === $wc_order->get_meta( PayPalGateway::ORDER_PAYMENT_SOURCE ) )
123
  ) {
124
  $order = $this->order_repository->for_wc_order( $wc_order );
125
  $this->authorized_payments_processor->void_authorizations( $order );
119
  try {
120
  if ( $this->is_free_trial_order( $wc_order ) ) {
121
  if ( CreditCardGateway::ID === $wc_order->get_payment_method()
122
+ || ( PayPalGateway::ID === $wc_order->get_payment_method() && 'card' === $wc_order->get_meta( PayPalGateway::ORDER_PAYMENT_SOURCE_META_KEY ) )
123
  ) {
124
  $order = $this->order_repository->for_wc_order( $wc_order );
125
  $this->authorized_payments_processor->void_authorizations( $order );
modules/ppcp-wc-gateway/assets/js/gateway-settings.js CHANGED
@@ -1 +1 @@
1
- (()=>{var __webpack_modules__={795:()=>{eval(";\ndocument.addEventListener('DOMContentLoaded', () => {\n const payLaterMessagingCheckboxes = document.querySelectorAll(\"#ppcp-message_enabled, #ppcp-message_cart_enabled, #ppcp-message_product_enabled\");\n const vaultingCheckboxes = document.querySelectorAll(\"#ppcp-vault_enabled\");\n\n function atLeastOneChecked(checkboxesNodeList) {\n return Array.prototype.slice.call(checkboxesNodeList).filter(node => !node.disabled && node.checked).length > 0;\n }\n\n function disableAll(nodeList) {\n nodeList.forEach(node => node.setAttribute('disabled', 'true'));\n }\n\n function enableAll(nodeList) {\n nodeList.forEach(node => node.removeAttribute('disabled'));\n }\n\n function updateCheckboxes() {\n atLeastOneChecked(payLaterMessagingCheckboxes) ? disableAll(vaultingCheckboxes) : enableAll(vaultingCheckboxes);\n atLeastOneChecked(vaultingCheckboxes) ? disableAll(payLaterMessagingCheckboxes) : enableAll(payLaterMessagingCheckboxes);\n\n if (typeof PayPalCommerceGatewaySettings === 'undefined' || PayPalCommerceGatewaySettings.vaulting_features_available !== '1') {\n disableAll(vaultingCheckboxes);\n }\n }\n\n updateCheckboxes();\n payLaterMessagingCheckboxes.forEach(node => node.addEventListener('change', updateCheckboxes));\n vaultingCheckboxes.forEach(node => node.addEventListener('change', updateCheckboxes));\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9wcGNwLXdjLWdhdGV3YXkvLi9yZXNvdXJjZXMvanMvZ2F0ZXdheS1zZXR0aW5ncy5qcz8xODEzIl0sIm5hbWVzIjpbImRvY3VtZW50IiwiYWRkRXZlbnRMaXN0ZW5lciIsInBheUxhdGVyTWVzc2FnaW5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}},__webpack_exports__={};__webpack_modules__[795]()})();
1
+ (()=>{var __webpack_modules__={795:()=>{eval(";\ndocument.addEventListener('DOMContentLoaded', () => {\n const payLaterMessagingCheckboxes = document.querySelectorAll(\"#ppcp-message_enabled, #ppcp-message_cart_enabled, #ppcp-message_product_enabled\");\n const vaultingCheckboxes = document.querySelectorAll(\"#ppcp-vault_enabled\");\n const payLaterEnabledLabels = document.querySelectorAll(\".ppcp-pay-later-enabled-label\");\n const payLaterDisabledLabels = document.querySelectorAll(\".ppcp-pay-later-disabled-label\");\n const disabledCheckboxes = document.querySelectorAll('.ppcp-disabled-checkbox');\n\n function atLeastOneChecked(checkboxesNodeList) {\n return Array.prototype.slice.call(checkboxesNodeList).filter(node => !node.disabled && node.checked).length > 0;\n }\n\n function disableAll(nodeList) {\n nodeList.forEach(node => node.setAttribute('disabled', 'true'));\n }\n\n function enableAll(nodeList) {\n nodeList.forEach(node => node.removeAttribute('disabled'));\n }\n\n function hideAll(nodeList) {\n nodeList.forEach(node => node.style.display = 'none');\n }\n\n function displayAll(nodeList) {\n nodeList.forEach(node => node.style.display = '');\n }\n\n function uncheckAll(nodeList) {\n nodeList.forEach(node => {\n node.checked = false;\n node.dispatchEvent(new Event('change'));\n });\n }\n\n function disablePayLater() {\n uncheckAll(payLaterMessagingCheckboxes);\n disableAll(payLaterMessagingCheckboxes);\n hideAll(payLaterEnabledLabels);\n displayAll(payLaterDisabledLabels);\n }\n\n function enablePayLater() {\n enableAll(payLaterMessagingCheckboxes);\n displayAll(payLaterEnabledLabels);\n hideAll(payLaterDisabledLabels);\n }\n\n function togglePayLater() {\n atLeastOneChecked(vaultingCheckboxes) ? disablePayLater() : enablePayLater();\n }\n\n disableAll(disabledCheckboxes);\n togglePayLater();\n vaultingCheckboxes.forEach(node => node.addEventListener('change', togglePayLater));\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6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# sourceURL=webpack-internal:///795\n")}},__webpack_exports__={};__webpack_modules__[795]()})();
modules/ppcp-wc-gateway/resources/js/gateway-settings.js CHANGED
@@ -9,6 +9,18 @@
9
  "#ppcp-vault_enabled"
10
  )
11
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  function atLeastOneChecked(checkboxesNodeList) {
13
  return Array.prototype.slice.call(checkboxesNodeList).filter(node => !node.disabled && node.checked).length > 0
14
  }
@@ -21,18 +33,41 @@
21
  nodeList.forEach(node => node.removeAttribute('disabled'))
22
  }
23
 
24
- function updateCheckboxes() {
25
- atLeastOneChecked(payLaterMessagingCheckboxes) ? disableAll(vaultingCheckboxes) : enableAll(vaultingCheckboxes)
26
- atLeastOneChecked(vaultingCheckboxes) ? disableAll(payLaterMessagingCheckboxes) : enableAll(payLaterMessagingCheckboxes)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- if(typeof PayPalCommerceGatewaySettings === 'undefined' || PayPalCommerceGatewaySettings.vaulting_features_available !== '1' ) {
29
- disableAll(vaultingCheckboxes)
30
- }
31
  }
32
 
33
- updateCheckboxes()
 
34
 
35
- payLaterMessagingCheckboxes.forEach(node => node.addEventListener('change', updateCheckboxes))
36
- vaultingCheckboxes.forEach(node => node.addEventListener('change', updateCheckboxes));
37
  }
38
  );
9
  "#ppcp-vault_enabled"
10
  )
11
 
12
+ const payLaterEnabledLabels = document.querySelectorAll(
13
+ ".ppcp-pay-later-enabled-label"
14
+ )
15
+
16
+ const payLaterDisabledLabels = document.querySelectorAll(
17
+ ".ppcp-pay-later-disabled-label"
18
+ )
19
+
20
+ const disabledCheckboxes = document.querySelectorAll(
21
+ '.ppcp-disabled-checkbox'
22
+ )
23
+
24
  function atLeastOneChecked(checkboxesNodeList) {
25
  return Array.prototype.slice.call(checkboxesNodeList).filter(node => !node.disabled && node.checked).length > 0
26
  }
33
  nodeList.forEach(node => node.removeAttribute('disabled'))
34
  }
35
 
36
+ function hideAll(nodeList) {
37
+ nodeList.forEach(node => node.style.display = 'none')
38
+ }
39
+
40
+ function displayAll(nodeList) {
41
+ nodeList.forEach(node => node.style.display = '')
42
+ }
43
+
44
+ function uncheckAll(nodeList){
45
+ nodeList.forEach(node => {
46
+ node.checked = false
47
+ node.dispatchEvent(new Event('change'))
48
+ })
49
+ }
50
+
51
+ function disablePayLater() {
52
+ uncheckAll(payLaterMessagingCheckboxes)
53
+ disableAll(payLaterMessagingCheckboxes)
54
+ hideAll(payLaterEnabledLabels)
55
+ displayAll(payLaterDisabledLabels)
56
+ }
57
+
58
+ function enablePayLater() {
59
+ enableAll(payLaterMessagingCheckboxes)
60
+ displayAll(payLaterEnabledLabels)
61
+ hideAll(payLaterDisabledLabels)
62
+ }
63
 
64
+ function togglePayLater() {
65
+ atLeastOneChecked(vaultingCheckboxes) ? disablePayLater() : enablePayLater()
 
66
  }
67
 
68
+ disableAll( disabledCheckboxes )
69
+ togglePayLater()
70
 
71
+ vaultingCheckboxes.forEach(node => node.addEventListener('change', togglePayLater));
 
72
  }
73
  );
modules/ppcp-wc-gateway/services.php CHANGED
@@ -13,6 +13,7 @@ namespace WooCommerce\PayPalCommerce\WcGateway;
13
 
14
  use Psr\Container\ContainerInterface;
15
  use WooCommerce\PayPalCommerce\ApiClient\Entity\ApplicationContext;
 
16
  use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
17
  use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
18
  use WooCommerce\PayPalCommerce\Button\Helper\MessagesDisclaimers;
@@ -783,15 +784,7 @@ return array(
783
  'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ),
784
  'type' => 'checkbox',
785
  'desc_tip' => true,
786
- 'label' => sprintf(
787
- // translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
788
- __( 'Enable saved cards and subscription features on your store. To use vaulting features, you must %1$senable vaulting on your account%2$s.', 'woocommerce-paypal-payments' ),
789
- '<a
790
- href="https://docs.woocommerce.com/document/woocommerce-paypal-payments/#enable-vaulting-on-your-live-account"
791
- target="_blank"
792
- >',
793
- '</a>'
794
- ),
795
  'description' => __( 'Allow registered buyers to save PayPal and Credit Card accounts. Allow Subscription renewals.', 'woocommerce-paypal-payments' ),
796
  'default' => false,
797
  'screens' => array(
@@ -799,6 +792,7 @@ return array(
799
  ),
800
  'requirements' => array(),
801
  'gateway' => array( 'paypal', 'dcc' ),
 
802
  ),
803
  'logging_enabled' => array(
804
  'title' => __( 'Logging', 'woocommerce-paypal-payments' ),
@@ -989,7 +983,7 @@ return array(
989
  'message_enabled' => array(
990
  'title' => __( 'Enable message on Checkout', 'woocommerce-paypal-payments' ),
991
  'type' => 'checkbox',
992
- 'label' => __( 'Enable on Checkout', 'woocommerce-paypal-payments' ),
993
  'default' => true,
994
  'screens' => array(
995
  State::STATE_START,
@@ -1295,7 +1289,7 @@ return array(
1295
  'message_product_enabled' => array(
1296
  'title' => __( 'Enable message on Single Product', 'woocommerce-paypal-payments' ),
1297
  'type' => 'checkbox',
1298
- 'label' => __( 'Enable on Single Product', 'woocommerce-paypal-payments' ),
1299
  'default' => true,
1300
  'screens' => array(
1301
  State::STATE_START,
@@ -1601,7 +1595,7 @@ return array(
1601
  'message_cart_enabled' => array(
1602
  'title' => __( 'Enable message on Cart', 'woocommerce-paypal-payments' ),
1603
  'type' => 'checkbox',
1604
- 'label' => __( 'Enable on Cart', 'woocommerce-paypal-payments' ),
1605
  'default' => true,
1606
  'screens' => array(
1607
  State::STATE_START,
@@ -2047,17 +2041,6 @@ return array(
2047
  $fields['disable_cards']['options'] = $card_options;
2048
  $fields['card_icons']['options'] = array_merge( $dark_versions, $card_options );
2049
 
2050
- /**
2051
- * Display vault message on Pay Later label if vault is enabled.
2052
- */
2053
- $settings = $container->get( 'wcgateway.settings' );
2054
- if ( $settings->has( 'vault_enabled' ) && $settings->get( 'vault_enabled' ) ) {
2055
- $message = __( "You have PayPal vaulting enabled, that's why Pay Later Messaging options are unavailable now. You cannot use both features at the same time.", 'woocommerce-paypal-payments' );
2056
- $fields['message_enabled']['label'] = $message;
2057
- $fields['message_product_enabled']['label'] = $message;
2058
- $fields['message_cart_enabled']['label'] = $message;
2059
- }
2060
-
2061
  return $fields;
2062
  },
2063
 
@@ -2156,4 +2139,44 @@ return array(
2156
  $settings->has( 'logging_enabled' ) && $settings->get( 'logging_enabled' )
2157
  );
2158
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2159
  );
13
 
14
  use Psr\Container\ContainerInterface;
15
  use WooCommerce\PayPalCommerce\ApiClient\Entity\ApplicationContext;
16
+ use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
17
  use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
18
  use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
19
  use WooCommerce\PayPalCommerce\Button\Helper\MessagesDisclaimers;
784
  'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ),
785
  'type' => 'checkbox',
786
  'desc_tip' => true,
787
+ 'label' => $container->get( 'button.helper.vaulting-label' ),
 
 
 
 
 
 
 
 
788
  'description' => __( 'Allow registered buyers to save PayPal and Credit Card accounts. Allow Subscription renewals.', 'woocommerce-paypal-payments' ),
789
  'default' => false,
790
  'screens' => array(
792
  ),
793
  'requirements' => array(),
794
  'gateway' => array( 'paypal', 'dcc' ),
795
+ 'input_class' => $container->get( 'wcgateway.helper.vaulting-scope' ) ? array() : array( 'ppcp-disabled-checkbox' ),
796
  ),
797
  'logging_enabled' => array(
798
  'title' => __( 'Logging', 'woocommerce-paypal-payments' ),
983
  'message_enabled' => array(
984
  'title' => __( 'Enable message on Checkout', 'woocommerce-paypal-payments' ),
985
  'type' => 'checkbox',
986
+ 'label' => sprintf( $container->get( 'wcgateway.settings.fields.pay-later-label' ), __( 'Enable on Checkout', 'woocommerce-paypal-payments' ) ),
987
  'default' => true,
988
  'screens' => array(
989
  State::STATE_START,
1289
  'message_product_enabled' => array(
1290
  'title' => __( 'Enable message on Single Product', 'woocommerce-paypal-payments' ),
1291
  'type' => 'checkbox',
1292
+ 'label' => sprintf( $container->get( 'wcgateway.settings.fields.pay-later-label' ), __( 'Enable on Single Product', 'woocommerce-paypal-payments' ) ),
1293
  'default' => true,
1294
  'screens' => array(
1295
  State::STATE_START,
1595
  'message_cart_enabled' => array(
1596
  'title' => __( 'Enable message on Cart', 'woocommerce-paypal-payments' ),
1597
  'type' => 'checkbox',
1598
+ 'label' => sprintf( $container->get( 'wcgateway.settings.fields.pay-later-label' ), __( 'Enable on Cart', 'woocommerce-paypal-payments' ) ),
1599
  'default' => true,
1600
  'screens' => array(
1601
  State::STATE_START,
2041
  $fields['disable_cards']['options'] = $card_options;
2042
  $fields['card_icons']['options'] = array_merge( $dark_versions, $card_options );
2043
 
 
 
 
 
 
 
 
 
 
 
 
2044
  return $fields;
2045
  },
2046
 
2139
  $settings->has( 'logging_enabled' ) && $settings->get( 'logging_enabled' )
2140
  );
2141
  },
2142
+
2143
+ 'wcgateway.helper.vaulting-scope' => static function ( ContainerInterface $container ): bool {
2144
+ try {
2145
+ $token = $container->get( 'api.bearer' )->bearer();
2146
+ return $token->vaulting_available();
2147
+ } catch ( RuntimeException $exception ) {
2148
+ return false;
2149
+ }
2150
+ },
2151
+
2152
+ 'button.helper.vaulting-label' => static function ( ContainerInterface $container ): string {
2153
+ $vaulting_label = __( 'Enable saved cards and subscription features on your store.', 'woocommerce-paypal-payments' );
2154
+
2155
+ if ( ! $container->get( 'wcgateway.helper.vaulting-scope' ) ) {
2156
+ $vaulting_label .= sprintf(
2157
+ // translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
2158
+ __( ' To use vaulting features, you must %1$senable vaulting on your account%2$s.', 'woocommerce-paypal-payments' ),
2159
+ '<a
2160
+ href="https://docs.woocommerce.com/document/woocommerce-paypal-payments/#enable-vaulting-on-your-live-account"
2161
+ target="_blank"
2162
+ >',
2163
+ '</a>'
2164
+ );
2165
+ }
2166
+
2167
+ $vaulting_label .= '<p class="description">';
2168
+ $vaulting_label .= __( 'This will disable all Pay Later messaging on your site.', 'woocommerce-paypal-payments' );
2169
+ $vaulting_label .= '</p>';
2170
+
2171
+ return $vaulting_label;
2172
+ },
2173
+
2174
+ 'wcgateway.settings.fields.pay-later-label' => static function ( ContainerInterface $container ): string {
2175
+ $pay_later_label = '<span class="ppcp-pay-later-enabled-label">%s</span>';
2176
+ $pay_later_label .= '<span class="ppcp-pay-later-disabled-label">';
2177
+ $pay_later_label .= __( "You have PayPal vaulting enabled, that's why Pay Later Messaging options are unavailable now. You cannot use both features at the same time.", 'woocommerce-paypal-payments' );
2178
+ $pay_later_label .= '</span>';
2179
+
2180
+ return $pay_later_label;
2181
+ },
2182
  );
modules/ppcp-wc-gateway/src/Assets/SettingsPageAssets.php CHANGED
@@ -9,7 +9,6 @@ declare(strict_types=1);
9
 
10
  namespace WooCommerce\PayPalCommerce\WcGateway\Assets;
11
 
12
- use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
13
  use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
14
 
15
  /**
@@ -31,34 +30,24 @@ class SettingsPageAssets {
31
  */
32
  private $version;
33
 
34
- /**
35
- * The bearer.
36
- *
37
- * @var Bearer
38
- */
39
- private $bearer;
40
-
41
  /**
42
  * Assets constructor.
43
  *
44
  * @param string $module_url The url of this module.
45
  * @param string $version The assets version.
46
- * @param Bearer $bearer The bearer.
47
  */
48
- public function __construct( string $module_url, string $version, Bearer $bearer ) {
49
  $this->module_url = $module_url;
50
  $this->version = $version;
51
- $this->bearer = $bearer;
52
  }
53
 
54
  /**
55
  * Register assets provided by this module.
56
  */
57
  public function register_assets() {
58
- $bearer = $this->bearer;
59
  add_action(
60
  'admin_enqueue_scripts',
61
- function() use ( $bearer ) {
62
  if ( ! is_admin() || wp_doing_ajax() ) {
63
  return;
64
  }
@@ -67,7 +56,7 @@ class SettingsPageAssets {
67
  return;
68
  }
69
 
70
- $this->register_admin_assets( $bearer );
71
  }
72
  );
73
 
@@ -98,10 +87,8 @@ class SettingsPageAssets {
98
 
99
  /**
100
  * Register assets for admin pages.
101
- *
102
- * @param Bearer $bearer The bearer.
103
  */
104
- private function register_admin_assets( Bearer $bearer ) {
105
  wp_enqueue_script(
106
  'ppcp-gateway-settings',
107
  trailingslashit( $this->module_url ) . 'assets/js/gateway-settings.js',
@@ -109,18 +96,5 @@ class SettingsPageAssets {
109
  $this->version,
110
  true
111
  );
112
-
113
- try {
114
- $token = $bearer->bearer();
115
- wp_localize_script(
116
- 'ppcp-gateway-settings',
117
- 'PayPalCommerceGatewaySettings',
118
- array(
119
- 'vaulting_features_available' => $token->vaulting_available(),
120
- )
121
- );
122
- } catch ( RuntimeException $exception ) {
123
- return;
124
- }
125
  }
126
  }
9
 
10
  namespace WooCommerce\PayPalCommerce\WcGateway\Assets;
11
 
 
12
  use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
13
 
14
  /**
30
  */
31
  private $version;
32
 
 
 
 
 
 
 
 
33
  /**
34
  * Assets constructor.
35
  *
36
  * @param string $module_url The url of this module.
37
  * @param string $version The assets version.
 
38
  */
39
+ public function __construct( string $module_url, string $version ) {
40
  $this->module_url = $module_url;
41
  $this->version = $version;
 
42
  }
43
 
44
  /**
45
  * Register assets provided by this module.
46
  */
47
  public function register_assets() {
 
48
  add_action(
49
  'admin_enqueue_scripts',
50
+ function() {
51
  if ( ! is_admin() || wp_doing_ajax() ) {
52
  return;
53
  }
56
  return;
57
  }
58
 
59
+ $this->register_admin_assets();
60
  }
61
  );
62
 
87
 
88
  /**
89
  * Register assets for admin pages.
 
 
90
  */
91
+ private function register_admin_assets() {
92
  wp_enqueue_script(
93
  'ppcp-gateway-settings',
94
  trailingslashit( $this->module_url ) . 'assets/js/gateway-settings.js',
96
  $this->version,
97
  true
98
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  }
100
  }
modules/ppcp-wc-gateway/src/Checkout/DisableGateways.php CHANGED
@@ -69,7 +69,7 @@ class DisableGateways {
69
  unset( $methods[ CreditCardGateway::ID ] );
70
  }
71
 
72
- if ( $this->settings->has( 'button_enabled' ) && ! $this->settings->get( 'button_enabled' ) && ! $this->session_handler->order() ) {
73
  unset( $methods[ PayPalGateway::ID ] );
74
  }
75
 
69
  unset( $methods[ CreditCardGateway::ID ] );
70
  }
71
 
72
+ if ( $this->settings->has( 'button_enabled' ) && ! $this->settings->get( 'button_enabled' ) && ! $this->session_handler->order() && is_checkout() ) {
73
  unset( $methods[ PayPalGateway::ID ] );
74
  }
75
 
modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php CHANGED
@@ -33,12 +33,13 @@ class PayPalGateway extends \WC_Payment_Gateway {
33
 
34
  use ProcessPaymentTrait;
35
 
36
- const ID = 'ppcp-gateway';
37
- const INTENT_META_KEY = '_ppcp_paypal_intent';
38
- const ORDER_ID_META_KEY = '_ppcp_paypal_order_id';
39
- const ORDER_PAYMENT_MODE_META_KEY = '_ppcp_paypal_payment_mode';
40
- const ORDER_PAYMENT_SOURCE = '_ppcp_paypal_payment_source';
41
- const FEES_META_KEY = '_ppcp_paypal_fees';
 
42
 
43
  /**
44
  * The Settings Renderer.
33
 
34
  use ProcessPaymentTrait;
35
 
36
+ const ID = 'ppcp-gateway';
37
+ const INTENT_META_KEY = '_ppcp_paypal_intent';
38
+ const ORDER_ID_META_KEY = '_ppcp_paypal_order_id';
39
+ const ORDER_PAYMENT_MODE_META_KEY = '_ppcp_paypal_payment_mode';
40
+ const ORDER_PAYMENT_SOURCE_META_KEY = '_ppcp_paypal_payment_source';
41
+ const FEES_META_KEY = '_ppcp_paypal_fees';
42
+ const REFUNDS_META_KEY = '_ppcp_refunds';
43
 
44
  /**
45
  * The Settings Renderer.
modules/ppcp-wc-gateway/src/Processor/OrderMetaTrait.php CHANGED
@@ -39,7 +39,7 @@ trait OrderMetaTrait {
39
  );
40
  $payment_source = $this->get_payment_source( $order );
41
  if ( $payment_source ) {
42
- $wc_order->update_meta_data( PayPalGateway::ORDER_PAYMENT_SOURCE, $payment_source );
43
  }
44
  }
45
 
39
  );
40
  $payment_source = $this->get_payment_source( $order );
41
  if ( $payment_source ) {
42
+ $wc_order->update_meta_data( PayPalGateway::ORDER_PAYMENT_SOURCE_META_KEY, $payment_source );
43
  }
44
  }
45
 
modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php CHANGED
@@ -150,7 +150,8 @@ class OrderProcessor {
150
  * @return bool
151
  */
152
  public function process( \WC_Order $wc_order ): bool {
153
- $order = $this->session_handler->order();
 
154
  if ( ! $order ) {
155
  $this->last_error = __( 'No PayPal order found in the current WooCommerce session.', 'woocommerce-paypal-payments' );
156
  return false;
150
  * @return bool
151
  */
152
  public function process( \WC_Order $wc_order ): bool {
153
+ $order_id = $wc_order->get_meta( PayPalGateway::ORDER_ID_META_KEY );
154
+ $order = $this->session_handler->order() ?? $this->order_endpoint->order( $order_id );
155
  if ( ! $order ) {
156
  $this->last_error = __( 'No PayPal order found in the current WooCommerce session.', 'woocommerce-paypal-payments' );
157
  return false;
modules/ppcp-wc-gateway/src/Processor/RefundMetaTrait.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Operations with refund metadata.
4
+ *
5
+ * @package WooCommerce\PayPalCommerce\WcGateway\Processor
6
+ */
7
+
8
+ declare(strict_types=1);
9
+
10
+ namespace WooCommerce\PayPalCommerce\WcGateway\Processor;
11
+
12
+ use WC_Order;
13
+ use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
14
+
15
+ /**
16
+ * Trait RefundMetaTrait.
17
+ */
18
+ trait RefundMetaTrait {
19
+
20
+ /**
21
+ * Adds a refund ID to the order metadata.
22
+ *
23
+ * @param WC_Order $wc_order The WC order to which metadata will be added.
24
+ * @param string $refund_id The refund ID to be added.
25
+ */
26
+ protected function add_refund_to_meta( WC_Order $wc_order, string $refund_id ): void {
27
+ $refunds = $this->get_refunds_meta( $wc_order );
28
+ $refunds[] = $refund_id;
29
+ $wc_order->update_meta_data( PayPalGateway::REFUNDS_META_KEY, $refunds );
30
+ $wc_order->save();
31
+ }
32
+
33
+ /**
34
+ * Returns refund IDs from the order metadata.
35
+ *
36
+ * @param WC_Order $wc_order The WC order.
37
+ *
38
+ * @return string[]
39
+ */
40
+ protected function get_refunds_meta( WC_Order $wc_order ): array {
41
+ $refunds = $wc_order->get_meta( PayPalGateway::REFUNDS_META_KEY );
42
+ if ( ! is_array( $refunds ) ) {
43
+ $refunds = array();
44
+ }
45
+ return $refunds;
46
+ }
47
+ }
modules/ppcp-wc-gateway/src/Processor/RefundProcessor.php CHANGED
@@ -26,6 +26,7 @@ use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
26
  * Class RefundProcessor
27
  */
28
  class RefundProcessor {
 
29
 
30
  private const REFUND_MODE_REFUND = 'refund';
31
  private const REFUND_MODE_VOID = 'void';
@@ -113,8 +114,8 @@ class RefundProcessor {
113
  throw new RuntimeException( 'No capture.' );
114
  }
115
 
116
- $capture = $captures[0];
117
- $refund = new Refund(
118
  $capture,
119
  $capture->invoice_id(),
120
  $reason,
@@ -122,7 +123,10 @@ class RefundProcessor {
122
  new Money( $amount, $wc_order->get_currency() )
123
  )
124
  );
125
- $this->payments_endpoint->refund( $refund );
 
 
 
126
  break;
127
  case self::REFUND_MODE_VOID:
128
  $voidable_authorizations = array_filter(
26
  * Class RefundProcessor
27
  */
28
  class RefundProcessor {
29
+ use RefundMetaTrait;
30
 
31
  private const REFUND_MODE_REFUND = 'refund';
32
  private const REFUND_MODE_VOID = 'void';
114
  throw new RuntimeException( 'No capture.' );
115
  }
116
 
117
+ $capture = $captures[0];
118
+ $refund = new Refund(
119
  $capture,
120
  $capture->invoice_id(),
121
  $reason,
123
  new Money( $amount, $wc_order->get_currency() )
124
  )
125
  );
126
+ $refund_id = $this->payments_endpoint->refund( $refund );
127
+
128
+ $this->add_refund_to_meta( $wc_order, $refund_id );
129
+
130
  break;
131
  case self::REFUND_MODE_VOID:
132
  $voidable_authorizations = array_filter(
modules/ppcp-wc-gateway/src/Settings/SettingsListener.php CHANGED
@@ -167,7 +167,7 @@ class SettingsListener {
167
  * Prevent enabling both Pay Later messaging and PayPal vaulting
168
  */
169
  public function listen_for_vaulting_enabled() {
170
- if ( ! $this->is_valid_site_request() ) {
171
  return;
172
  }
173
 
@@ -208,10 +208,6 @@ class SettingsListener {
208
  $this->settings->set( 'message_product_enabled', false );
209
  $this->settings->set( 'message_cart_enabled', false );
210
  $this->settings->persist();
211
-
212
- $redirect_url = admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway' );
213
- wp_safe_redirect( $redirect_url, 302 );
214
- exit;
215
  }
216
 
217
  /**
@@ -441,19 +437,10 @@ class SettingsListener {
441
  */
442
  private function is_valid_site_request() : bool {
443
 
444
- /**
445
- * No nonce needed at this point.
446
- *
447
- * phpcs:disable WordPress.Security.NonceVerification.Missing
448
- * phpcs:disable WordPress.Security.NonceVerification.Recommended
449
- */
450
  if ( empty( $this->page_id ) ) {
451
  return false;
452
  }
453
 
454
- // phpcs:enable WordPress.Security.NonceVerification.Missing
455
- // phpcs:enable WordPress.Security.NonceVerification.Recommended
456
-
457
  if ( ! current_user_can( 'manage_woocommerce' ) ) {
458
  return false;
459
  }
167
  * Prevent enabling both Pay Later messaging and PayPal vaulting
168
  */
169
  public function listen_for_vaulting_enabled() {
170
+ if ( ! $this->is_valid_site_request() || State::STATE_ONBOARDED !== $this->state->current_state() ) {
171
  return;
172
  }
173
 
208
  $this->settings->set( 'message_product_enabled', false );
209
  $this->settings->set( 'message_cart_enabled', false );
210
  $this->settings->persist();
 
 
 
 
211
  }
212
 
213
  /**
437
  */
438
  private function is_valid_site_request() : bool {
439
 
 
 
 
 
 
 
440
  if ( empty( $this->page_id ) ) {
441
  return false;
442
  }
443
 
 
 
 
444
  if ( ! current_user_can( 'manage_woocommerce' ) ) {
445
  return false;
446
  }
modules/ppcp-wc-gateway/src/Settings/SettingsRenderer.php CHANGED
@@ -124,26 +124,6 @@ class SettingsRenderer {
124
 
125
  $messages = array();
126
 
127
- if ( $this->can_display_vaulting_admin_message() ) {
128
-
129
- $vaulting_title = __( 'PayPal vaulting', 'woocommerce-paypal-payments' );
130
- $pay_later_messages_title = __( 'Pay Later Messaging', 'woocommerce-paypal-payments' );
131
-
132
- $enabled = $this->paypal_vaulting_is_enabled() ? $vaulting_title : $pay_later_messages_title;
133
- $disabled = $this->settings_status->pay_later_messaging_is_enabled() ? $vaulting_title : $pay_later_messages_title;
134
-
135
- $pay_later_messages_or_vaulting_text = sprintf(
136
- // translators: %1$s and %2$s is translated PayPal vaulting and Pay Later Messaging strings.
137
- __(
138
- 'You have %1$s enabled, that\'s why %2$s options are unavailable now. You cannot use both features at the same time.',
139
- 'woocommerce-paypal-payments'
140
- ),
141
- $enabled,
142
- $disabled
143
- );
144
- $messages[] = new Message( $pay_later_messages_or_vaulting_text, 'warning' );
145
- }
146
-
147
  //phpcs:disable WordPress.Security.NonceVerification.Recommended
148
  //phpcs:disable WordPress.Security.NonceVerification.Missing
149
  if ( ! isset( $_GET['ppcp-onboarding-error'] ) || ! empty( $_POST ) ) {
124
 
125
  $messages = array();
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  //phpcs:disable WordPress.Security.NonceVerification.Recommended
128
  //phpcs:disable WordPress.Security.NonceVerification.Missing
129
  if ( ! isset( $_GET['ppcp-onboarding-error'] ) || ! empty( $_POST ) ) {
modules/ppcp-wc-gateway/src/WCGatewayModule.php CHANGED
@@ -81,6 +81,48 @@ class WCGatewayModule implements ModuleInterface {
81
  if ( $breakdown ) {
82
  $wc_order->update_meta_data( PayPalGateway::FEES_META_KEY, $breakdown->to_array() );
83
  $wc_order->save_meta_data();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  }
85
  },
86
  10,
@@ -106,8 +148,7 @@ class WCGatewayModule implements ModuleInterface {
106
  if ( $c->has( 'wcgateway.url' ) ) {
107
  $assets = new SettingsPageAssets(
108
  $c->get( 'wcgateway.url' ),
109
- $c->get( 'ppcp.asset-version' ),
110
- $c->get( 'api.bearer' )
111
  );
112
  $assets->register_assets();
113
  }
81
  if ( $breakdown ) {
82
  $wc_order->update_meta_data( PayPalGateway::FEES_META_KEY, $breakdown->to_array() );
83
  $wc_order->save_meta_data();
84
+ $paypal_fee = $breakdown->paypal_fee();
85
+ if ( $paypal_fee ) {
86
+ update_post_meta( $wc_order->get_id(), 'PayPal Transaction Key', $paypal_fee->value() );
87
+ }
88
+ }
89
+
90
+ $fraud = $capture->fraud_processor_response();
91
+ if ( $fraud ) {
92
+ $fraud_responses = $fraud->to_array();
93
+ $avs_response_order_note_title = __( 'Address Verification Result', 'woocommerce-paypal-payments' );
94
+ /* translators: %1$s is AVS order note title, %2$s is AVS order note result markup */
95
+ $avs_response_order_note_format = __( '%1$s %2$s', 'woocommerce-paypal-payments' );
96
+ $avs_response_order_note_result_format = '<ul class="ppcp_avs_result">
97
+ <li>%1$s</li>
98
+ <ul class="ppcp_avs_result_inner">
99
+ <li>%2$s</li>
100
+ <li>%3$s</li>
101
+ </ul>
102
+ </ul>';
103
+ $avs_response_order_note_result = sprintf(
104
+ $avs_response_order_note_result_format,
105
+ /* translators: %s is fraud AVS code */
106
+ sprintf( __( 'AVS: %s', 'woocommerce-paypal-payments' ), esc_html( $fraud_responses['avs_code'] ) ),
107
+ /* translators: %s is fraud AVS address match */
108
+ sprintf( __( 'Address Match: %s', 'woocommerce-paypal-payments' ), esc_html( $fraud_responses['address_match'] ) ),
109
+ /* translators: %s is fraud AVS postal match */
110
+ sprintf( __( 'Postal Match: %s', 'woocommerce-paypal-payments' ), esc_html( $fraud_responses['postal_match'] ) )
111
+ );
112
+ $avs_response_order_note = sprintf(
113
+ $avs_response_order_note_format,
114
+ esc_html( $avs_response_order_note_title ),
115
+ wp_kses_post( $avs_response_order_note_result )
116
+ );
117
+ $wc_order->add_order_note( $avs_response_order_note );
118
+
119
+ $cvv_response_order_note_format = '<ul class="ppcp_cvv_result"><li>%1$s</li></ul>';
120
+ $cvv_response_order_note = sprintf(
121
+ $cvv_response_order_note_format,
122
+ /* translators: %s is fraud CVV match */
123
+ sprintf( __( 'CVV2 Match: %s', 'woocommerce-paypal-payments' ), esc_html( $fraud_responses['cvv_match'] ) )
124
+ );
125
+ $wc_order->add_order_note( $cvv_response_order_note );
126
  }
127
  },
128
  10,
148
  if ( $c->has( 'wcgateway.url' ) ) {
149
  $assets = new SettingsPageAssets(
150
  $c->get( 'wcgateway.url' ),
151
+ $c->get( 'ppcp.asset-version' )
 
152
  );
153
  $assets->register_assets();
154
  }
modules/ppcp-webhooks/src/Handler/PaymentCaptureRefunded.php CHANGED
@@ -10,14 +10,17 @@ declare(strict_types=1);
10
  namespace WooCommerce\PayPalCommerce\Webhooks\Handler;
11
 
12
  use Psr\Log\LoggerInterface;
 
13
  use WooCommerce\PayPalCommerce\WcGateway\Processor\TransactionIdHandlingTrait;
 
 
14
 
15
  /**
16
  * Class PaymentCaptureRefunded
17
  */
18
  class PaymentCaptureRefunded implements RequestHandler {
19
 
20
- use PrefixTrait, TransactionIdHandlingTrait;
21
 
22
  /**
23
  * The logger.
@@ -49,25 +52,26 @@ class PaymentCaptureRefunded implements RequestHandler {
49
  /**
50
  * Whether a handler is responsible for a given request or not.
51
  *
52
- * @param \WP_REST_Request $request The request.
53
  *
54
  * @return bool
55
  */
56
- public function responsible_for_request( \WP_REST_Request $request ): bool {
57
  return in_array( $request['event_type'], $this->event_types(), true );
58
  }
59
 
60
  /**
61
  * Responsible for handling the request.
62
  *
63
- * @param \WP_REST_Request $request The request.
64
  *
65
- * @return \WP_REST_Response
66
  */
67
- public function handle_request( \WP_REST_Request $request ): \WP_REST_Response {
68
- $response = array( 'success' => false );
69
- $order_id = isset( $request['resource']['custom_id'] ) ?
70
  $this->sanitize_custom_id( $request['resource']['custom_id'] ) : 0;
 
71
  if ( ! $order_id ) {
72
  $message = sprintf(
73
  // translators: %s is the PayPal webhook Id.
@@ -85,7 +89,7 @@ class PaymentCaptureRefunded implements RequestHandler {
85
  )
86
  );
87
  $response['message'] = $message;
88
- return rest_ensure_response( $response );
89
  }
90
 
91
  $wc_order = wc_get_order( $order_id );
@@ -93,7 +97,7 @@ class PaymentCaptureRefunded implements RequestHandler {
93
  $message = sprintf(
94
  // translators: %s is the PayPal refund Id.
95
  __( 'Order for PayPal refund %s not found.', 'woocommerce-paypal-payments' ),
96
- isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
97
  );
98
  $this->logger->log(
99
  'warning',
@@ -103,7 +107,13 @@ class PaymentCaptureRefunded implements RequestHandler {
103
  )
104
  );
105
  $response['message'] = $message;
106
- return rest_ensure_response( $response );
 
 
 
 
 
 
107
  }
108
 
109
  /**
@@ -132,7 +142,7 @@ class PaymentCaptureRefunded implements RequestHandler {
132
  );
133
 
134
  $response['message'] = $refund->get_error_message();
135
- return rest_ensure_response( $response );
136
  }
137
 
138
  $this->logger->log(
@@ -152,11 +162,12 @@ class PaymentCaptureRefunded implements RequestHandler {
152
  )
153
  );
154
 
155
- if ( is_array( $request['resource'] ) && isset( $request['resource']['id'] ) ) {
156
- $this->update_transaction_id( $request['resource']['id'], $wc_order, $this->logger );
 
157
  }
158
 
159
  $response['success'] = true;
160
- return rest_ensure_response( $response );
161
  }
162
  }
10
  namespace WooCommerce\PayPalCommerce\Webhooks\Handler;
11
 
12
  use Psr\Log\LoggerInterface;
13
+ use WooCommerce\PayPalCommerce\WcGateway\Processor\RefundMetaTrait;
14
  use WooCommerce\PayPalCommerce\WcGateway\Processor\TransactionIdHandlingTrait;
15
+ use WP_REST_Request;
16
+ use WP_REST_Response;
17
 
18
  /**
19
  * Class PaymentCaptureRefunded
20
  */
21
  class PaymentCaptureRefunded implements RequestHandler {
22
 
23
+ use PrefixTrait, TransactionIdHandlingTrait, RefundMetaTrait;
24
 
25
  /**
26
  * The logger.
52
  /**
53
  * Whether a handler is responsible for a given request or not.
54
  *
55
+ * @param WP_REST_Request $request The request.
56
  *
57
  * @return bool
58
  */
59
+ public function responsible_for_request( WP_REST_Request $request ): bool {
60
  return in_array( $request['event_type'], $this->event_types(), true );
61
  }
62
 
63
  /**
64
  * Responsible for handling the request.
65
  *
66
+ * @param WP_REST_Request $request The request.
67
  *
68
+ * @return WP_REST_Response
69
  */
70
+ public function handle_request( WP_REST_Request $request ): WP_REST_Response {
71
+ $response = array( 'success' => false );
72
+ $order_id = isset( $request['resource']['custom_id'] ) ?
73
  $this->sanitize_custom_id( $request['resource']['custom_id'] ) : 0;
74
+ $refund_id = (string) ( $request['resource']['id'] ?? '' );
75
  if ( ! $order_id ) {
76
  $message = sprintf(
77
  // translators: %s is the PayPal webhook Id.
89
  )
90
  );
91
  $response['message'] = $message;
92
+ return new WP_REST_Response( $response );
93
  }
94
 
95
  $wc_order = wc_get_order( $order_id );
97
  $message = sprintf(
98
  // translators: %s is the PayPal refund Id.
99
  __( 'Order for PayPal refund %s not found.', 'woocommerce-paypal-payments' ),
100
+ $refund_id
101
  );
102
  $this->logger->log(
103
  'warning',
107
  )
108
  );
109
  $response['message'] = $message;
110
+ return new WP_REST_Response( $response );
111
+ }
112
+
113
+ $already_added_refunds = $this->get_refunds_meta( $wc_order );
114
+ if ( in_array( $refund_id, $already_added_refunds, true ) ) {
115
+ $this->logger->info( "Refund {$refund_id} is already handled." );
116
+ return new WP_REST_Response( $response );
117
  }
118
 
119
  /**
142
  );
143
 
144
  $response['message'] = $refund->get_error_message();
145
+ return new WP_REST_Response( $response );
146
  }
147
 
148
  $this->logger->log(
162
  )
163
  );
164
 
165
+ if ( $refund_id ) {
166
+ $this->update_transaction_id( $refund_id, $wc_order, $this->logger );
167
+ $this->add_refund_to_meta( $wc_order, $refund_id );
168
  }
169
 
170
  $response['success'] = true;
171
+ return new WP_REST_Response( $response );
172
  }
173
  }
psalm.xml.dist CHANGED
@@ -151,5 +151,11 @@
151
  <MixedStringOffsetAssignment errorLevel="info"/>
152
  <ParamNameMismatch errorLevel="info"/>
153
  <RedundantCastGivenDocblockType errorLevel="info"/>
 
 
 
 
 
 
154
  </issueHandlers>
155
  </psalm>
151
  <MixedStringOffsetAssignment errorLevel="info"/>
152
  <ParamNameMismatch errorLevel="info"/>
153
  <RedundantCastGivenDocblockType errorLevel="info"/>
154
+
155
+ <TooManyArguments>
156
+ <errorLevel type="suppress">
157
+ <referencedFunction name="apply_filters" />
158
+ </errorLevel>
159
+ </TooManyArguments>
160
  </issueHandlers>
161
  </psalm>
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.9
6
  Requires PHP: 7.1
7
- Stable tag: 1.8.0
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -81,11 +81,27 @@ Follow the steps below to connect the plugin to your PayPal account:
81
 
82
  == Changelog ==
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  = 1.8.0 =
85
  * Add - Allow free trial subscriptions #580
86
  * Fix - The Card Processing does not appear as an available payment method when manually creating an order #562
87
- * Fix - Express buttons & Pay Later visible on variable Subscription products /w disabled vaulting #281
88
- * Fix - Pay for order (guest) failing when no email address available #535
89
  * Fix - Emoji in product description causing INVALID_STRING_LENGTH error #491
90
  * Enhancement - Change cart total amount that is sent to PayPal gateway #486
91
  * Enhancement - Include dark Visa and Mastercard gateway icon list for PayPal Card Processing #566
@@ -144,7 +160,7 @@ Follow the steps below to connect the plugin to your PayPal account:
144
  * Fix - Empty space in invoice prefix causes smart buttons to not load #390
145
  * Fix - woocommerce_payment_complete action not triggered for payments completed via webhook #399
146
  * Fix - Paying with Venmo - Change funding source on checkout page and receipt to Venmo #394
147
- * Fix - Internal server error on checkout when selected saved card but then switched to paypal #403
148
  * Enhancement - Allow formatted text for the Description field #407
149
  * Enhancement - Remove filter to prevent On-Hold emails #411
150
 
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: 6.0
6
  Requires PHP: 7.1
7
+ Stable tag: 1.8.1
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
81
 
82
  == Changelog ==
83
 
84
+ = 1.8.1 =
85
+ * Fix - Manual orders return an error for guest users when paying with PayPal Card Processing #530
86
+ * Fix - "No PayPal order found in the current WooCommerce session" error for guests on Pay for Order page #605
87
+ * Fix - Error on order discount by third-party plugins #548
88
+ * Fix - Empty payer data may cause CITY_REQUIRED error for certain checkout countries #632
89
+ * Fix - Mini Cart smart buttons visible after adding subscription product to cart from "shop" page while Vaulting is disabled #624
90
+ * Fix - Smart buttons not loading when free product is in cart but shipping costs are available #606
91
+ * Fix - Smart button & Pay Later messaging disappear on the cart page after changing shipping method #288
92
+ * Fix - Disabling PayPal Checkout on the checkout page also removes the button from the Cart and Product Pages #577
93
+ * Fix - Partial refunds via PayPal are created twice/double in WooCommerce order #522
94
+ * Fix - Emoji in product description causing INVALID_STRING_LENGTH error #491
95
+ * Enhancement - Vaulting & Pay Later UI/UX #174
96
+ * Enhancement - Redirect after updating settings for DCC sends you to PPCP settings screen #392
97
+ * Enhancement - Add Fraud Processor Response as an order note #616
98
+ * Enhancement - Add the Paypal Fee to the Meta Custom Field for export purposes #591
99
+
100
  = 1.8.0 =
101
  * Add - Allow free trial subscriptions #580
102
  * Fix - The Card Processing does not appear as an available payment method when manually creating an order #562
103
+ * Fix - Express buttons & Pay Later visible on variable Subscription products /w disabled vaulting #281
104
+ * Fix - Pay for order (guest) failing when no email address available #535
105
  * Fix - Emoji in product description causing INVALID_STRING_LENGTH error #491
106
  * Enhancement - Change cart total amount that is sent to PayPal gateway #486
107
  * Enhancement - Include dark Visa and Mastercard gateway icon list for PayPal Card Processing #566
160
  * Fix - Empty space in invoice prefix causes smart buttons to not load #390
161
  * Fix - woocommerce_payment_complete action not triggered for payments completed via webhook #399
162
  * Fix - Paying with Venmo - Change funding source on checkout page and receipt to Venmo #394
163
+ * Fix - Internal server error on checkout when selected saved card but then switched to paypal #403
164
  * Enhancement - Allow formatted text for the Description field #407
165
  * Enhancement - Remove filter to prevent On-Hold emails #411
166
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit16558e4f2223b33dd8a9ed3fc3028843::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit5a08559ae58536f83fd0f0260535ccff::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit16558e4f2223b33dd8a9ed3fc3028843
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit16558e4f2223b33dd8a9ed3fc3028843
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit16558e4f2223b33dd8a9ed3fc3028843', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit16558e4f2223b33dd8a9ed3fc3028843', '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\ComposerStaticInit16558e4f2223b33dd8a9ed3fc3028843::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit16558e4f2223b33dd8a9ed3fc3028843
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit16558e4f2223b33dd8a9ed3fc3028843::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire16558e4f2223b33dd8a9ed3fc3028843($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire16558e4f2223b33dd8a9ed3fc3028843($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit5a08559ae58536f83fd0f0260535ccff
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit5a08559ae58536f83fd0f0260535ccff', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit5a08559ae58536f83fd0f0260535ccff', '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\ComposerStaticInit5a08559ae58536f83fd0f0260535ccff::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\ComposerStaticInit5a08559ae58536f83fd0f0260535ccff::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire5a08559ae58536f83fd0f0260535ccff($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire5a08559ae58536f83fd0f0260535ccff($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 ComposerStaticInit16558e4f2223b33dd8a9ed3fc3028843
8
  {
9
  public static $files = array (
10
  'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@@ -172,9 +172,9 @@ class ComposerStaticInit16558e4f2223b33dd8a9ed3fc3028843
172
  public static function getInitializer(ClassLoader $loader)
173
  {
174
  return \Closure::bind(function () use ($loader) {
175
- $loader->prefixLengthsPsr4 = ComposerStaticInit16558e4f2223b33dd8a9ed3fc3028843::$prefixLengthsPsr4;
176
- $loader->prefixDirsPsr4 = ComposerStaticInit16558e4f2223b33dd8a9ed3fc3028843::$prefixDirsPsr4;
177
- $loader->classMap = ComposerStaticInit16558e4f2223b33dd8a9ed3fc3028843::$classMap;
178
 
179
  }, null, ClassLoader::class);
180
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit5a08559ae58536f83fd0f0260535ccff
8
  {
9
  public static $files = array (
10
  'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
172
  public static function getInitializer(ClassLoader $loader)
173
  {
174
  return \Closure::bind(function () use ($loader) {
175
+ $loader->prefixLengthsPsr4 = ComposerStaticInit5a08559ae58536f83fd0f0260535ccff::$prefixLengthsPsr4;
176
+ $loader->prefixDirsPsr4 = ComposerStaticInit5a08559ae58536f83fd0f0260535ccff::$prefixDirsPsr4;
177
+ $loader->classMap = ComposerStaticInit5a08559ae58536f83fd0f0260535ccff::$classMap;
178
 
179
  }, null, ClassLoader::class);
180
  }
woocommerce-paypal-payments.php CHANGED
@@ -3,13 +3,13 @@
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, Pay Later, 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.8.0
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com/
9
  * License: GPL-2.0
10
  * Requires PHP: 7.1
11
  * WC requires at least: 3.9
12
- * WC tested up to: 6.4
13
  * Text Domain: woocommerce-paypal-payments
14
  *
15
  * @package WooCommerce\PayPalCommerce
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, Pay Later, 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.8.1
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com/
9
  * License: GPL-2.0
10
  * Requires PHP: 7.1
11
  * WC requires at least: 3.9
12
+ * WC tested up to: 6.5
13
  * Text Domain: woocommerce-paypal-payments
14
  *
15
  * @package WooCommerce\PayPalCommerce