WooCommerce PayPal Express Checkout Payment Gateway - Version 1.1.2

Version Description

  • Fix - Make sure translations are loaded properly.
  • Fix - Added IPN (Instant Payment Notification) handler.
  • Fix - Make sure guest payment is enabled by default.
Download this release

Release Info

Developer akeda
Plugin Icon 128x128 WooCommerce PayPal Express Checkout Payment Gateway
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.1.2

includes/abstracts/abstract-wc-gateway-ppec-paypal-request-handler.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * Base class to handle request from PayPal.
9
+ *
10
+ * @since 1.1.2
11
+ */
12
+ abstract class WC_Gateway_PPEC_PayPal_Request_Handler {
13
+
14
+ /**
15
+ * Gateway instance.
16
+ *
17
+ * @var WC_Gateway_PPEC
18
+ */
19
+ protected $gateway;
20
+
21
+ /**
22
+ * Constructor.
23
+ *
24
+ * @param WC_Gateway_PPEC $gateway PPEC gateway instance
25
+ */
26
+ public function __construct( WC_Gateway_PPEC $gateway ) {
27
+ $this->gateway = $gateway;
28
+ }
29
+
30
+ abstract protected function handle();
31
+
32
+ /**
33
+ * Get the order from the PayPal 'Custom' variable.
34
+ *
35
+ * @param string $raw_custom JSON Data passed back by PayPal
36
+ * @return bool|WC_Order Order object or false
37
+ */
38
+ protected function get_paypal_order( $raw_custom ) {
39
+ // We have the data in the correct format, so get the order.
40
+ if ( ( $custom = json_decode( $raw_custom ) ) && is_object( $custom ) ) {
41
+ $order_id = $custom->order_id;
42
+ $order_key = $custom->order_key;
43
+ } else {
44
+ wc_gateway_ppec_log( sprintf( '%s: %s', __FUNCTION__, 'Error: Order ID and key were not found in "custom".' ) );
45
+ return false;
46
+ }
47
+
48
+ if ( ! $order = wc_get_order( $order_id ) ) {
49
+ // We have an invalid $order_id, probably because invoice_prefix has changed.
50
+ $order_id = wc_get_order_id_by_order_key( $order_key );
51
+ $order = wc_get_order( $order_id );
52
+ }
53
+ if ( ! $order || $order->order_key !== $order_key ) {
54
+ wc_gateway_ppec_log( sprintf( '%s: %s', __FUNCTION__, 'Error: Order Keys do not match.' ) );
55
+ return false;
56
+ }
57
+ return $order;
58
+ }
59
+
60
+ /**
61
+ * Complete order, add transaction ID and note.
62
+ *
63
+ * @param WC_Order $order Order object
64
+ * @param string $txn_id Transaction ID
65
+ * @param string $note Order note
66
+ */
67
+ protected function payment_complete( $order, $txn_id = '', $note = '' ) {
68
+ $order->add_order_note( $note );
69
+ $order->payment_complete( $txn_id );
70
+ }
71
+
72
+ /**
73
+ * Hold order and add note.
74
+ *
75
+ * @param WC_Order $order Order object
76
+ * @param string $reason On-hold reason
77
+ */
78
+ protected function payment_on_hold( $order, $reason = '' ) {
79
+ $order->update_status( 'on-hold', $reason );
80
+ wc_reduce_stock_levels( $order_id );
81
+ WC()->cart->empty_cart();
82
+ }
83
+ }
includes/abstracts/abstract-wc-gateway-ppec.php CHANGED
@@ -234,7 +234,7 @@ abstract class WC_Gateway_PPEC extends WC_Payment_Gateway {
234
  if ( ! empty( $username ) ) {
235
 
236
  if ( empty( $password ) ) {
237
- WC_Admin_Settings::add_error( sprintf( __( 'Error: You must enter a %s API password.' ), __( $settings->get_environment(), 'woocommerce-gateway-paypal-express-checkout' ) ) );
238
  return false;
239
  }
240
 
@@ -455,9 +455,6 @@ abstract class WC_Gateway_PPEC extends WC_Payment_Gateway {
455
  * @return bool
456
  */
457
  public function is_available() {
458
- if ( 'yes' !== $this->enabled ) {
459
- return false;
460
- }
461
- return true;
462
  }
463
  }
234
  if ( ! empty( $username ) ) {
235
 
236
  if ( empty( $password ) ) {
237
+ WC_Admin_Settings::add_error( __( 'Error: You must enter API password.', 'woocommerce-gateway-paypal-express-checkout' ) );
238
  return false;
239
  }
240
 
455
  * @return bool
456
  */
457
  public function is_available() {
458
+ return 'yes' === $this->enabled;
 
 
 
459
  }
460
  }
includes/class-wc-gateway-ppec-checkout-handler.php CHANGED
@@ -406,12 +406,19 @@ class WC_Gateway_PPEC_Checkout_Handler {
406
  return $params;
407
  }
408
 
 
 
 
 
 
 
 
409
  protected function is_success( $response ) {
410
- if ( 'Success' == $response['ACK'] || 'SuccessWithWarning' == $response['ACK'] ) {
411
- return true;
412
- } else {
413
- return false;
414
- }
415
  }
416
 
417
  /**
@@ -549,7 +556,7 @@ class WC_Gateway_PPEC_Checkout_Handler {
549
 
550
  $response = wc_gateway_ppec()->client->get_express_checkout_details( $token );
551
 
552
- if ( 'Success' == $response['ACK'] || 'SuccessWithWarning' == $response['ACK'] ) {
553
  $checkout_details = new PayPal_Checkout_Details();
554
  $checkout_details->loadFromGetECResponse( $response );
555
  return $checkout_details;
@@ -574,11 +581,8 @@ class WC_Gateway_PPEC_Checkout_Handler {
574
 
575
  // Generate params to send to paypal, then do request
576
  $response = wc_gateway_ppec()->client->do_express_checkout_payment( array_merge(
577
- $settings->get_do_express_checkout_params(),
578
  $this->getDoExpressCheckoutParameters( $token, $payerID ),
579
- array(
580
- 'PAYMENTREQUEST_0_INVNUM' => $settings->invoice_prefix . $order->get_order_number(),
581
- )
582
  ) );
583
 
584
  if ( $this->is_success( $response ) ) {
406
  return $params;
407
  }
408
 
409
+ /**
410
+ * Whether PayPal response indicates an okay message.
411
+ *
412
+ * @param array $response Response from PayPal
413
+ *
414
+ * @return bool True if it's okay
415
+ */
416
  protected function is_success( $response ) {
417
+ return (
418
+ isset( $response['ACK'] )
419
+ &&
420
+ in_array( $response['ACK'], array( 'Success', 'SuccessWithWarning' ) )
421
+ );
422
  }
423
 
424
  /**
556
 
557
  $response = wc_gateway_ppec()->client->get_express_checkout_details( $token );
558
 
559
+ if ( $this->is_success( $response ) ) {
560
  $checkout_details = new PayPal_Checkout_Details();
561
  $checkout_details->loadFromGetECResponse( $response );
562
  return $checkout_details;
581
 
582
  // Generate params to send to paypal, then do request
583
  $response = wc_gateway_ppec()->client->do_express_checkout_payment( array_merge(
 
584
  $this->getDoExpressCheckoutParameters( $token, $payerID ),
585
+ $settings->get_do_express_checkout_params( $order )
 
 
586
  ) );
587
 
588
  if ( $this->is_success( $response ) ) {
includes/class-wc-gateway-ppec-client-credential-certificate.php CHANGED
@@ -63,11 +63,11 @@ class WC_Gateway_PPEC_Client_Credential_Certificate extends WC_Gateway_PPEC_Clie
63
  $certificate_file = $this->_maybe_create_certificate_file( $password );
64
 
65
  if ( false === curl_setopt( $handle, CURLOPT_SSLCERT, $certificate_file ) ) {
66
- throw new Exception( __( 'Unable to accept certificate during cURL configuration', 'woocommerce-gateway-ppec' ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
67
  }
68
 
69
  if ( $this->_use_secure_transport() && false === curl_setopt( $handle, CURLOPT_SSLCERTPASSWD, $password ) ) {
70
- throw new Exception( __( 'Unable to accept certificate password during cURL configuration', 'woocommerce-gateway-ppec' ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
71
  }
72
  }
73
 
@@ -84,7 +84,7 @@ class WC_Gateway_PPEC_Client_Credential_Certificate extends WC_Gateway_PPEC_Clie
84
  protected function _maybe_create_certificate_file( $password ) {
85
  $temp_file = tempnam( sys_get_temp_dir(), 'pptmp_' );
86
  if ( ! $temp_file ) {
87
- throw new Exception( sprintf( __( 'Unable to write certificate file %s during cURL configuration', 'woocommerce-gateway-ppec' ), $temp_file ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
88
  }
89
 
90
  if ( $this->_use_secure_transport() ) {
@@ -110,11 +110,11 @@ class WC_Gateway_PPEC_Client_Credential_Certificate extends WC_Gateway_PPEC_Clie
110
  $private_key = openssl_pkey_get_private( $this->_certificate );
111
 
112
  if ( false === $private_key ) {
113
- throw new Exception( __( 'Failed to retrieve private key during cURL configuration', 'woocommerce-gateway-ppec' ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
114
  }
115
 
116
  if ( ! openssl_pkcs12_export_to_file( $this->_certificate, $temp_file, $private_key, $password ) ) {
117
- throw new Exception( __( 'Failed to export PKCS12 file during cURL configuration', 'woocommerce-gateway-ppec' ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
118
  }
119
  }
120
 
@@ -130,7 +130,7 @@ class WC_Gateway_PPEC_Client_Credential_Certificate extends WC_Gateway_PPEC_Clie
130
  */
131
  protected function _maybe_create_non_secure_certificate_file( $temp_file ) {
132
  if ( false === file_put_contents( $temp_file, $this->_certificate ) ) {
133
- throw new Exception( sprintf( __( 'Unable to write certificate file %s during cURL configuration', 'woocommerce-gateway-ppec' ), $temp_file ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
134
  }
135
  }
136
 
63
  $certificate_file = $this->_maybe_create_certificate_file( $password );
64
 
65
  if ( false === curl_setopt( $handle, CURLOPT_SSLCERT, $certificate_file ) ) {
66
+ throw new Exception( __( 'Unable to accept certificate during cURL configuration', 'woocommerce-gateway-paypal-express-checkout' ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
67
  }
68
 
69
  if ( $this->_use_secure_transport() && false === curl_setopt( $handle, CURLOPT_SSLCERTPASSWD, $password ) ) {
70
+ throw new Exception( __( 'Unable to accept certificate password during cURL configuration', 'woocommerce-gateway-paypal-express-checkout' ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
71
  }
72
  }
73
 
84
  protected function _maybe_create_certificate_file( $password ) {
85
  $temp_file = tempnam( sys_get_temp_dir(), 'pptmp_' );
86
  if ( ! $temp_file ) {
87
+ throw new Exception( sprintf( __( 'Unable to write certificate file %s during cURL configuration', 'woocommerce-gateway-paypal-express-checkout' ), $temp_file ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
88
  }
89
 
90
  if ( $this->_use_secure_transport() ) {
110
  $private_key = openssl_pkey_get_private( $this->_certificate );
111
 
112
  if ( false === $private_key ) {
113
+ throw new Exception( __( 'Failed to retrieve private key during cURL configuration', 'woocommerce-gateway-paypal-express-checkout' ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
114
  }
115
 
116
  if ( ! openssl_pkcs12_export_to_file( $this->_certificate, $temp_file, $private_key, $password ) ) {
117
+ throw new Exception( __( 'Failed to export PKCS12 file during cURL configuration', 'woocommerce-gateway-paypal-express-checkout' ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
118
  }
119
  }
120
 
130
  */
131
  protected function _maybe_create_non_secure_certificate_file( $temp_file ) {
132
  if ( false === file_put_contents( $temp_file, $this->_certificate ) ) {
133
+ throw new Exception( sprintf( __( 'Unable to write certificate file %s during cURL configuration', 'woocommerce-gateway-paypal-express-checkout' ), $temp_file ), WC_Gateway_PPEC_Client::INVALID_ENVIRONMENT_ERROR );
134
  }
135
  }
136
 
includes/class-wc-gateway-ppec-client.php CHANGED
@@ -118,15 +118,15 @@ class WC_Gateway_PPEC_Client {
118
 
119
  // Make sure $_credential and $_environment have been configured.
120
  if ( ! $this->_credential ) {
121
- throw new Exception( __( 'Missing credential', 'woocommerce-gateway-ppec' ), self::INVALID_CREDENTIAL_ERROR );
122
  }
123
 
124
  if ( ! is_a( $this->_credential, 'WC_Gateway_PPEC_Client_Credential' ) ) {
125
- throw new Exception( __( 'Invalid credential object', 'woocommerce-gateway-ppec' ), self::INVALID_CREDENTIAL_ERROR );
126
  }
127
 
128
  if ( ! in_array( $this->_environment, array( 'live', 'sandbox' ) ) ) {
129
- throw new Exception( __( 'Invalid environment', 'woocommerce-gateway-ppec' ), self::INVALID_ENVIRONMENT_ERROR );
130
  }
131
 
132
  // First, add in the necessary credential parameters.
@@ -149,13 +149,13 @@ class WC_Gateway_PPEC_Client {
149
  wc_gateway_ppec_log( sprintf( '%s: response from remote request to %s: %s', __METHOD__, $this->get_endpoint(), print_r( $resp, true ) ) );
150
 
151
  if ( is_wp_error( $resp ) ) {
152
- throw new Exception( sprintf( __( 'An error occurred while trying to connect to PayPal: %s', 'woocommerce-gateway-ppec' ), $resp->get_error_message() ), self::REQUEST_ERROR );
153
  }
154
 
155
  parse_str( wp_remote_retrieve_body( $resp ), $result );
156
 
157
  if ( ! array_key_exists( 'ACK', $result ) ) {
158
- throw new Exception( __( 'Malformed response received from PayPal', 'woocommerce-gateway-ppec' ), self::REQUEST_ERROR );
159
  }
160
 
161
  wc_gateway_ppec_log( sprintf( '%s: acknowleged response body: %s', __METHOD__, print_r( $result, true ) ) );
118
 
119
  // Make sure $_credential and $_environment have been configured.
120
  if ( ! $this->_credential ) {
121
+ throw new Exception( __( 'Missing credential', 'woocommerce-gateway-paypal-express-checkout' ), self::INVALID_CREDENTIAL_ERROR );
122
  }
123
 
124
  if ( ! is_a( $this->_credential, 'WC_Gateway_PPEC_Client_Credential' ) ) {
125
+ throw new Exception( __( 'Invalid credential object', 'woocommerce-gateway-paypal-express-checkout' ), self::INVALID_CREDENTIAL_ERROR );
126
  }
127
 
128
  if ( ! in_array( $this->_environment, array( 'live', 'sandbox' ) ) ) {
129
+ throw new Exception( __( 'Invalid environment', 'woocommerce-gateway-paypal-express-checkout' ), self::INVALID_ENVIRONMENT_ERROR );
130
  }
131
 
132
  // First, add in the necessary credential parameters.
149
  wc_gateway_ppec_log( sprintf( '%s: response from remote request to %s: %s', __METHOD__, $this->get_endpoint(), print_r( $resp, true ) ) );
150
 
151
  if ( is_wp_error( $resp ) ) {
152
+ throw new Exception( sprintf( __( 'An error occurred while trying to connect to PayPal: %s', 'woocommerce-gateway-paypal-express-checkout' ), $resp->get_error_message() ), self::REQUEST_ERROR );
153
  }
154
 
155
  parse_str( wp_remote_retrieve_body( $resp ), $result );
156
 
157
  if ( ! array_key_exists( 'ACK', $result ) ) {
158
+ throw new Exception( __( 'Malformed response received from PayPal', 'woocommerce-gateway-paypal-express-checkout' ), self::REQUEST_ERROR );
159
  }
160
 
161
  wc_gateway_ppec_log( sprintf( '%s: acknowleged response body: %s', __METHOD__, print_r( $result, true ) ) );
includes/class-wc-gateway-ppec-ipn-handler.php ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * WC_Gateway_PPEC_Cart_Handler handles button display in the cart.
9
+ *
10
+ * @see https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNImplementation/
11
+ * @since 1.1.2
12
+ */
13
+ class WC_Gateway_PPEC_IPN_Handler extends WC_Gateway_PPEC_PayPal_Request_Handler {
14
+
15
+ /**
16
+ * Handle the IPN request.
17
+ */
18
+ public function handle() {
19
+ add_action( 'woocommerce_api_wc_gateway_ppec', array( $this, 'check_request' ) );
20
+ add_action( 'woocommerce_paypal_express_checkout_valid_ipn_request', array( $this, 'handle_valid_ipn' ) );
21
+ }
22
+
23
+ /**
24
+ * Check request.
25
+ */
26
+ public function check_request() {
27
+ try {
28
+
29
+ if ( empty( $_POST ) ) {
30
+ throw new Exception( esc_html__( 'Empty POST data.', 'woocommerce-gateway-paypal-express-checkout' ) );
31
+ }
32
+
33
+ if ( $this->is_valid_ipn_request( $_POST ) ) {
34
+ wc_gateway_ppec_log( 'IPN request is valid according to PayPal.' );
35
+ do_action( 'woocommerce_paypal_express_checkout_valid_ipn_request', wp_unslash( $_POST ) );
36
+ exit;
37
+ } else {
38
+ wc_gateway_ppec_log( 'IPN request is NOT valid according to PayPal.' );
39
+ throw new Exception( esc_html__( 'Invalid IPN request.' , 'woocommerce-gateway-paypal-express-checkout' ) );
40
+ }
41
+
42
+ } catch ( Exception $e ) {
43
+
44
+ wp_die( $e->getMessage(), esc_html__( 'PayPal IPN Request Failure', 'woocommerce-gateway-paypal-express-checkout' ), array( 'response' => 500 ) );
45
+
46
+ }
47
+ }
48
+
49
+ /**
50
+ * Check with PayPal whether posted data is valid IPN request.
51
+ *
52
+ * @throws Exception
53
+ *
54
+ * @param array $posted_data Posted data
55
+ * @return bool True if posted_data is valid IPN request
56
+ */
57
+ public function is_valid_ipn_request( array $posted_data ) {
58
+ wc_gateway_ppec_log( sprintf( '%s: %s', __FUNCTION__, 'Checking IPN request validity' ) );
59
+
60
+ $ipn_request = array(
61
+ 'cmd' => '_notify-validate',
62
+ );
63
+ $ipn_request += wp_unslash( $posted_data );
64
+
65
+ $params = array(
66
+ 'body' => $ipn_request,
67
+ 'timeout' => 60,
68
+ 'httpversion' => '1.1',
69
+ 'compress' => false,
70
+ 'decompress' => false,
71
+ 'user-agent' => get_class( $this->gateway ),
72
+ );
73
+
74
+ // Post back to PayPal to check validity of IPN request.
75
+ $response = wp_safe_remote_post( $this->get_validator_url(), $params );
76
+
77
+ wc_gateway_ppec_log( sprintf( '%s: %s: %s', __FUNCTION__, 'Verify IPN request', print_r( $params, true ) ) );
78
+ wc_gateway_ppec_log( sprintf( '%s: %s: %s', __FUNCTION__, 'Response for the IPN request', print_r( $response, true ) ) );
79
+
80
+ if ( is_wp_error( $response ) ) {
81
+ throw new Exception( $response->get_error_message() );
82
+ }
83
+
84
+ return (
85
+ $response['response']['code'] >= 200
86
+ &&
87
+ $response['response']['code'] < 300
88
+ &&
89
+ strstr( $response['body'], 'VERIFIED' )
90
+ );
91
+ }
92
+
93
+ /**
94
+ * Handle valid IPN request.
95
+ *
96
+ * @param array $posted_data Posted data
97
+ */
98
+ public function handle_valid_ipn( $posted_data ) {
99
+ if ( ! empty( $posted_data['custom'] ) && ( $order = $this->get_paypal_order( $posted_data['custom'] ) ) ) {
100
+
101
+ // Lowercase returned variables.
102
+ $posted_data['payment_status'] = strtolower( $posted_data['payment_status'] );
103
+
104
+ // Sandbox fix.
105
+ if ( isset( $posted_data['test_ipn'] ) && 1 == $posted_data['test_ipn'] && 'pending' == $posted_data['payment_status'] ) {
106
+ $posted_data['payment_status'] = 'completed';
107
+ }
108
+
109
+ wc_gateway_ppec_log( 'Found order #' . $order->id );
110
+ wc_gateway_ppec_log( 'Payment status: ' . $posted_data['payment_status'] );
111
+
112
+ if ( method_exists( $this, 'payment_status_' . $posted_data['payment_status'] ) ) {
113
+ call_user_func( array( $this, 'payment_status_' . $posted_data['payment_status'] ), $order, $posted_data );
114
+ }
115
+
116
+ } else {
117
+ wc_gateway_ppec_log( sprintf( '%s: %s', __FUNCTION__, 'No order data being passed' ) );
118
+ }
119
+ }
120
+
121
+ /**
122
+ * Check for a valid transaction type.
123
+ *
124
+ * @param string $txn_type Transaction type
125
+ */
126
+ protected function validate_transaction_type( $txn_type ) {
127
+ $accepted_types = array( 'cart', 'instant', 'express_checkout', 'web_accept', 'masspay', 'send_money' );
128
+ if ( ! in_array( strtolower( $txn_type ), $accepted_types ) ) {
129
+ wc_gateway_ppec_log( 'Aborting, Invalid type:' . $txn_type );
130
+ exit;
131
+ }
132
+ }
133
+
134
+ /**
135
+ * Check currency from IPN matches the order.
136
+ *
137
+ * @param WC_Order $order Order object
138
+ * @param string $currency Currency
139
+ */
140
+ protected function validate_currency( $order, $currency ) {
141
+ if ( $order->order_currency !== $currency ) {
142
+ wc_gateway_ppec_log( 'Payment error: Currencies do not match (sent "' . $order->order_currency . '" | returned "' . $currency . '")' );
143
+ // Put this order on-hold for manual checking.
144
+ $order->update_status( 'on-hold', sprintf( __( 'Validation error: PayPal currencies do not match (code %s).', 'woocommerce-gateway-paypal-express-checkout' ), $currency ) );
145
+ exit;
146
+ }
147
+ }
148
+
149
+ /**
150
+ * Check payment amount from IPN matches the order.
151
+ *
152
+ * @param WC_Order $order Order object
153
+ * @param int $amount Amount
154
+ */
155
+ protected function validate_amount( $order, $amount ) {
156
+ if ( number_format( $order->get_total(), 2, '.', '' ) != number_format( $amount, 2, '.', '' ) ) {
157
+ wc_gateway_ppec_log( 'Payment error: Amounts do not match (gross ' . $amount . ')' );
158
+ // Put this order on-hold for manual checking.
159
+ $order->update_status( 'on-hold', sprintf( __( 'Validation error: PayPal amounts do not match (gross %s).', 'woocommerce-gateway-paypal-express-checkout' ), $amount ) );
160
+ exit;
161
+ }
162
+ }
163
+
164
+ /**
165
+ * Handle a completed payment.
166
+ *
167
+ * @param WC_Order $order Order object
168
+ * @param array $posted_data Posted data
169
+ */
170
+ protected function payment_status_completed( $order, $posted_data ) {
171
+ if ( $order->has_status( array( 'processing', 'completed' ) ) ) {
172
+ wc_gateway_ppec_log( 'Aborting, Order #' . $order->id . ' is already complete.' );
173
+ exit;
174
+ }
175
+
176
+ $this->validate_transaction_type( $posted_data['txn_type'] );
177
+ $this->validate_currency( $order, $posted_data['mc_currency'] );
178
+ $this->validate_amount( $order, $posted_data['mc_gross'] );
179
+ $this->save_paypal_meta_data( $order, $posted_data );
180
+
181
+ if ( 'completed' === $posted_data['payment_status'] ) {
182
+ $this->payment_complete( $order, ( ! empty( $posted_data['txn_id'] ) ? wc_clean( $posted_data['txn_id'] ) : '' ), __( 'IPN payment completed', 'woocommerce-gateway-paypal-express-checkout' ) );
183
+ if ( ! empty( $posted_data['mc_fee'] ) ) {
184
+ // Log paypal transaction fee.
185
+ update_post_meta( $order->id, 'PayPal Transaction Fee', wc_clean( $posted_data['mc_fee'] ) );
186
+ }
187
+ } else {
188
+ if ( 'authorization' === $posted_data['pending_reason'] ) {
189
+ $this->payment_on_hold( $order, __( 'Payment authorized. Change payment status to processing or complete to capture funds.', 'woocommerce-gateway-paypal-express-checkout' ) );
190
+ } else {
191
+ $this->payment_on_hold( $order, sprintf( __( 'Payment pending (%s).', 'woocommerce-gateway-paypal-express-checkout' ), $posted_data['pending_reason'] ) );
192
+ }
193
+ }
194
+ }
195
+
196
+ /**
197
+ * Handle a pending payment.
198
+ *
199
+ * @param WC_Order $order Order object
200
+ * @param array $posted_data Posted data
201
+ */
202
+ protected function payment_status_pending( $order, $posted_data ) {
203
+ $this->payment_status_completed( $order, $posted_data );
204
+ }
205
+
206
+ /**
207
+ * Handle a failed payment.
208
+ *
209
+ * @param WC_Order $order Order object
210
+ * @param array $posted_data Posted data
211
+ */
212
+ protected function payment_status_failed( $order, $posted_data ) {
213
+ $order->update_status( 'failed', sprintf( __( 'Payment %s via IPN.', 'woocommerce-gateway-paypal-express-checkout' ), wc_clean( $posted_data['payment_status'] ) ) );
214
+ }
215
+
216
+ /**
217
+ * Handle a denied payment.
218
+ *
219
+ * @param WC_Order $order Order object
220
+ * @param array $posted_data Posted data
221
+ */
222
+ protected function payment_status_denied( $order, $posted_data ) {
223
+ $this->payment_status_failed( $order, $posted_data );
224
+ }
225
+
226
+ /**
227
+ * Handle an expired payment.
228
+ *
229
+ * @param WC_Order $order Order object
230
+ * @param array $posted_data Posted data
231
+ */
232
+ protected function payment_status_expired( $order, $posted_data ) {
233
+ $this->payment_status_failed( $order, $posted_data );
234
+ }
235
+
236
+ /**
237
+ * Handle a voided payment.
238
+ *
239
+ * @param WC_Order $order Order object
240
+ * @param array $posted_data Posted data
241
+ */
242
+ protected function payment_status_voided( $order, $posted_data ) {
243
+ $this->payment_status_failed( $order, $posted_data );
244
+ }
245
+
246
+ /**
247
+ * Handle a refunded order.
248
+ *
249
+ * @param WC_Order $order Order object
250
+ * @param array $posted_data Posted data
251
+ */
252
+ protected function payment_status_refunded( $order, $posted_data ) {
253
+ // Only handle full refunds, not partial.
254
+ if ( $order->get_total() == ( $posted_data['mc_gross'] * -1 ) ) {
255
+ // Mark order as refunded.
256
+ $order->update_status( 'refunded', sprintf( __( 'Payment %s via IPN.', 'woocommerce-gateway-paypal-express-checkout' ), strtolower( $posted_data['payment_status'] ) ) );
257
+ $this->send_ipn_email_notification(
258
+ sprintf( __( 'Payment for order %s refunded', 'woocommerce-gateway-paypal-express-checkout' ), '<a class="link" href="' . esc_url( admin_url( 'post.php?post=' . $order->id . '&action=edit' ) ) . '">' . $order->get_order_number() . '</a>' ),
259
+ sprintf( __( 'Order #%s has been marked as refunded - PayPal reason code: %s', 'woocommerce-gateway-paypal-express-checkout' ), $order->get_order_number(), $posted_data['reason_code'] )
260
+ );
261
+ }
262
+ }
263
+
264
+ /**
265
+ * Handle a reveral.
266
+ *
267
+ * @param WC_Order $order Order object
268
+ * @param array $posted_data Posted data
269
+ */
270
+ protected function payment_status_reversed( $order, $posted_data ) {
271
+ $order->update_status( 'on-hold', sprintf( __( 'Payment %s via IPN.', 'woocommerce-gateway-paypal-express-checkout' ), wc_clean( $posted_data['payment_status'] ) ) );
272
+ $this->send_ipn_email_notification(
273
+ sprintf( __( 'Payment for order %s reversed', 'woocommerce-gateway-paypal-express-checkout' ), '<a class="link" href="' . esc_url( admin_url( 'post.php?post=' . $order->id . '&action=edit' ) ) . '">' . $order->get_order_number() . '</a>' ),
274
+ sprintf( __( 'Order #%s has been marked on-hold due to a reversal - PayPal reason code: %s', 'woocommerce-gateway-paypal-express-checkout' ), $order->get_order_number(), wc_clean( $posted_data['reason_code'] ) )
275
+ );
276
+ }
277
+
278
+ /**
279
+ * Handle a cancelled reveral.
280
+ *
281
+ * @param WC_Order $order Order object
282
+ * @param array $posted_data Posted data
283
+ */
284
+ protected function payment_status_canceled_reversal( $order, $posted_data ) {
285
+ $this->send_ipn_email_notification(
286
+ sprintf( __( 'Reversal cancelled for order #%s', 'woocommerce-gateway-paypal-express-checkout' ), $order->get_order_number() ),
287
+ sprintf( __( 'Order #%s has had a reversal cancelled. Please check the status of payment and update the order status accordingly here: %s', 'woocommerce-gateway-paypal-express-checkout' ), $order->get_order_number(), esc_url( admin_url( 'post.php?post=' . $order->id . '&action=edit' ) ) )
288
+ );
289
+ }
290
+
291
+ /**
292
+ * Save important data from the IPN to the order.
293
+ *
294
+ * @param WC_Order $order Order object
295
+ * @param array $posted_data Posted data
296
+ */
297
+ protected function save_paypal_meta_data( $order, $posted_data ) {
298
+ if ( ! empty( $posted_data['payer_email'] ) ) {
299
+ update_post_meta( $order->id, 'Payer PayPal address', wc_clean( $posted_data['payer_email'] ) );
300
+ }
301
+ if ( ! empty( $posted_data['first_name'] ) ) {
302
+ update_post_meta( $order->id, 'Payer first name', wc_clean( $posted_data['first_name'] ) );
303
+ }
304
+ if ( ! empty( $posted_data['last_name'] ) ) {
305
+ update_post_meta( $order->id, 'Payer last name', wc_clean( $posted_data['last_name'] ) );
306
+ }
307
+ if ( ! empty( $posted_data['payment_type'] ) ) {
308
+ update_post_meta( $order->id, 'Payment type', wc_clean( $posted_data['payment_type'] ) );
309
+ }
310
+ if ( ! empty( $posted_data['txn_id'] ) ) {
311
+ update_post_meta( $order->id, '_transaction_id', wc_clean( $posted_data['txn_id'] ) );
312
+ }
313
+ if ( ! empty( $posted_data['payment_status'] ) ) {
314
+ update_post_meta( $order->id, '_paypal_status', wc_clean( $posted_data['payment_status'] ) );
315
+ }
316
+ }
317
+
318
+ /**
319
+ * Send a notification to the user handling orders.
320
+ *
321
+ * @param string $subject Email subject
322
+ * @param string $message Email message
323
+ */
324
+ protected function send_ipn_email_notification( $subject, $message ) {
325
+ $new_order_settings = get_option( 'woocommerce_new_order_settings', array() );
326
+ $mailer = WC()->mailer();
327
+ $message = $mailer->wrap_message( $subject, $message );
328
+ $mailer->send( ! empty( $new_order_settings['recipient'] ) ? $new_order_settings['recipient'] : get_option( 'admin_email' ), strip_tags( $subject ), $message );
329
+ }
330
+
331
+ /**
332
+ * Get IPN request validator URL.
333
+ *
334
+ * @return string PayPal IPN request validator URL
335
+ */
336
+ public function get_validator_url() {
337
+ $url = 'https://www.paypal.com/cgi-bin/webscr';
338
+ if ( 'sandbox' === $this->gateway->environment ) {
339
+ $url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
340
+ }
341
+
342
+ return $url;
343
+ }
344
+ }
includes/class-wc-gateway-ppec-plugin.php CHANGED
@@ -144,6 +144,7 @@ class WC_Gateway_PPEC_Plugin {
144
 
145
  add_action( 'plugins_loaded', array( $this, 'bootstrap' ) );
146
  add_filter( 'allowed_redirect_hosts' , array( $this, 'whitelist_paypal_domains_for_redirect' ) );
 
147
  }
148
 
149
  public function bootstrap() {
@@ -286,6 +287,8 @@ class WC_Gateway_PPEC_Plugin {
286
  require_once( $this->includes_path . 'class-wc-gateway-ppec-checkout-handler.php' );
287
  require_once( $this->includes_path . 'class-wc-gateway-ppec-cart-handler.php' );
288
  require_once( $this->includes_path . 'class-wc-gateway-ppec-ips-handler.php' );
 
 
289
 
290
  $this->settings = new WC_Gateway_PPEC_Settings();
291
  $this->gateway_loader = new WC_Gateway_PPEC_Gateway_Loader();
@@ -336,4 +339,13 @@ class WC_Gateway_PPEC_Plugin {
336
  $domains[] = 'sandbox.paypal.com';
337
  return $domains;
338
  }
 
 
 
 
 
 
 
 
 
339
  }
144
 
145
  add_action( 'plugins_loaded', array( $this, 'bootstrap' ) );
146
  add_filter( 'allowed_redirect_hosts' , array( $this, 'whitelist_paypal_domains_for_redirect' ) );
147
+ add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
148
  }
149
 
150
  public function bootstrap() {
287
  require_once( $this->includes_path . 'class-wc-gateway-ppec-checkout-handler.php' );
288
  require_once( $this->includes_path . 'class-wc-gateway-ppec-cart-handler.php' );
289
  require_once( $this->includes_path . 'class-wc-gateway-ppec-ips-handler.php' );
290
+ require_once( $this->includes_path . 'abstracts/abstract-wc-gateway-ppec-paypal-request-handler.php' );
291
+ require_once( $this->includes_path . 'class-wc-gateway-ppec-ipn-handler.php' );
292
 
293
  $this->settings = new WC_Gateway_PPEC_Settings();
294
  $this->gateway_loader = new WC_Gateway_PPEC_Gateway_Loader();
339
  $domains[] = 'sandbox.paypal.com';
340
  return $domains;
341
  }
342
+
343
+ /**
344
+ * Load localisation files.
345
+ *
346
+ * @since 1.1.2
347
+ */
348
+ public function load_plugin_textdomain() {
349
+ load_plugin_textdomain( 'woocommerce-gateway-paypal-express-checkout', false, plugin_basename( $this->plugin_path ) . '/languages' );
350
+ }
351
  }
includes/class-wc-gateway-ppec-settings.php CHANGED
@@ -114,7 +114,7 @@ class WC_Gateway_PPEC_Settings {
114
  $params['LOGOIMG'] = $this->logo_image_url;
115
  }
116
 
117
- if ( false === apply_filters( 'woocommerce_paypal_express_checkout_allow_guests', true ) ) {
118
  $params['SOLUTIONTYPE'] = 'Sole';
119
  }
120
 
@@ -174,7 +174,18 @@ class WC_Gateway_PPEC_Settings {
174
 
175
  return $params;
176
  }
177
- public function get_do_express_checkout_params( $buckets = 1 ) {
 
 
 
 
 
 
 
 
 
 
 
178
  $params = array();
179
  if ( ! is_array( $buckets ) ) {
180
  $numBuckets = $buckets;
@@ -185,7 +196,10 @@ class WC_Gateway_PPEC_Settings {
185
  }
186
 
187
  foreach ( $buckets as $bucketNum ) {
 
188
  $params[ 'PAYMENTREQUEST_' . $bucketNum . '_PAYMENTACTION' ] = $this->get_paymentaction();
 
 
189
  }
190
 
191
  return $params;
114
  $params['LOGOIMG'] = $this->logo_image_url;
115
  }
116
 
117
+ if ( apply_filters( 'woocommerce_paypal_express_checkout_allow_guests', true ) ) {
118
  $params['SOLUTIONTYPE'] = 'Sole';
119
  }
120
 
174
 
175
  return $params;
176
  }
177
+
178
+ /**
179
+ * Get base parameters, based on settings instance, for DoExpressCheckoutCheckout NVP call.
180
+ *
181
+ * @see https://developer.paypal.com/docs/classic/api/merchant/DoExpressCheckoutPayment_API_Operation_NVP/
182
+ *
183
+ * @param WC_Order $order Order object
184
+ * @param int|array $buckets Number of buckets or list of bucket
185
+ *
186
+ * @return array DoExpressCheckoutPayment parameters
187
+ */
188
+ public function get_do_express_checkout_params( WC_Order $order, $buckets = 1 ) {
189
  $params = array();
190
  if ( ! is_array( $buckets ) ) {
191
  $numBuckets = $buckets;
196
  }
197
 
198
  foreach ( $buckets as $bucketNum ) {
199
+ $params[ 'PAYMENTREQUEST_' . $bucketNum . '_NOTIFYURL' ] = WC()->api_request_url( 'WC_Gateway_PPEC' );
200
  $params[ 'PAYMENTREQUEST_' . $bucketNum . '_PAYMENTACTION' ] = $this->get_paymentaction();
201
+ $params[ 'PAYMENTREQUEST_' . $bucketNum . '_INVNUM' ] = $this->invoice_prefix . $order->get_order_number();
202
+ $params[ 'PAYMENTREQUEST_' . $bucketNum . '_CUSTOM' ] = json_encode( array( 'order_id' => $order->id, 'order_key' => $order->order_key ) );
203
  }
204
 
205
  return $params;
includes/class-wc-gateway-ppec-with-paypal.php CHANGED
@@ -8,5 +8,10 @@ class WC_Gateway_PPEC_With_PayPal extends WC_Gateway_PPEC {
8
  public function __construct() {
9
  $this->id = 'ppec_paypal';
10
  parent::__construct();
 
 
 
 
 
11
  }
12
  }
8
  public function __construct() {
9
  $this->id = 'ppec_paypal';
10
  parent::__construct();
11
+
12
+ if ( $this->is_available() ) {
13
+ $ipn_handler = new WC_Gateway_PPEC_IPN_Handler( $this );
14
+ $ipn_handler->handle();
15
+ }
16
  }
17
  }
includes/functions.php CHANGED
@@ -63,4 +63,8 @@ function wc_gateway_ppec_log( $message ) {
63
  }
64
 
65
  $wc_ppec_logger->add( 'wc_gateway_ppec', $message );
 
 
 
 
66
  }
63
  }
64
 
65
  $wc_ppec_logger->add( 'wc_gateway_ppec', $message );
66
+
67
+ if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
68
+ error_log( $message );
69
+ }
70
  }
languages/woocommerce-gateway-paypal-express-checkout.pot ADDED
@@ -0,0 +1,845 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2016 Automattic
2
+ # This file is distributed under the GNU General Public License v3.0.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: WooCommerce PayPal Express Checkout Gateway 1.1.1\n"
6
+ "Report-Msgid-Bugs-To: "
7
+ "https://github.com/woothemes/woocommerce-gateway-paypal-express-checkout/"
8
+ "issues\n"
9
+ "POT-Creation-Date: 2016-08-20 20:23:39+00:00\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=utf-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
14
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
+ "Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
16
+ "X-Generator: grunt-wp-i18n 0.5.4\n"
17
+
18
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:19
19
+ #: includes/settings/settings-ppec.php:135
20
+ msgid "PayPal Express Checkout"
21
+ msgstr ""
22
+
23
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:20
24
+ msgid "Allow customers to conveniently checkout directly with PayPal."
25
+ msgstr ""
26
+
27
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:23
28
+ msgid "Continue to payment"
29
+ msgstr ""
30
+
31
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:120
32
+ msgid ""
33
+ "Sorry, an error occurred while trying to process your payment. Please try "
34
+ "again."
35
+ msgstr ""
36
+
37
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:150
38
+ msgid "No API certificate on file."
39
+ msgstr ""
40
+
41
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:162
42
+ msgid "expired on %s"
43
+ msgstr ""
44
+
45
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:165
46
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:168
47
+ msgid "expires on %s"
48
+ msgstr ""
49
+
50
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:172
51
+ msgid "Certificate belongs to API username %1$s; %2$s"
52
+ msgstr ""
53
+
54
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:174
55
+ msgid "The certificate on file is not valid."
56
+ msgstr ""
57
+
58
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:189
59
+ msgid "Error: The logo image URL you provided is not valid and cannot be used."
60
+ msgstr ""
61
+
62
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:237
63
+ msgid "Error: You must enter API password."
64
+ msgstr ""
65
+
66
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:248
67
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:283
68
+ msgid ""
69
+ "Error: The %s credentials you provided are not valid. Please double-check "
70
+ "that you entered them correctly and try again."
71
+ msgstr ""
72
+
73
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:253
74
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:288
75
+ msgid ""
76
+ "An error occurred while trying to validate your %s API credentials. Unable "
77
+ "to verify that your API credentials are correct."
78
+ msgstr ""
79
+
80
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:261
81
+ msgid "Error: The %s API certificate is not valid."
82
+ msgstr ""
83
+
84
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:269
85
+ msgid "Error: The %s API certificate has expired."
86
+ msgstr ""
87
+
88
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:274
89
+ msgid ""
90
+ "Error: The API username does not match the name in the API certificate. "
91
+ "Make sure that you have the correct API certificate."
92
+ msgstr ""
93
+
94
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:293
95
+ msgid "Error: You must provide a %s API signature or certificate."
96
+ msgstr ""
97
+
98
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:311
99
+ msgid ""
100
+ "The \"require billing address\" option is not enabled by your account and "
101
+ "has been disabled."
102
+ msgstr ""
103
+
104
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:324
105
+ msgid "Refund Error: You need to specify a refund amount."
106
+ msgstr ""
107
+
108
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:347
109
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:370
110
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:421
111
+ msgid "PayPal refund completed; transaction ID = %s"
112
+ msgstr ""
113
+
114
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:354
115
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:377
116
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:427
117
+ msgid "Error: %1$s - %2$s"
118
+ msgstr ""
119
+
120
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:394
121
+ msgid ""
122
+ "Refund Error: All transactions have been fully refunded. There is no amount "
123
+ "left to refund"
124
+ msgstr ""
125
+
126
+ #: includes/abstracts/abstract-wc-gateway-ppec.php:396
127
+ msgid ""
128
+ "Refund Error: The requested refund amount is too large. The refund amount "
129
+ "must be less than or equal to %s."
130
+ msgstr ""
131
+
132
+ #: includes/class-wc-gateway-ppec-admin-handler.php:49
133
+ msgid "Capture Charge"
134
+ msgstr ""
135
+
136
+ #: includes/class-wc-gateway-ppec-admin-handler.php:73
137
+ msgid ""
138
+ "NOTE: PayPal does not accept decimal places for the currency in which you "
139
+ "are transacting. The \"Number of Decimals\" option in WooCommerce has "
140
+ "automatically been set to 0 for you."
141
+ msgstr ""
142
+
143
+ #: includes/class-wc-gateway-ppec-admin-handler.php:156
144
+ msgid "Unable to capture charge!"
145
+ msgstr ""
146
+
147
+ #: includes/class-wc-gateway-ppec-admin-handler.php:158
148
+ msgid "PayPal Express Checkout charge complete (Charge ID: %s)"
149
+ msgstr ""
150
+
151
+ #: includes/class-wc-gateway-ppec-admin-handler.php:197
152
+ msgid "Unable to void charge!"
153
+ msgstr ""
154
+
155
+ #: includes/class-wc-gateway-ppec-admin-handler.php:199
156
+ msgid "PayPal Express Checkout charge voided (Charge ID: %s)"
157
+ msgstr ""
158
+
159
+ #: includes/class-wc-gateway-ppec-api-error.php:22
160
+ msgid "Unable to communicate with PayPal. Please try your payment again."
161
+ msgstr ""
162
+
163
+ #: includes/class-wc-gateway-ppec-api-error.php:23
164
+ msgid ""
165
+ "PayPal rejected your email address because it is not valid. Please "
166
+ "double-check your email address and try again."
167
+ msgstr ""
168
+
169
+ #: includes/class-wc-gateway-ppec-api-error.php:26
170
+ msgid "Your PayPal checkout session is invalid. Please check out again."
171
+ msgstr ""
172
+
173
+ #: includes/class-wc-gateway-ppec-api-error.php:27
174
+ msgid "Your PayPal checkout session has expired. Please check out again."
175
+ msgstr ""
176
+
177
+ #: includes/class-wc-gateway-ppec-api-error.php:29
178
+ msgid ""
179
+ "Your PayPal payment has already been completed. Please contact the store "
180
+ "owner for more information."
181
+ msgstr ""
182
+
183
+ #: includes/class-wc-gateway-ppec-api-error.php:30
184
+ msgid ""
185
+ "Your PayPal payment could not be processed. Please check out again or "
186
+ "contact PayPal for assistance."
187
+ msgstr ""
188
+
189
+ #: includes/class-wc-gateway-ppec-api-error.php:31
190
+ msgid ""
191
+ "Your PayPal payment could not be processed. Please select an alternative "
192
+ "method of payment or contact PayPal for assistance."
193
+ msgstr ""
194
+
195
+ #: includes/class-wc-gateway-ppec-api-error.php:33
196
+ msgid ""
197
+ "Your PayPal payment could not be processed. Please return to PayPal and "
198
+ "select a new method of payment."
199
+ msgstr ""
200
+
201
+ #: includes/class-wc-gateway-ppec-api-error.php:35
202
+ msgid ""
203
+ "You have not approved this transaction on the PayPal website. Please check "
204
+ "out again and be sure to complete all steps of the PayPal checkout process."
205
+ msgstr ""
206
+
207
+ #: includes/class-wc-gateway-ppec-api-error.php:36
208
+ msgid ""
209
+ "Your shipping address may not be in a different country than your country "
210
+ "of residence. Please double-check your shipping address and try again."
211
+ msgstr ""
212
+
213
+ #: includes/class-wc-gateway-ppec-api-error.php:37
214
+ msgid ""
215
+ "This store does not accept transactions from buyers in your country. "
216
+ "Please contact the store owner for assistance."
217
+ msgstr ""
218
+
219
+ #: includes/class-wc-gateway-ppec-api-error.php:38
220
+ msgid ""
221
+ "The transaction is over the threshold allowed by this store. Please "
222
+ "contact the store owner for assistance."
223
+ msgstr ""
224
+
225
+ #: includes/class-wc-gateway-ppec-api-error.php:40
226
+ msgid ""
227
+ "Your transaction was declined. Please contact the store owner for "
228
+ "assistance."
229
+ msgstr ""
230
+
231
+ #: includes/class-wc-gateway-ppec-api-error.php:41
232
+ #: includes/class-wc-gateway-ppec-api-error.php:46
233
+ msgid ""
234
+ "The country in your shipping address is not valid. Please double-check "
235
+ "your shipping address and try again."
236
+ msgstr ""
237
+
238
+ #: includes/class-wc-gateway-ppec-api-error.php:42
239
+ msgid ""
240
+ "The street address in your shipping address is not valid. Please "
241
+ "double-check your shipping address and try again."
242
+ msgstr ""
243
+
244
+ #: includes/class-wc-gateway-ppec-api-error.php:43
245
+ msgid ""
246
+ "The city in your shipping address is not valid. Please double-check your "
247
+ "shipping address and try again."
248
+ msgstr ""
249
+
250
+ #: includes/class-wc-gateway-ppec-api-error.php:44
251
+ msgid ""
252
+ "The state in your shipping address is not valid. Please double-check your "
253
+ "shipping address and try again."
254
+ msgstr ""
255
+
256
+ #: includes/class-wc-gateway-ppec-api-error.php:45
257
+ msgid ""
258
+ "The ZIP code or postal code in your shipping address is not valid. Please "
259
+ "double-check your shipping address and try again."
260
+ msgstr ""
261
+
262
+ #: includes/class-wc-gateway-ppec-api-error.php:47
263
+ msgid ""
264
+ "PayPal rejected your shipping address because the city, state, and/or ZIP "
265
+ "code are incorrect. Please double-check that they are all spelled "
266
+ "correctly and try again."
267
+ msgstr ""
268
+
269
+ #: includes/class-wc-gateway-ppec-api-error.php:49
270
+ msgid ""
271
+ "Your PayPal payment could not be processed. Please contact PayPal for "
272
+ "assistance."
273
+ msgstr ""
274
+
275
+ #: includes/class-wc-gateway-ppec-api-error.php:51
276
+ msgid ""
277
+ "The redemption code(s) you entered on PayPal cannot be used at this time. "
278
+ "Please return to PayPal and remove them."
279
+ msgstr ""
280
+
281
+ #: includes/class-wc-gateway-ppec-api-error.php:54
282
+ msgid ""
283
+ "Your funding instrument is invalid. Please check out again and select a "
284
+ "new funding source."
285
+ msgstr ""
286
+
287
+ #: includes/class-wc-gateway-ppec-api-error.php:55
288
+ msgid ""
289
+ "An error (%s) occurred while processing your PayPal payment. Please "
290
+ "contact the store owner for assistance."
291
+ msgstr ""
292
+
293
+ #: includes/class-wc-gateway-ppec-cart-handler.php:74
294
+ msgid "&mdash; or &mdash;"
295
+ msgstr ""
296
+
297
+ #: includes/class-wc-gateway-ppec-cart-handler.php:79
298
+ #: includes/class-wc-gateway-ppec-cart-handler.php:97
299
+ msgid "Check out with PayPal"
300
+ msgstr ""
301
+
302
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:66
303
+ msgid "Confirm your PayPal order"
304
+ msgstr ""
305
+
306
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:100
307
+ msgid "Billing details"
308
+ msgstr ""
309
+
310
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:103
311
+ msgid "Address:"
312
+ msgstr ""
313
+
314
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:105
315
+ msgid "Name:"
316
+ msgstr ""
317
+
318
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:109
319
+ msgid "Email:"
320
+ msgstr ""
321
+
322
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:113
323
+ msgid "Tel:"
324
+ msgstr ""
325
+
326
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:131
327
+ msgid "Shipping details"
328
+ msgstr ""
329
+
330
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:198
331
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:235
332
+ msgid "Your PayPal checkout session has expired. Please check out again."
333
+ msgstr ""
334
+
335
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:230
336
+ msgid ""
337
+ "Sorry, an error occurred while trying to retrieve your information from "
338
+ "PayPal. Please try again."
339
+ msgstr ""
340
+
341
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:282
342
+ msgid "Cancel"
343
+ msgstr ""
344
+
345
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:290
346
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:291
347
+ msgid ""
348
+ "You have cancelled Checkout with PayPal. Please try to process your order "
349
+ "again."
350
+ msgstr ""
351
+
352
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:644
353
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:189
354
+ msgid ""
355
+ "Payment authorized. Change payment status to processing or complete to "
356
+ "capture funds."
357
+ msgstr ""
358
+
359
+ #: includes/class-wc-gateway-ppec-checkout-handler.php:646
360
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:191
361
+ msgid "Payment pending (%s)."
362
+ msgstr ""
363
+
364
+ #: includes/class-wc-gateway-ppec-client-credential-certificate.php:66
365
+ msgid "Unable to accept certificate during cURL configuration"
366
+ msgstr ""
367
+
368
+ #: includes/class-wc-gateway-ppec-client-credential-certificate.php:70
369
+ msgid "Unable to accept certificate password during cURL configuration"
370
+ msgstr ""
371
+
372
+ #: includes/class-wc-gateway-ppec-client-credential-certificate.php:87
373
+ #: includes/class-wc-gateway-ppec-client-credential-certificate.php:133
374
+ msgid "Unable to write certificate file %s during cURL configuration"
375
+ msgstr ""
376
+
377
+ #: includes/class-wc-gateway-ppec-client-credential-certificate.php:113
378
+ msgid "Failed to retrieve private key during cURL configuration"
379
+ msgstr ""
380
+
381
+ #: includes/class-wc-gateway-ppec-client-credential-certificate.php:117
382
+ msgid "Failed to export PKCS12 file during cURL configuration"
383
+ msgstr ""
384
+
385
+ #: includes/class-wc-gateway-ppec-client.php:121
386
+ msgid "Missing credential"
387
+ msgstr ""
388
+
389
+ #: includes/class-wc-gateway-ppec-client.php:125
390
+ msgid "Invalid credential object"
391
+ msgstr ""
392
+
393
+ #: includes/class-wc-gateway-ppec-client.php:129
394
+ msgid "Invalid environment"
395
+ msgstr ""
396
+
397
+ #: includes/class-wc-gateway-ppec-client.php:152
398
+ msgid "An error occurred while trying to connect to PayPal: %s"
399
+ msgstr ""
400
+
401
+ #: includes/class-wc-gateway-ppec-client.php:158
402
+ msgid "Malformed response received from PayPal"
403
+ msgstr ""
404
+
405
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:30
406
+ msgid "Empty POST data."
407
+ msgstr ""
408
+
409
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:39
410
+ msgid "Invalid IPN request."
411
+ msgstr ""
412
+
413
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:44
414
+ msgid "PayPal IPN Request Failure"
415
+ msgstr ""
416
+
417
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:144
418
+ msgid "Validation error: PayPal currencies do not match (code %s)."
419
+ msgstr ""
420
+
421
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:159
422
+ msgid "Validation error: PayPal amounts do not match (gross %s)."
423
+ msgstr ""
424
+
425
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:182
426
+ msgid "IPN payment completed"
427
+ msgstr ""
428
+
429
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:213
430
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:256
431
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:271
432
+ msgid "Payment %s via IPN."
433
+ msgstr ""
434
+
435
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:258
436
+ msgid "Payment for order %s refunded"
437
+ msgstr ""
438
+
439
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:259
440
+ msgid "Order #%s has been marked as refunded - PayPal reason code: %s"
441
+ msgstr ""
442
+
443
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:273
444
+ msgid "Payment for order %s reversed"
445
+ msgstr ""
446
+
447
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:274
448
+ msgid "Order #%s has been marked on-hold due to a reversal - PayPal reason code: %s"
449
+ msgstr ""
450
+
451
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:286
452
+ msgid "Reversal cancelled for order #%s"
453
+ msgstr ""
454
+
455
+ #: includes/class-wc-gateway-ppec-ipn-handler.php:287
456
+ msgid ""
457
+ "Order #%s has had a reversal cancelled. Please check the status of payment "
458
+ "and update the order status accordingly here: %s"
459
+ msgstr ""
460
+
461
+ #: includes/class-wc-gateway-ppec-ips-handler.php:140
462
+ msgid "Invalid connection request"
463
+ msgstr ""
464
+
465
+ #: includes/class-wc-gateway-ppec-ips-handler.php:150
466
+ #: includes/class-wc-gateway-ppec-ips-handler.php:158
467
+ msgid "Sorry, Easy Setup encountered an error. Please try again."
468
+ msgstr ""
469
+
470
+ #: includes/class-wc-gateway-ppec-ips-handler.php:173
471
+ msgid ""
472
+ "Easy Setup was able to obtain your API credentials, but was unable to "
473
+ "verify that they work correctly. Please make sure your PayPal account is "
474
+ "set up properly and try Easy Setup again."
475
+ msgstr ""
476
+
477
+ #: includes/class-wc-gateway-ppec-ips-handler.php:178
478
+ msgid ""
479
+ "Easy Setup was able to obtain your API credentials, but an error occurred "
480
+ "while trying to verify that they work correctly. Please try Easy Setup "
481
+ "again."
482
+ msgstr ""
483
+
484
+ #: includes/class-wc-gateway-ppec-ips-handler.php:183
485
+ msgid "Success! Your PayPal account has been set up successfully."
486
+ msgstr ""
487
+
488
+ #: includes/class-wc-gateway-ppec-plugin.php:153
489
+ msgid ""
490
+ "%s in WooCommerce Gateway PayPal Express Checkout plugin can only be called "
491
+ "once"
492
+ msgstr ""
493
+
494
+ #: includes/class-wc-gateway-ppec-plugin.php:208
495
+ msgid ""
496
+ "WooCommerce Gateway PayPal Express Checkout requires WooCommerce to be "
497
+ "activated"
498
+ msgstr ""
499
+
500
+ #: includes/class-wc-gateway-ppec-plugin.php:212
501
+ msgid ""
502
+ "WooCommerce Gateway PayPal Express Checkout requires WooCommerce version "
503
+ "2.5 or greater"
504
+ msgstr ""
505
+
506
+ #: includes/class-wc-gateway-ppec-plugin.php:216
507
+ msgid ""
508
+ "WooCommerce Gateway PayPal Express Checkout requires cURL to be installed "
509
+ "on your server"
510
+ msgstr ""
511
+
512
+ #: includes/class-wc-gateway-ppec-plugin.php:219
513
+ msgid ""
514
+ "WooCommerce Gateway PayPal Express Checkout requires OpenSSL >= 1.0.1 to be "
515
+ "installed on your server"
516
+ msgstr ""
517
+
518
+ #: includes/functions.php:45
519
+ msgid "Payment error:"
520
+ msgstr ""
521
+
522
+ #: includes/settings/settings-ppec.php:15
523
+ msgid "Setup or link an existing PayPal account"
524
+ msgstr ""
525
+
526
+ #: includes/settings/settings-ppec.php:16
527
+ msgid ""
528
+ "%s or <a href=\"#\" class=\"ppec-toggle-settings\">click here to toggle "
529
+ "manual API credential input</a>."
530
+ msgstr ""
531
+
532
+ #: includes/settings/settings-ppec.php:22
533
+ msgid "Setup or link an existing PayPal Sandbox account"
534
+ msgstr ""
535
+
536
+ #: includes/settings/settings-ppec.php:23
537
+ msgid ""
538
+ "%s or <a href=\"#\" class=\"ppec-toggle-sandbox-settings\">click here to "
539
+ "toggle manual API credential input</a>."
540
+ msgstr ""
541
+
542
+ #: includes/settings/settings-ppec.php:91
543
+ msgid "Enable/Disable"
544
+ msgstr ""
545
+
546
+ #: includes/settings/settings-ppec.php:93
547
+ msgid "Enable PayPal Express Checkout"
548
+ msgstr ""
549
+
550
+ #: includes/settings/settings-ppec.php:94
551
+ msgid ""
552
+ "This enables PayPal Express Checkout which allows customers to checkout "
553
+ "directly via PayPal from your cart page."
554
+ msgstr ""
555
+
556
+ #: includes/settings/settings-ppec.php:99
557
+ msgid "Button Size"
558
+ msgstr ""
559
+
560
+ #: includes/settings/settings-ppec.php:102
561
+ msgid ""
562
+ "PayPal offers different sizes of the \"PayPal Checkout\" buttons, allowing "
563
+ "you to select a size that best fits your site's theme. This setting will "
564
+ "allow you to choose which size button(s) appear on your cart page."
565
+ msgstr ""
566
+
567
+ #: includes/settings/settings-ppec.php:106
568
+ msgid "Small"
569
+ msgstr ""
570
+
571
+ #: includes/settings/settings-ppec.php:107
572
+ msgid "Medium"
573
+ msgstr ""
574
+
575
+ #: includes/settings/settings-ppec.php:108
576
+ msgid "Large"
577
+ msgstr ""
578
+
579
+ #: includes/settings/settings-ppec.php:112
580
+ msgid "Environment"
581
+ msgstr ""
582
+
583
+ #: includes/settings/settings-ppec.php:115
584
+ msgid ""
585
+ "This setting specifies whether you will process live transactions, or "
586
+ "whether you will process simulated transactions using the PayPal Sandbox."
587
+ msgstr ""
588
+
589
+ #: includes/settings/settings-ppec.php:119
590
+ msgid "Live"
591
+ msgstr ""
592
+
593
+ #: includes/settings/settings-ppec.php:120
594
+ msgid "Sandbox"
595
+ msgstr ""
596
+
597
+ #: includes/settings/settings-ppec.php:124
598
+ msgid "PayPal Mark"
599
+ msgstr ""
600
+
601
+ #: includes/settings/settings-ppec.php:126
602
+ msgid "Enable the PayPal Mark on regular checkout"
603
+ msgstr ""
604
+
605
+ #: includes/settings/settings-ppec.php:127
606
+ msgid ""
607
+ "This enables the PayPal mark, which can be shown on regular WooCommerce "
608
+ "checkout to use PayPal Express Checkout like a regular WooCommerce gateway."
609
+ msgstr ""
610
+
611
+ #: includes/settings/settings-ppec.php:132
612
+ msgid "Title"
613
+ msgstr ""
614
+
615
+ #: includes/settings/settings-ppec.php:134
616
+ msgid "This controls the title which the user sees during checkout."
617
+ msgstr ""
618
+
619
+ #: includes/settings/settings-ppec.php:139
620
+ msgid "Description"
621
+ msgstr ""
622
+
623
+ #: includes/settings/settings-ppec.php:142
624
+ msgid "This controls the description which the user sees during checkout."
625
+ msgstr ""
626
+
627
+ #: includes/settings/settings-ppec.php:143
628
+ msgid ""
629
+ "Pay using either your PayPal account or credit card. All credit card "
630
+ "payments will be processed by PayPal."
631
+ msgstr ""
632
+
633
+ #: includes/settings/settings-ppec.php:147
634
+ msgid "API Credentials"
635
+ msgstr ""
636
+
637
+ #: includes/settings/settings-ppec.php:152
638
+ msgid "Live API Username"
639
+ msgstr ""
640
+
641
+ #: includes/settings/settings-ppec.php:154
642
+ #: includes/settings/settings-ppec.php:161
643
+ #: includes/settings/settings-ppec.php:168
644
+ #: includes/settings/settings-ppec.php:196
645
+ #: includes/settings/settings-ppec.php:203
646
+ #: includes/settings/settings-ppec.php:210
647
+ #: includes/settings/settings-ppec.php:217
648
+ msgid "Get your API credentials from PayPal."
649
+ msgstr ""
650
+
651
+ #: includes/settings/settings-ppec.php:159
652
+ msgid "Live API Password"
653
+ msgstr ""
654
+
655
+ #: includes/settings/settings-ppec.php:166
656
+ msgid "Live API Signature"
657
+ msgstr ""
658
+
659
+ #: includes/settings/settings-ppec.php:171
660
+ msgid "Optional if you provide a certificate below"
661
+ msgstr ""
662
+
663
+ #: includes/settings/settings-ppec.php:174
664
+ msgid "Live API Certificate"
665
+ msgstr ""
666
+
667
+ #: includes/settings/settings-ppec.php:180
668
+ msgid "Live API Subject"
669
+ msgstr ""
670
+
671
+ #: includes/settings/settings-ppec.php:182
672
+ #: includes/settings/settings-ppec.php:224
673
+ msgid ""
674
+ "If you're processing transactions on behalf of someone else's PayPal "
675
+ "account, enter their email address or Secure Merchant Account ID (also "
676
+ "known as a Payer ID) here. Generally, you must have API permissions in "
677
+ "place with the other account in order to process anything other than "
678
+ "\"sale\" transactions for them."
679
+ msgstr ""
680
+
681
+ #: includes/settings/settings-ppec.php:185
682
+ #: includes/settings/settings-ppec.php:227
683
+ #: includes/settings/settings-ppec.php:284
684
+ msgid "Optional"
685
+ msgstr ""
686
+
687
+ #: includes/settings/settings-ppec.php:189
688
+ msgid "Sandbox API Credentials"
689
+ msgstr ""
690
+
691
+ #: includes/settings/settings-ppec.php:194
692
+ msgid "Sandbox API Username"
693
+ msgstr ""
694
+
695
+ #: includes/settings/settings-ppec.php:201
696
+ msgid "Sandbox API Password"
697
+ msgstr ""
698
+
699
+ #: includes/settings/settings-ppec.php:208
700
+ msgid "Sandbox API Signature"
701
+ msgstr ""
702
+
703
+ #: includes/settings/settings-ppec.php:215
704
+ msgid "Sandbox API Certificate"
705
+ msgstr ""
706
+
707
+ #: includes/settings/settings-ppec.php:222
708
+ msgid "Sandbox API Subject"
709
+ msgstr ""
710
+
711
+ #: includes/settings/settings-ppec.php:231
712
+ msgid "Advanced Settings"
713
+ msgstr ""
714
+
715
+ #: includes/settings/settings-ppec.php:236
716
+ msgid "Debug Log"
717
+ msgstr ""
718
+
719
+ #: includes/settings/settings-ppec.php:238
720
+ msgid "Enable Logging"
721
+ msgstr ""
722
+
723
+ #: includes/settings/settings-ppec.php:241
724
+ msgid "Log PayPal events, such as IPN requests."
725
+ msgstr ""
726
+
727
+ #: includes/settings/settings-ppec.php:244
728
+ msgid "Invoice Prefix"
729
+ msgstr ""
730
+
731
+ #: includes/settings/settings-ppec.php:246
732
+ msgid ""
733
+ "Please enter a prefix for your invoice numbers. If you use your PayPal "
734
+ "account for multiple stores ensure this prefix is unique as PayPal will not "
735
+ "allow orders with the same invoice number."
736
+ msgstr ""
737
+
738
+ #: includes/settings/settings-ppec.php:251
739
+ msgid "Billing Addresses"
740
+ msgstr ""
741
+
742
+ #: includes/settings/settings-ppec.php:253
743
+ msgid "Require Billing Address"
744
+ msgstr ""
745
+
746
+ #: includes/settings/settings-ppec.php:256
747
+ msgid ""
748
+ "PayPal does not share buyer billing details with you. However, there are "
749
+ "times when you must collect the buyer billing address to fulfill an "
750
+ "essential business function (such as determining whether you must charge "
751
+ "the buyer tax). Enable this function to collect the address before payment "
752
+ "is taken."
753
+ msgstr ""
754
+
755
+ #: includes/settings/settings-ppec.php:259
756
+ msgid "Payment Action"
757
+ msgstr ""
758
+
759
+ #: includes/settings/settings-ppec.php:262
760
+ msgid ""
761
+ "Choose whether you wish to capture funds immediately or authorize payment "
762
+ "only."
763
+ msgstr ""
764
+
765
+ #: includes/settings/settings-ppec.php:266
766
+ msgid "Sale"
767
+ msgstr ""
768
+
769
+ #: includes/settings/settings-ppec.php:267
770
+ msgid "Authorize"
771
+ msgstr ""
772
+
773
+ #: includes/settings/settings-ppec.php:271
774
+ msgid "Instant Payments"
775
+ msgstr ""
776
+
777
+ #: includes/settings/settings-ppec.php:273
778
+ msgid "Require Instant Payment"
779
+ msgstr ""
780
+
781
+ #: includes/settings/settings-ppec.php:276
782
+ msgid ""
783
+ "If you enable this setting, PayPal will be instructed not to allow the "
784
+ "buyer to use funding sources that take additional time to complete (for "
785
+ "example, eChecks). Instead, the buyer will be required to use an instant "
786
+ "funding source, such as an instant transfer, a credit/debit card, or PayPal "
787
+ "Credit."
788
+ msgstr ""
789
+
790
+ #: includes/settings/settings-ppec.php:279
791
+ msgid "Logo Image URL"
792
+ msgstr ""
793
+
794
+ #: includes/settings/settings-ppec.php:281
795
+ msgid ""
796
+ "If you want PayPal to co-brand the checkout page with your logo, enter the "
797
+ "URL of your logo image here.<br/>The image must be no larger than 190x60, "
798
+ "GIF, PNG, or JPG format, and should be served over HTTPS."
799
+ msgstr ""
800
+
801
+ #: includes/settings/settings-ppec.php:287
802
+ msgid "Subtotal Mismatch Behavior"
803
+ msgstr ""
804
+
805
+ #: includes/settings/settings-ppec.php:290
806
+ msgid ""
807
+ "Internally, WC calculates line item prices and taxes out to four decimal "
808
+ "places; however, PayPal can only handle amounts out to two decimal places "
809
+ "(or, depending on the currency, no decimal places at all). Occasionally, "
810
+ "this can cause discrepancies between the way WooCommerce calculates prices "
811
+ "versus the way PayPal calculates them. If a mismatch occurs, this option "
812
+ "controls how the order is dealt with so payment can still be taken."
813
+ msgstr ""
814
+
815
+ #: includes/settings/settings-ppec.php:294
816
+ msgid "Add another line item"
817
+ msgstr ""
818
+
819
+ #: includes/settings/settings-ppec.php:295
820
+ msgid "Do not send line items to PayPal"
821
+ msgstr ""
822
+
823
+ #. Plugin Name of the plugin/theme
824
+ msgid "WooCommerce PayPal Express Checkout Gateway"
825
+ msgstr ""
826
+
827
+ #. Plugin URI of the plugin/theme
828
+ msgid ""
829
+ "https://www.woothemes.com/products/woocommerce-gateway-paypal-express-"
830
+ "checkout/"
831
+ msgstr ""
832
+
833
+ #. Description of the plugin/theme
834
+ msgid ""
835
+ "A payment gateway for PayPal Express Checkout "
836
+ "(https://www.paypal.com/us/webapps/mpp/express-checkout)."
837
+ msgstr ""
838
+
839
+ #. Author of the plugin/theme
840
+ msgid "Automattic"
841
+ msgstr ""
842
+
843
+ #. Author URI of the plugin/theme
844
+ msgid "https://woocommerce.com"
845
+ msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic, woothemes, akeda, dwainm, royho, allendav, slash1andy,
3
  Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal
4
  Requires at least: 4.4
5
  Tested up to: 4.4
6
- Stable tag: 1.1.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -85,6 +85,11 @@ https://gist.github.com/mikejolley/ad2ecc286c9ad6cefbb7065ba6dfef48
85
 
86
  == Changelog ==
87
 
 
 
 
 
 
88
  = 1.1.1 =
89
  * Fixed fatal error prior to PHP 5.5 caused by passing empty() a non-variables.
90
 
3
  Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal
4
  Requires at least: 4.4
5
  Tested up to: 4.4
6
+ Stable tag: 1.1.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
85
 
86
  == Changelog ==
87
 
88
+ = 1.1.2 =
89
+ * Fix - Make sure translations are loaded properly.
90
+ * Fix - Added IPN (Instant Payment Notification) handler.
91
+ * Fix - Make sure guest payment is enabled by default.
92
+
93
  = 1.1.1 =
94
  * Fixed fatal error prior to PHP 5.5 caused by passing empty() a non-variables.
95
 
woocommerce-gateway-paypal-express-checkout.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce PayPal Express Checkout Gateway
4
  * Plugin URI: https://www.woothemes.com/products/woocommerce-gateway-paypal-express-checkout/
5
  * Description: A payment gateway for PayPal Express Checkout (https://www.paypal.com/us/webapps/mpp/express-checkout).
6
- * Version: 1.1.1
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Copyright: © 2016 WooCommerce / PayPal.
@@ -36,7 +36,7 @@ function wc_gateway_ppec() {
36
  if ( ! isset( $plugin ) ) {
37
  require_once( 'includes/class-wc-gateway-ppec-plugin.php' );
38
 
39
- $plugin = new WC_Gateway_PPEC_Plugin( __FILE__, '1.1.1' );
40
  }
41
 
42
  return $plugin;
3
  * Plugin Name: WooCommerce PayPal Express Checkout Gateway
4
  * Plugin URI: https://www.woothemes.com/products/woocommerce-gateway-paypal-express-checkout/
5
  * Description: A payment gateway for PayPal Express Checkout (https://www.paypal.com/us/webapps/mpp/express-checkout).
6
+ * Version: 1.1.2
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Copyright: © 2016 WooCommerce / PayPal.
36
  if ( ! isset( $plugin ) ) {
37
  require_once( 'includes/class-wc-gateway-ppec-plugin.php' );
38
 
39
+ $plugin = new WC_Gateway_PPEC_Plugin( __FILE__, '1.1.2' );
40
  }
41
 
42
  return $plugin;