mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
rename plugin and slug to PayPal Payments for WooCommerce
This commit is contained in:
parent
806c211e35
commit
5e011b4f95
54 changed files with 470 additions and 470 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "inpsyde/paypal-for-woocommerce",
|
||||
"name": "inpsyde/paypal-payments-for-woocommerce",
|
||||
"type": "wordpress-plugin",
|
||||
"description": "PayPal Commerce Platform for WooCommerce",
|
||||
"license": "GPL-2.0",
|
||||
|
|
|
@ -122,7 +122,7 @@ class PayPalBearer implements Bearer {
|
|||
|
||||
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not create token.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not create token.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
|
|
@ -94,7 +94,7 @@ class IdentityToken {
|
|||
$error = new RuntimeException(
|
||||
__(
|
||||
'Could not create identity token.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ class LoginSeller {
|
|||
$response = $this->request( $url, $args );
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not fetch credentials.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not fetch credentials.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -109,7 +109,7 @@ class LoginSeller {
|
|||
$json,
|
||||
$status_code
|
||||
) : new RuntimeException(
|
||||
__( 'Credentials not found.', 'paypal-for-woocommerce' )
|
||||
__( 'Credentials not found.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -158,7 +158,7 @@ class LoginSeller {
|
|||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not create token.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not create token.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -179,7 +179,7 @@ class LoginSeller {
|
|||
$json,
|
||||
$status_code
|
||||
) : new RuntimeException(
|
||||
__( 'No token found.', 'paypal-for-woocommerce' )
|
||||
__( 'No token found.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
|
|
@ -226,7 +226,7 @@ class OrderEndpoint {
|
|||
$response = $this->request( $url, $args );
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not create order.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not create order.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -290,7 +290,7 @@ class OrderEndpoint {
|
|||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not capture order.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not capture order.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -357,7 +357,7 @@ class OrderEndpoint {
|
|||
$error = new RuntimeException(
|
||||
__(
|
||||
'Could not authorize order.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
)
|
||||
);
|
||||
$this->logger->log(
|
||||
|
@ -418,7 +418,7 @@ class OrderEndpoint {
|
|||
$response = $this->request( $url, $args );
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not retrieve order.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not retrieve order.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -434,7 +434,7 @@ class OrderEndpoint {
|
|||
$status_code = (int) wp_remote_retrieve_response_code( $response );
|
||||
if ( 404 === $status_code || empty( $response['body'] ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not retrieve order.', 'paypal-for-woocommerce' ),
|
||||
__( 'Could not retrieve order.', 'paypal-payments-for-woocommerce' ),
|
||||
404
|
||||
);
|
||||
$this->logger->log(
|
||||
|
@ -502,7 +502,7 @@ class OrderEndpoint {
|
|||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not retrieve order.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not retrieve order.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
|
|
@ -94,7 +94,7 @@ class PartnerReferrals {
|
|||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not create referral.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not create referral.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -131,7 +131,7 @@ class PartnerReferrals {
|
|||
}
|
||||
|
||||
$error = new RuntimeException(
|
||||
__( 'Action URL not found.', 'paypal-for-woocommerce' )
|
||||
__( 'Action URL not found.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
|
|
@ -96,7 +96,7 @@ class PaymentsEndpoint {
|
|||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not get authorized payment info.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not get authorized payment info.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -155,7 +155,7 @@ class PaymentsEndpoint {
|
|||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not capture authorized payment.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not capture authorized payment.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
|
|
@ -105,7 +105,7 @@ class PaymentTokenEndpoint {
|
|||
$response = $this->request( $url, $args );
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not fetch payment token.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not fetch payment token.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -143,7 +143,7 @@ class PaymentTokenEndpoint {
|
|||
$error = new RuntimeException(
|
||||
sprintf(
|
||||
// translators: %d is the customer id.
|
||||
__( 'No token stored for customer %d.', 'paypal-for-woocommerce' ),
|
||||
__( 'No token stored for customer %d.', 'paypal-payments-for-woocommerce' ),
|
||||
$id
|
||||
)
|
||||
);
|
||||
|
@ -185,7 +185,7 @@ class PaymentTokenEndpoint {
|
|||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not delete payment token.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not delete payment token.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
|
|
@ -101,7 +101,7 @@ class WebhookEndpoint {
|
|||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Not able to create a webhook.', 'paypal-for-woocommerce' )
|
||||
__( 'Not able to create a webhook.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -161,7 +161,7 @@ class WebhookEndpoint {
|
|||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Not able to delete the webhook.', 'paypal-for-woocommerce' )
|
||||
__( 'Not able to delete the webhook.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -223,7 +223,7 @@ class WebhookEndpoint {
|
|||
$response = $this->request( $url, $args );
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Not able to verify webhook event.', 'paypal-for-woocommerce' )
|
||||
__( 'Not able to verify webhook event.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'warning',
|
||||
|
@ -251,7 +251,7 @@ class WebhookEndpoint {
|
|||
|
||||
if ( ! $webhook->id() ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Not a valid webhook to verify.', 'paypal-for-woocommerce' )
|
||||
__( 'Not a valid webhook to verify.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log( 'warning', $error->getMessage(), array( 'webhook' => $webhook ) );
|
||||
throw $error;
|
||||
|
@ -282,7 +282,7 @@ class WebhookEndpoint {
|
|||
// translators: %s is the headers key.
|
||||
__(
|
||||
'Not a valid webhook event. Header %s is missing',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
$key
|
||||
)
|
||||
|
|
|
@ -55,7 +55,7 @@ class AuthorizationStatus {
|
|||
throw new RuntimeException(
|
||||
sprintf(
|
||||
// translators: %s is the current status.
|
||||
__( '%s is not a valid status', 'paypal-for-woocommerce' ),
|
||||
__( '%s is not a valid status', 'paypal-payments-for-woocommerce' ),
|
||||
$status
|
||||
)
|
||||
);
|
||||
|
|
|
@ -50,7 +50,7 @@ class OrderStatus {
|
|||
throw new RuntimeException(
|
||||
sprintf(
|
||||
// translators: %s is the current status.
|
||||
__( '%s is not a valid status', 'paypal-for-woocommerce' ),
|
||||
__( '%s is not a valid status', 'paypal-payments-for-woocommerce' ),
|
||||
$status
|
||||
)
|
||||
);
|
||||
|
|
|
@ -52,7 +52,7 @@ class PayerTaxInfo {
|
|||
throw new RuntimeException(
|
||||
sprintf(
|
||||
// translators: %s is the current type.
|
||||
__( '%s is not a valid tax type.', 'paypal-for-woocommerce' ),
|
||||
__( '%s is not a valid tax type.', 'paypal-payments-for-woocommerce' ),
|
||||
$type
|
||||
)
|
||||
);
|
||||
|
|
|
@ -46,7 +46,7 @@ class PaymentToken {
|
|||
public function __construct( string $id, string $type = self::TYPE_PAYMENT_METHOD_TOKEN ) {
|
||||
if ( ! in_array( $type, self::VALID_TYPES, true ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'Not a valid payment source type.', 'paypal-for-woocommerce' )
|
||||
__( 'Not a valid payment source type.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
$this->id = $id;
|
||||
|
|
|
@ -41,11 +41,11 @@ class PayPalApiException extends RuntimeException {
|
|||
if ( ! isset( $response->message ) ) {
|
||||
$response->message = __(
|
||||
'Unknown error while connecting to PayPal.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
}
|
||||
if ( ! isset( $response->name ) ) {
|
||||
$response->name = __( 'Error', 'paypal-for-woocommerce' );
|
||||
$response->name = __( 'Error', 'paypal-payments-for-woocommerce' );
|
||||
}
|
||||
if ( ! isset( $response->details ) ) {
|
||||
$response->details = array();
|
||||
|
|
|
@ -71,7 +71,7 @@ class AddressFactory {
|
|||
public function from_paypal_response( \stdClass $data ): Address {
|
||||
if ( ! isset( $data->country_code ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No country given for address.', 'paypal-for-woocommerce' )
|
||||
__( 'No country given for address.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
return new Address(
|
||||
|
|
|
@ -153,11 +153,11 @@ class AmountFactory {
|
|||
*/
|
||||
public function from_paypal_response( \stdClass $data ): Amount {
|
||||
if ( ! isset( $data->value ) || ! is_numeric( $data->value ) ) {
|
||||
throw new RuntimeException( __( 'No value given', 'paypal-for-woocommerce' ) );
|
||||
throw new RuntimeException( __( 'No value given', 'paypal-payments-for-woocommerce' ) );
|
||||
}
|
||||
if ( ! isset( $data->currency_code ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No currency given', 'paypal-for-woocommerce' )
|
||||
__( 'No currency given', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ class AmountFactory {
|
|||
throw new RuntimeException(
|
||||
sprintf(
|
||||
// translators: %s is the current breakdown key.
|
||||
__( 'No value given for breakdown %s', 'paypal-for-woocommerce' ),
|
||||
__( 'No value given for breakdown %s', 'paypal-payments-for-woocommerce' ),
|
||||
$key
|
||||
)
|
||||
);
|
||||
|
@ -209,7 +209,7 @@ class AmountFactory {
|
|||
throw new RuntimeException(
|
||||
sprintf(
|
||||
// translators: %s is the current breakdown key.
|
||||
__( 'No currency given for breakdown %s', 'paypal-for-woocommerce' ),
|
||||
__( 'No currency given for breakdown %s', 'paypal-payments-for-woocommerce' ),
|
||||
$key
|
||||
)
|
||||
);
|
||||
|
|
|
@ -29,13 +29,13 @@ class AuthorizationFactory {
|
|||
public function from_paypal_response( \stdClass $data ): Authorization {
|
||||
if ( ! isset( $data->id ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'Does not contain an id.', 'paypal-for-woocommerce' )
|
||||
__( 'Does not contain an id.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! isset( $data->status ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'Does not contain status.', 'paypal-for-woocommerce' )
|
||||
__( 'Does not contain status.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -120,17 +120,17 @@ class ItemFactory {
|
|||
public function from_paypal_response( \stdClass $data ): Item {
|
||||
if ( ! isset( $data->name ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No name for item given', 'paypal-for-woocommerce' )
|
||||
__( 'No name for item given', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
if ( ! isset( $data->quantity ) || ! is_numeric( $data->quantity ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No quantity for item given', 'paypal-for-woocommerce' )
|
||||
__( 'No quantity for item given', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
if ( ! isset( $data->unit_amount->value ) || ! isset( $data->unit_amount->currency_code ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No money values for item given', 'paypal-for-woocommerce' )
|
||||
__( 'No money values for item given', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -114,22 +114,22 @@ class OrderFactory {
|
|||
public function from_paypal_response( \stdClass $order_data ): Order {
|
||||
if ( ! isset( $order_data->id ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'Order does not contain an id.', 'paypal-for-woocommerce' )
|
||||
__( 'Order does not contain an id.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
if ( ! isset( $order_data->purchase_units ) || ! is_array( $order_data->purchase_units ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'Order does not contain items.', 'paypal-for-woocommerce' )
|
||||
__( 'Order does not contain items.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
if ( ! isset( $order_data->status ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'Order does not contain status.', 'paypal-for-woocommerce' )
|
||||
__( 'Order does not contain status.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
if ( ! isset( $order_data->intent ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'Order does not contain intent.', 'paypal-for-woocommerce' )
|
||||
__( 'Order does not contain intent.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class PayeeFactory {
|
|||
public function from_paypal_response( \stdClass $data ): ?Payee {
|
||||
if ( ! isset( $data->email_address ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No email for payee given.', 'paypal-for-woocommerce' )
|
||||
__( 'No email for payee given.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class PaymentTokenFactory {
|
|||
public function from_paypal_response( \stdClass $data ): PaymentToken {
|
||||
if ( ! isset( $data->id ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No id for payment token given', 'paypal-for-woocommerce' )
|
||||
__( 'No id for payment token given', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
return new PaymentToken(
|
||||
|
|
|
@ -194,7 +194,7 @@ class PurchaseUnitFactory {
|
|||
public function from_paypal_response( \stdClass $data ): PurchaseUnit {
|
||||
if ( ! isset( $data->reference_id ) || ! is_string( $data->reference_id ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No reference ID given.', 'paypal-for-woocommerce' )
|
||||
__( 'No reference ID given.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class ShippingFactory {
|
|||
// Replicates the Behavior of \WC_Order::get_formatted_shipping_full_name().
|
||||
$full_name = sprintf(
|
||||
// translators: %1$s is the first name and %2$s is the second name. wc translation.
|
||||
_x( '%1$s %2$s', 'full name', 'paypal-for-woocommerce' ),
|
||||
_x( '%1$s %2$s', 'full name', 'paypal-payments-for-woocommerce' ),
|
||||
$customer->get_shipping_first_name(),
|
||||
$customer->get_shipping_last_name()
|
||||
);
|
||||
|
@ -82,12 +82,12 @@ class ShippingFactory {
|
|||
public function from_paypal_response( \stdClass $data ): Shipping {
|
||||
if ( ! isset( $data->name->full_name ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No name was given for shipping.', 'paypal-for-woocommerce' )
|
||||
__( 'No name was given for shipping.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
if ( ! isset( $data->address ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No address was given for shipping.', 'paypal-for-woocommerce' )
|
||||
__( 'No address was given for shipping.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
$address = $this->address_factory->from_paypal_response( $data->address );
|
||||
|
|
|
@ -60,17 +60,17 @@ class WebhookFactory {
|
|||
public function from_paypal_response( \stdClass $data ): Webhook {
|
||||
if ( ! isset( $data->id ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No id for webhook given.', 'paypal-for-woocommerce' )
|
||||
__( 'No id for webhook given.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
if ( ! isset( $data->url ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No URL for webhook given.', 'paypal-for-woocommerce' )
|
||||
__( 'No URL for webhook given.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
if ( ! isset( $data->event_types ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No event types for webhook given.', 'paypal-for-woocommerce' )
|
||||
__( 'No event types for webhook given.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ class PartnerReferralsData {
|
|||
),
|
||||
'return_url_description' => __(
|
||||
'Return to your shop.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'show_add_credit_card' => true,
|
||||
),
|
||||
|
|
|
@ -494,7 +494,7 @@ class SmartButton implements SmartButtonInterface {
|
|||
>
|
||||
</div>',
|
||||
esc_attr( $id ),
|
||||
esc_html__( 'Save your card', 'paypal-for-woocommerce' )
|
||||
esc_html__( 'Save your card', 'paypal-payments-for-woocommerce' )
|
||||
) : '';
|
||||
|
||||
printf(
|
||||
|
@ -514,12 +514,12 @@ class SmartButton implements SmartButtonInterface {
|
|||
</div>
|
||||
</form><div id="payments-sdk__contingency-lightbox"></div>',
|
||||
esc_attr( $id ),
|
||||
esc_html__( 'Credit Card number', 'paypal-for-woocommerce' ),
|
||||
esc_html__( 'Expiration', 'paypal-for-woocommerce' ),
|
||||
esc_html__( 'CVV', 'paypal-for-woocommerce' ),
|
||||
esc_html__( 'Credit Card number', 'paypal-payments-for-woocommerce' ),
|
||||
esc_html__( 'Expiration', 'paypal-payments-for-woocommerce' ),
|
||||
esc_html__( 'CVV', 'paypal-payments-for-woocommerce' ),
|
||||
//phpcs:ignore
|
||||
$save_card,
|
||||
esc_html__( 'Place order', 'paypal-for-woocommerce' )
|
||||
esc_html__( 'Place order', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -617,10 +617,10 @@ class SmartButton implements SmartButtonInterface {
|
|||
'labels' => array(
|
||||
'credit_card_number' => '',
|
||||
'cvv' => '',
|
||||
'mm_yyyy' => __( 'MM/YYYY', 'paypal-for-woocommerce' ),
|
||||
'mm_yyyy' => __( 'MM/YYYY', 'paypal-payments-for-woocommerce' ),
|
||||
'fields_not_valid' => __(
|
||||
'Unfortunatly, your credit card details are not valid.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -629,7 +629,7 @@ class SmartButton implements SmartButtonInterface {
|
|||
'error' => array(
|
||||
'generic' => __(
|
||||
'Something went wrong. Please try again or choose another payment source.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -94,7 +94,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
|
|||
$data = $this->request_data->read_request( $this->nonce() );
|
||||
if ( ! isset( $data['order_id'] ) ) {
|
||||
throw new RuntimeException(
|
||||
__( 'No order id given', 'paypal-for-woocommerce' )
|
||||
__( 'No order id given', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
|
|||
throw new RuntimeException(
|
||||
sprintf(
|
||||
// translators: %s is the id of the order.
|
||||
__( 'Order %s not found.', 'paypal-for-woocommerce' ),
|
||||
__( 'Order %s not found.', 'paypal-payments-for-woocommerce' ),
|
||||
$data['order_id']
|
||||
)
|
||||
);
|
||||
|
@ -115,7 +115,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
|
|||
throw new RuntimeException(
|
||||
__(
|
||||
'Something went wrong. Please try again.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
|
|||
throw new RuntimeException(
|
||||
__(
|
||||
'Unfortunatly, we can\'t accept your card. Please choose a different payment method.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
|
|||
throw new RuntimeException(
|
||||
sprintf(
|
||||
// translators: %s is the id of the order.
|
||||
__( 'Order %s is not approved yet.', 'paypal-for-woocommerce' ),
|
||||
__( 'Order %s is not approved yet.', 'paypal-payments-for-woocommerce' ),
|
||||
$data['order_id']
|
||||
)
|
||||
);
|
||||
|
|
|
@ -127,7 +127,7 @@ class ChangeCartEndpoint implements EndpointInterface {
|
|||
'name' => '',
|
||||
'message' => __(
|
||||
'Necessary fields not defined. Action aborted.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'code' => 0,
|
||||
'details' => array(),
|
||||
|
@ -166,7 +166,7 @@ class ChangeCartEndpoint implements EndpointInterface {
|
|||
|
||||
$message = __(
|
||||
'Something went wrong. Action aborted',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
$errors = wc_get_notices( 'error' );
|
||||
if ( count( $errors ) ) {
|
||||
|
|
|
@ -48,7 +48,7 @@ class RequestData {
|
|||
) {
|
||||
remove_filter( 'nonce_user_logged_out', array( $this, 'nonce_fix' ), 100 );
|
||||
throw new RuntimeException(
|
||||
__( 'Could not validate nonce.', 'paypal-for-woocommerce' )
|
||||
__( 'Could not validate nonce.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
$this->dequeue_nonce_fix();
|
||||
|
|
|
@ -98,7 +98,7 @@ class OnboardingAssets {
|
|||
'nonce' => wp_create_nonce( $this->login_seller_endpoint::nonce() ),
|
||||
'error' => __(
|
||||
'We could not properly onboard you. Please reload and try again.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
)
|
||||
);
|
||||
|
|
|
@ -55,7 +55,7 @@ class OnboardingRenderer {
|
|||
<?php
|
||||
esc_html_e(
|
||||
'Connect to PayPal',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
?>
|
||||
</a>
|
||||
|
@ -68,7 +68,7 @@ class OnboardingRenderer {
|
|||
} catch ( RuntimeException $exception ) {
|
||||
esc_html_e(
|
||||
'We could not properly connect to PayPal. Please reload the page to continue',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ class CancelView {
|
|||
esc_html__(
|
||||
'You are currently paying with PayPal. If you want to cancel
|
||||
this process, please click %1$shere%2$s.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'<a href="' . esc_url( $url ) . '">',
|
||||
'</a>'
|
||||
|
|
|
@ -94,7 +94,7 @@ class RenewalHandler {
|
|||
'info',
|
||||
sprintf(
|
||||
// translators: %d is the id of the order.
|
||||
__( 'Start moneytransfer for order %d', 'paypal-for-woocommerce' ),
|
||||
__( 'Start moneytransfer for order %d', 'paypal-payments-for-woocommerce' ),
|
||||
(int) $wc_order->get_id()
|
||||
),
|
||||
array(
|
||||
|
@ -111,7 +111,7 @@ class RenewalHandler {
|
|||
// translators: %1$d is the order number, %2$s the error message.
|
||||
__(
|
||||
'An error occured while trying to renew the subscription for order %1$d: %2$s',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
(int) $wc_order->get_id(),
|
||||
$error->getMessage()
|
||||
|
@ -129,7 +129,7 @@ class RenewalHandler {
|
|||
// translators: %d is the order number.
|
||||
__(
|
||||
'Moneytransfer for order %d is completed.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
(int) $wc_order->get_id()
|
||||
),
|
||||
|
@ -183,7 +183,7 @@ class RenewalHandler {
|
|||
// translators: %d is the customer id.
|
||||
__(
|
||||
'No payment token found for customer %d',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
(int) $customer->get_id()
|
||||
),
|
||||
|
@ -208,7 +208,7 @@ class RenewalHandler {
|
|||
if ( $order->intent() === 'CAPTURE' && $order->status()->is( OrderStatus::COMPLETED ) ) {
|
||||
$wc_order->update_status(
|
||||
'processing',
|
||||
__( 'Payment received.', 'paypal-for-woocommerce' )
|
||||
__( 'Payment received.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
\WC_Subscriptions_Manager::process_subscription_payments_on_order( $wc_order );
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -56,7 +56,7 @@ class OrderTablePaymentStatusColumn {
|
|||
$columns = array_merge(
|
||||
array_slice( $columns, 0, $to_insert_position ),
|
||||
array(
|
||||
self::COLUMN_KEY => __( 'Payment Captured', 'paypal-for-woocommerce' ),
|
||||
self::COLUMN_KEY => __( 'Payment Captured', 'paypal-payments-for-woocommerce' ),
|
||||
),
|
||||
array_slice( $columns, $to_insert_position )
|
||||
);
|
||||
|
@ -124,7 +124,7 @@ class OrderTablePaymentStatusColumn {
|
|||
'<span class="dashicons dashicons-yes">
|
||||
<span class="screen-reader-text">%s</span>
|
||||
</span>',
|
||||
esc_html__( 'Payment captured', 'paypal-for-woocommerce' )
|
||||
esc_html__( 'Payment captured', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ class OrderTablePaymentStatusColumn {
|
|||
private function render_incomplete_status() {
|
||||
printf(
|
||||
'<mark class="onbackorder">%s</mark>',
|
||||
esc_html__( 'Not captured', 'paypal-for-woocommerce' )
|
||||
esc_html__( 'Not captured', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,11 +39,11 @@ class PaymentStatusOrderDetail {
|
|||
'<li class="wide"><p><mark class="order-status status-on-hold"><span>%1$s</span></mark></p><p>%2$s</p></li>',
|
||||
esc_html__(
|
||||
'Not captured',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
esc_html__(
|
||||
'To capture the payment select capture action from the list below.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -81,11 +81,11 @@ class CreditCardGateway extends PayPalGateway {
|
|||
|
||||
$this->method_title = __(
|
||||
'PayPal Card Processing',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
$this->method_description = __(
|
||||
'Accept debit and credit cards, and local payment methods with PayPal’s latest solution.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
$this->title = $this->config->has( 'dcc_gateway_title' ) ?
|
||||
$this->config->get( 'dcc_gateway_title' ) : $this->method_title;
|
||||
|
@ -112,9 +112,9 @@ class CreditCardGateway extends PayPalGateway {
|
|||
public function init_form_fields() {
|
||||
$this->form_fields = array(
|
||||
'enabled' => array(
|
||||
'title' => __( 'Enable/Disable', 'paypal-for-woocommerce' ),
|
||||
'title' => __( 'Enable/Disable', 'paypal-payments-for-woocommerce' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable Credit Card Payments', 'paypal-for-woocommerce' ),
|
||||
'label' => __( 'Enable Credit Card Payments', 'paypal-payments-for-woocommerce' ),
|
||||
'default' => 'no',
|
||||
),
|
||||
'ppcp' => array(
|
||||
|
@ -163,37 +163,37 @@ class CreditCardGateway extends PayPalGateway {
|
|||
'visa' => _x(
|
||||
'Visa',
|
||||
'Name of credit card',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'mastercard' => _x(
|
||||
'Mastercard',
|
||||
'Name of credit card',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'amex' => _x(
|
||||
'American Express',
|
||||
'Name of credit card',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'discover' => _x(
|
||||
'Discover',
|
||||
'Name of credit card',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'jcb' => _x(
|
||||
'JCB',
|
||||
'Name of credit card',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'elo' => _x(
|
||||
'Elo',
|
||||
'Name of credit card',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'hiper' => _x(
|
||||
'Hiper',
|
||||
'Name of credit card',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -152,11 +152,11 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
public function init_form_fields() {
|
||||
$this->form_fields = array(
|
||||
'enabled' => array(
|
||||
'title' => __( 'Enable/Disable', 'paypal-for-woocommerce' ),
|
||||
'title' => __( 'Enable/Disable', 'paypal-payments-for-woocommerce' ),
|
||||
'type' => 'checkbox',
|
||||
'desc_tip' => true,
|
||||
'description' => __( 'In order to use PayPal or PayPal Card Processing, you need to enable the Gateway.', 'paypal-for-woocommerce' ),
|
||||
'label' => __( 'Enable the PayPal Gateway', 'paypal-for-woocommerce' ),
|
||||
'description' => __( 'In order to use PayPal or PayPal Card Processing, you need to enable the Gateway.', 'paypal-payments-for-woocommerce' ),
|
||||
'label' => __( 'Enable the PayPal Gateway', 'paypal-payments-for-woocommerce' ),
|
||||
'default' => 'no',
|
||||
),
|
||||
'ppcp' => array(
|
||||
|
@ -212,7 +212,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
if ( $this->session_handler->insufficient_funding_tries() >= 3 ) {
|
||||
$this->session_handler->destroy_session_data();
|
||||
wc_add_notice(
|
||||
__( 'Please use a different payment method.', 'paypal-for-woocommerce' ),
|
||||
__( 'Please use a different payment method.', 'paypal-payments-for-woocommerce' ),
|
||||
'error'
|
||||
);
|
||||
return null;
|
||||
|
@ -246,7 +246,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
|
||||
if ( $is_processed ) {
|
||||
$wc_order->add_order_note(
|
||||
__( 'Payment successfully captured.', 'paypal-for-woocommerce' )
|
||||
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
|
||||
$wc_order->set_status( 'processing' );
|
||||
|
@ -258,7 +258,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
if ( $this->authorized_payments->last_status() === AuthorizedPaymentsProcessor::ALREADY_CAPTURED ) {
|
||||
if ( $wc_order->get_status() === 'on-hold' ) {
|
||||
$wc_order->add_order_note(
|
||||
__( 'Payment successfully captured.', 'paypal-for-woocommerce' )
|
||||
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$wc_order->set_status( 'processing' );
|
||||
}
|
||||
|
@ -310,12 +310,12 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
*/
|
||||
private function define_method_title(): string {
|
||||
if ( $this->is_credit_card_tab() ) {
|
||||
return __( 'PayPal Card Processing', 'paypal-for-woocommerce' );
|
||||
return __( 'PayPal Card Processing', 'paypal-payments-for-woocommerce' );
|
||||
}
|
||||
if ( $this->is_paypal_tab() ) {
|
||||
return __( 'PayPal Checkout', 'paypal-for-woocommerce' );
|
||||
return __( 'PayPal Checkout', 'paypal-payments-for-woocommerce' );
|
||||
}
|
||||
return __( 'PayPal', 'paypal-for-woocommerce' );
|
||||
return __( 'PayPal', 'paypal-payments-for-woocommerce' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -327,13 +327,13 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
if ( $this->is_credit_card_tab() ) {
|
||||
return __(
|
||||
'Accept debit and credit cards, and local payment methods with PayPal’s latest solution.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
}
|
||||
|
||||
return __(
|
||||
'Accept PayPal, PayPal Credit and alternative payment types with PayPal’s latest solution.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,35 +48,35 @@ class AuthorizeOrderActionNotice {
|
|||
$messages[ self::NO_INFO ] = array(
|
||||
'message' => __(
|
||||
'Could not retrieve information. Try again later.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'type' => 'error',
|
||||
);
|
||||
$messages[ self::ALREADY_CAPTURED ] = array(
|
||||
'message' => __(
|
||||
'Payment already captured.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'type' => 'error',
|
||||
);
|
||||
$messages[ self::FAILED ] = array(
|
||||
'message' => __(
|
||||
'Failed to capture. Try again later.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'type' => 'error',
|
||||
);
|
||||
$messages[ self::NOT_FOUND ] = array(
|
||||
'message' => __(
|
||||
'Could not find payment to process.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'type' => 'error',
|
||||
);
|
||||
$messages[ self::SUCCESS ] = array(
|
||||
'message' => __(
|
||||
'Payment successfully captured.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'type' => 'success',
|
||||
);
|
||||
|
|
|
@ -58,7 +58,7 @@ class ConnectAdminNotice {
|
|||
/* translators: %1$s the gateway name. */
|
||||
__(
|
||||
'PayPal Checkout is almost ready. To get started, <a href="%1$s">connect your account</a>.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' )
|
||||
);
|
||||
|
|
|
@ -141,13 +141,13 @@ class OrderProcessor {
|
|||
if ( ! $order || ! $this->order_is_approved( $order ) ) {
|
||||
$error_message = __(
|
||||
'The payment has not been approved yet.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
}
|
||||
if ( $error_message ) {
|
||||
$this->last_error = sprintf(
|
||||
// translators: %s is the message of the error.
|
||||
__( 'Payment error: %s', 'paypal-for-woocommerce' ),
|
||||
__( 'Payment error: %s', 'paypal-payments-for-woocommerce' ),
|
||||
$error_message
|
||||
);
|
||||
return false;
|
||||
|
@ -165,18 +165,18 @@ class OrderProcessor {
|
|||
|
||||
$wc_order->update_status(
|
||||
'on-hold',
|
||||
__( 'Awaiting payment.', 'paypal-for-woocommerce' )
|
||||
__( 'Awaiting payment.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
if ( $order->status()->is( OrderStatus::COMPLETED ) && $order->intent() === 'CAPTURE' ) {
|
||||
$wc_order->update_status(
|
||||
'processing',
|
||||
__( 'Payment received.', 'paypal-for-woocommerce' )
|
||||
__( 'Payment received.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
|
||||
if ( $this->capture_authorized_downloads( $order ) && $this->authorized_payments_processor->process( $wc_order ) ) {
|
||||
$wc_order->add_order_note(
|
||||
__( 'Payment successfully captured.', 'paypal-for-woocommerce' )
|
||||
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$wc_order->update_meta_data( PayPalGateway::CAPTURED_META_KEY, 'true' );
|
||||
$wc_order->update_status( 'processing' );
|
||||
|
|
|
@ -41,8 +41,8 @@ class SectionsRenderer {
|
|||
//phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
$current = ! isset( $_GET[ self::KEY ] ) ? PayPalGateway::ID : sanitize_text_field( wp_unslash( $_GET[ self::KEY ] ) );
|
||||
$sections = array(
|
||||
PayPalGateway::ID => __( 'PayPal Checkout', 'paypal-for-woocommerce' ),
|
||||
CreditCardGateway::ID => __( 'PayPal Card Processing', 'paypal-for-woocommerce' ),
|
||||
PayPalGateway::ID => __( 'PayPal Checkout', 'paypal-payments-for-woocommerce' ),
|
||||
CreditCardGateway::ID => __( 'PayPal Card Processing', 'paypal-payments-for-woocommerce' ),
|
||||
);
|
||||
|
||||
echo '<ul class="subsubsub">';
|
||||
|
|
|
@ -97,19 +97,19 @@ class Settings implements ContainerInterface {
|
|||
$this->settings = get_option( self::KEY, array() );
|
||||
|
||||
$defaults = array(
|
||||
'title' => __( 'PayPal', 'paypal-for-woocommerce' ),
|
||||
'title' => __( 'PayPal', 'paypal-payments-for-woocommerce' ),
|
||||
'description' => __(
|
||||
'Pay via PayPal.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'button_single_product_enabled' => true,
|
||||
'button_mini-cart_enabled' => true,
|
||||
'button_cart_enabled' => true,
|
||||
'brand_name' => get_bloginfo( 'name' ),
|
||||
'dcc_gateway_title' => __( 'Credit Cards', 'paypal-for-woocommerce' ),
|
||||
'dcc_gateway_title' => __( 'Credit Cards', 'paypal-payments-for-woocommerce' ),
|
||||
'dcc_gateway_description' => __(
|
||||
'Pay with your credit card.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
);
|
||||
foreach ( $defaults as $key => $value ) {
|
||||
|
|
|
@ -316,7 +316,7 @@ class SettingsRenderer {
|
|||
private function render_3d_secure_info() {
|
||||
?>
|
||||
<tr>
|
||||
<th><?php esc_html_e( '3D Secure', 'paypal-for-woocommerce' ); ?></th>
|
||||
<th><?php esc_html_e( '3D Secure', 'paypal-payments-for-woocommerce' ); ?></th>
|
||||
<td>
|
||||
<p>
|
||||
<?php
|
||||
|
@ -333,7 +333,7 @@ class SettingsRenderer {
|
|||
an additional layer of verification using Verified by Visa,
|
||||
MasterCard SecureCode and American Express SafeKey.
|
||||
%1$sLearn more about 3D Secure.%2$s',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
'<a href = "#">',
|
||||
'</a>'
|
||||
|
@ -352,20 +352,20 @@ class SettingsRenderer {
|
|||
private function render_dcc_onboarding_info() {
|
||||
?>
|
||||
<tr>
|
||||
<th><?php esc_html_e( 'Onboarding', 'paypal-for-woocommerce' ); ?></th>
|
||||
<th><?php esc_html_e( 'Onboarding', 'paypal-payments-for-woocommerce' ); ?></th>
|
||||
<td class="notice notice-error">
|
||||
<p>
|
||||
<?php
|
||||
esc_html_e(
|
||||
'You need to complete your onboarding, before you can use the PayPal Card Processing option.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
?>
|
||||
|
||||
<a
|
||||
href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' ) ); ?>"
|
||||
>
|
||||
<?php esc_html_e( 'Click here to complete your onboarding.', 'paypal-for-woocommerce' ); ?>
|
||||
<?php esc_html_e( 'Click here to complete your onboarding.', 'paypal-payments-for-woocommerce' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</td>
|
||||
|
@ -379,13 +379,13 @@ class SettingsRenderer {
|
|||
private function render_dcc_does_not_apply_info() {
|
||||
?>
|
||||
<tr>
|
||||
<th><?php esc_html_e( 'Card Processing not available', 'paypal-for-woocommerce' ); ?></th>
|
||||
<th><?php esc_html_e( 'Card Processing not available', 'paypal-payments-for-woocommerce' ); ?></th>
|
||||
<td class="notice notice-error">
|
||||
<p>
|
||||
<?php
|
||||
esc_html_e(
|
||||
'Unfortunatly, the card processing option is not yet available in your country.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
?>
|
||||
|
||||
|
@ -397,7 +397,7 @@ class SettingsRenderer {
|
|||
<?php
|
||||
esc_html_e(
|
||||
'Click here to see, in which countries this option is currently available.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
?>
|
||||
</a>
|
||||
|
|
|
@ -241,7 +241,7 @@ class WcGatewayModule implements ModuleInterface {
|
|||
static function ( $order_actions ): array {
|
||||
$order_actions['ppcp_authorize_order'] = __(
|
||||
'Capture authorized PayPal payment',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
);
|
||||
return $order_actions;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ class CheckoutOrderApproved implements RequestHandler {
|
|||
// translators: %s is the PayPal webhook Id.
|
||||
__(
|
||||
'No order for webhook event %s was found.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
isset( $request['id'] ) ? $request['id'] : ''
|
||||
);
|
||||
|
@ -120,7 +120,7 @@ class CheckoutOrderApproved implements RequestHandler {
|
|||
// translators: %s is the PayPal webhook Id.
|
||||
__(
|
||||
'No paypal payment for webhook event %s was found.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
isset( $request['id'] ) ? $request['id'] : ''
|
||||
);
|
||||
|
@ -143,7 +143,7 @@ class CheckoutOrderApproved implements RequestHandler {
|
|||
// translators: %s is the PayPal webhook Id.
|
||||
__(
|
||||
'Could not capture payment for webhook event %s.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
isset( $request['id'] ) ? $request['id'] : ''
|
||||
);
|
||||
|
@ -173,7 +173,7 @@ class CheckoutOrderApproved implements RequestHandler {
|
|||
if ( ! $wc_orders ) {
|
||||
$message = sprintf(
|
||||
// translators: %s is the PayPal order Id.
|
||||
__( 'Order for PayPal order %s not found.', 'paypal-for-woocommerce' ),
|
||||
__( 'Order for PayPal order %s not found.', 'paypal-payments-for-woocommerce' ),
|
||||
isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
|
||||
);
|
||||
$this->logger->log(
|
||||
|
@ -189,8 +189,8 @@ class CheckoutOrderApproved implements RequestHandler {
|
|||
|
||||
$new_status = $order->intent() === 'CAPTURE' ? 'processing' : 'on-hold';
|
||||
$status_message = $order->intent() === 'CAPTURE' ?
|
||||
__( 'Payment received.', 'paypal-for-woocommerce' )
|
||||
: __( 'Payment can be captured.', 'paypal-for-woocommerce' );
|
||||
__( 'Payment received.', 'paypal-payments-for-woocommerce' )
|
||||
: __( 'Payment can be captured.', 'paypal-payments-for-woocommerce' );
|
||||
foreach ( $wc_orders as $wc_order ) {
|
||||
if ( ! in_array( $wc_order->get_status(), array( 'pending', 'on-hold' ), true ) ) {
|
||||
continue;
|
||||
|
@ -210,7 +210,7 @@ class CheckoutOrderApproved implements RequestHandler {
|
|||
// translators: %s is the order ID.
|
||||
__(
|
||||
'Order %s has been updated through PayPal',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
(string) $wc_order->get_id()
|
||||
),
|
||||
|
|
|
@ -86,7 +86,7 @@ class CheckoutOrderCompleted implements RequestHandler {
|
|||
// translators: %s is the PayPal webhook Id.
|
||||
__(
|
||||
'No order for webhook event %s was found.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
isset( $request['id'] ) ? $request['id'] : ''
|
||||
);
|
||||
|
@ -116,7 +116,7 @@ class CheckoutOrderCompleted implements RequestHandler {
|
|||
if ( ! $wc_orders ) {
|
||||
$message = sprintf(
|
||||
// translators: %s is the PayPal order Id.
|
||||
__( 'Order for PayPal order %s not found.', 'paypal-for-woocommerce' ),
|
||||
__( 'Order for PayPal order %s not found.', 'paypal-payments-for-woocommerce' ),
|
||||
isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
|
||||
);
|
||||
$this->logger->log(
|
||||
|
@ -141,7 +141,7 @@ class CheckoutOrderCompleted implements RequestHandler {
|
|||
*/
|
||||
$wc_order->update_status(
|
||||
'processing',
|
||||
__( 'Payment received.', 'paypal-for-woocommerce' )
|
||||
__( 'Payment received.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
$this->logger->log(
|
||||
'info',
|
||||
|
@ -149,7 +149,7 @@ class CheckoutOrderCompleted implements RequestHandler {
|
|||
// translators: %s is the order ID.
|
||||
__(
|
||||
'Order %s has been updated through PayPal',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
(string) $wc_order->get_id()
|
||||
),
|
||||
|
|
|
@ -73,7 +73,7 @@ class PaymentCaptureCompleted implements RequestHandler {
|
|||
// translators: %s is the PayPal webhook Id.
|
||||
__(
|
||||
'No order for webhook event %s was found.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
isset( $request['id'] ) ? $request['id'] : ''
|
||||
);
|
||||
|
@ -94,7 +94,7 @@ class PaymentCaptureCompleted implements RequestHandler {
|
|||
// translators: %s is the PayPal webhook Id.
|
||||
__(
|
||||
'No order for webhook event %s was found.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
isset( $request['id'] ) ? $request['id'] : ''
|
||||
);
|
||||
|
@ -114,7 +114,7 @@ class PaymentCaptureCompleted implements RequestHandler {
|
|||
return rest_ensure_response( $response );
|
||||
}
|
||||
$wc_order->add_order_note(
|
||||
__( 'Payment successfully captured.', 'paypal-for-woocommerce' )
|
||||
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
|
||||
$wc_order->set_status( 'processing' );
|
||||
|
@ -126,7 +126,7 @@ class PaymentCaptureCompleted implements RequestHandler {
|
|||
// translators: %s is the order ID.
|
||||
__(
|
||||
'Order %s has been updated through PayPal',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
(string) $wc_order->get_id()
|
||||
),
|
||||
|
|
|
@ -72,7 +72,7 @@ class PaymentCaptureRefunded implements RequestHandler {
|
|||
// translators: %s is the PayPal webhook Id.
|
||||
__(
|
||||
'No order for webhook event %s was found.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
isset( $request['id'] ) ? $request['id'] : ''
|
||||
);
|
||||
|
@ -91,7 +91,7 @@ class PaymentCaptureRefunded implements RequestHandler {
|
|||
if ( ! is_a( $wc_order, \WC_Order::class ) ) {
|
||||
$message = sprintf(
|
||||
// translators: %s is the PayPal refund Id.
|
||||
__( 'Order for PayPal refund %s not found.', 'paypal-for-woocommerce' ),
|
||||
__( 'Order for PayPal refund %s not found.', 'paypal-payments-for-woocommerce' ),
|
||||
isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
|
||||
);
|
||||
$this->logger->log(
|
||||
|
@ -121,7 +121,7 @@ class PaymentCaptureRefunded implements RequestHandler {
|
|||
'warning',
|
||||
sprintf(
|
||||
// translators: %s is the order id.
|
||||
__( 'Order %s could not be refunded', 'paypal-for-woocommerce' ),
|
||||
__( 'Order %s could not be refunded', 'paypal-payments-for-woocommerce' ),
|
||||
(string) $wc_order->get_id()
|
||||
),
|
||||
array(
|
||||
|
@ -140,7 +140,7 @@ class PaymentCaptureRefunded implements RequestHandler {
|
|||
// translators: %1$s is the order id %2$s is the amount which has been refunded.
|
||||
__(
|
||||
'Order %1$s has been refunded with %2$s through PayPal',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
(string) $wc_order->get_id(),
|
||||
(string) $refund->get_amount()
|
||||
|
|
|
@ -79,7 +79,7 @@ class PaymentCaptureReversed implements RequestHandler {
|
|||
// translators: %s is the PayPal webhook Id.
|
||||
__(
|
||||
'No order for webhook event %s was found.',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
isset( $request['id'] ) ? $request['id'] : ''
|
||||
);
|
||||
|
@ -98,7 +98,7 @@ class PaymentCaptureReversed implements RequestHandler {
|
|||
if ( ! is_a( $wc_order, \WC_Order::class ) ) {
|
||||
$message = sprintf(
|
||||
// translators: %s is the PayPal refund Id.
|
||||
__( 'Order for PayPal refund %s not found.', 'paypal-for-woocommerce' ),
|
||||
__( 'Order for PayPal refund %s not found.', 'paypal-payments-for-woocommerce' ),
|
||||
isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
|
||||
);
|
||||
$this->logger->log(
|
||||
|
@ -123,12 +123,12 @@ class PaymentCaptureReversed implements RequestHandler {
|
|||
// translators: %1$s is the order id.
|
||||
__(
|
||||
'Order %1$s has been cancelled through PayPal',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
(string) $wc_order->get_id()
|
||||
) : sprintf(
|
||||
// translators: %1$s is the order id.
|
||||
__( 'Failed to cancel order %1$s through PayPal', 'paypal-for-woocommerce' ),
|
||||
__( 'Failed to cancel order %1$s through PayPal', 'paypal-payments-for-woocommerce' ),
|
||||
(string) $wc_order->get_id()
|
||||
);
|
||||
$this->logger->log(
|
||||
|
|
|
@ -123,7 +123,7 @@ class IncomingWebhookEndpoint {
|
|||
if ( ! $result ) {
|
||||
$this->logger->log(
|
||||
'error',
|
||||
__( 'Illegit Webhook request detected.', 'paypal-for-woocommerce' )
|
||||
__( 'Illegit Webhook request detected.', 'paypal-payments-for-woocommerce' )
|
||||
);
|
||||
}
|
||||
return $result;
|
||||
|
@ -134,7 +134,7 @@ class IncomingWebhookEndpoint {
|
|||
// translators: %s is the error message.
|
||||
__(
|
||||
'Illegit Webhook request detected: %s',
|
||||
'paypal-for-woocommerce'
|
||||
'paypal-payments-for-woocommerce'
|
||||
),
|
||||
$exception->getMessage()
|
||||
)
|
||||
|
@ -159,7 +159,7 @@ class IncomingWebhookEndpoint {
|
|||
'info',
|
||||
sprintf(
|
||||
// translators: %s is the event type.
|
||||
__( 'Webhook has been handled by %s', 'paypal-for-woocommerce' ),
|
||||
__( 'Webhook has been handled by %s', 'paypal-payments-for-woocommerce' ),
|
||||
( $handler->event_types() ) ? current( $handler->event_types() ) : ''
|
||||
),
|
||||
array(
|
||||
|
@ -173,7 +173,7 @@ class IncomingWebhookEndpoint {
|
|||
|
||||
$message = sprintf(
|
||||
// translators: %s is the request type.
|
||||
__( 'Could not find handler for request type %s', 'paypal-for-woocommerce' ),
|
||||
__( 'Could not find handler for request type %s', 'paypal-payments-for-woocommerce' ),
|
||||
$request['event_type']
|
||||
);
|
||||
$this->logger->log(
|
||||
|
|
|
@ -16,7 +16,7 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
return array(
|
||||
'woocommerce.logger.source' => function(): string {
|
||||
return 'paypal-for-woocommerce';
|
||||
return 'paypal-payments-for-woocommerce';
|
||||
},
|
||||
'woocommerce.logger.woocommerce' => function ( ContainerInterface $container ): LoggerInterface {
|
||||
if ( ! class_exists( \WC_Logger::class ) ) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<rule ref="WordPress.WP.I18n">
|
||||
<properties>
|
||||
<property name="text_domain" type="array" value="paypal-for-woocommerce" />
|
||||
<property name="text_domain" type="array" value="paypal-payments-for-woocommerce" />
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
declare( strict_types = 1 );
|
||||
|
||||
/**
|
||||
* Plugin Name: PayPal for WooCommerce
|
||||
* Plugin Name: PayPal Payments for WooCommerce
|
||||
* Plugin URI: TODO
|
||||
* Description: PayPal's latest complete payments processing solution. Accept PayPal. PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage.
|
||||
* Version: dev-master
|
||||
* Author: WooCommerce
|
||||
* Author URI: https://inpsyde.com/
|
||||
* License: GPL-2.0
|
||||
* Text Domain: paypal-for-woocommerce
|
||||
* Text Domain: paypal-payments-for-woocommerce
|
||||
*/
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue