The system does not work with credit cards.
-
The system does not work with credit cards.
When I select payment cards, it remains in standby and the payment fails. However, if I log in with PayPal, it works fine. But the credit card does not work. A customer informed me that they were trying to place an order but couldn’t because the payment was blocked.
I tried it myself and found that it does indeed get blocked. I receive a notification from my bank, which I authorize, but then it freezes, and a notice appears stating that the payment failed.
What should I do?
-
Hi @nero2001
This sounds like a PayPal issue and not something related to the plugin. PayPal notoriously has many issues with their card processing. The PayPal plugin doesn’t have any control over the rendered card form or the logic PayPal uses to process the card payment.
If you have a staging site that you can place in Sandbox mode then we can run some tests.
Kind Regards,
Hi,
No unfortunately I do not have a staging site.
So what should I do? How can I ask PayPal?
Thank you
So what should I do? How can I ask PayPal?
What do the order notes say on the WooCommerce order details page?
If you go to the WooCommerce > Status > Logs page, find the
wc-ppcp
log file. That will have the request data including the debug ID which you can share with PayPal support.This is what came out of the log, for privacy I delete personal data:
2024-07-15T15:30:27+00:00 ERROR API error: Array
(
[url] => https://api-m.sandbox.paypal.com/v2/checkout/orders/66T81040KY329305G
[method] => GET
[http_status] => 401
[request] =>
[error] => Array
(
[error] => invalid_client
[error_description] => Client Authentication failed
)
)
2024-07-15T15:30:38+00:00 ERROR API error: Array
(
[url] => https://api-m.sandbox.paypal.com/v1/oauth2/token
[method] => POST
[http_status] => 401
[request] => Array
(
[grant_type] => client_credentials
)
[error] => Array
(
[error] => invalid_client
[error_description] => Client Authentication failed
)
)
2024-07-15T15:31:39+00:00 INFO PayPal order created via PaymentPlugins\WooCommerce\PPCP\Rest\Routes\CartOrder::handle_post_request. Args: Array
(
[id] => 5D965010W4111133S
[intent] => CAPTURE
[status] => CREATED
[purchase_units] => Array
(
[0] => Array
(
[reference_id] => default
[amount] => Array
(
[currency_code] => EUR
[value] => 64.80
[breakdown] => Array
(
[item_total] => stdClass Object
(
[currency_code] => EUR
[value] => 72.00
)
[shipping] => PaymentPlugins\PayPalSDK\Shipping Object
(
[_values:protected] => Array
(
[currency_code] => EUR
[value] => 0.00
)
[mappings:protected] => Array
(
)
[index:PaymentPlugins\PayPalSDK\AbstractObject:private] =>
[patchRequest:PaymentPlugins\PayPalSDK\AbstractObject:private] =>
)
[handling] => stdClass Object
(
[currency_code] => EUR
[value] => 0.00
)
[tax_total] => stdClass Object
(
[currency_code] => EUR
[value] => 0.00
)
[discount] => stdClass Object
(
[currency_code] => EUR
[value] => 7.20
)
)
)
[payee] => Array
(
[email_address] => info@*********.it
[merchant_id] => ************
)
[items] => Array
(
[0] => Array
(
[name] => ************ - 500 ml
[unit_amount] => stdClass Object
(
[currency_code] => EUR
[value] => 36.00
)
[quantity] => 1
[description] => Product ID: 816. Variation ID: 2124
[sku] => 2124
)
[1] => Array
(
[name] => **************** - 500 ml
[unit_amount] => stdClass Object
(
[currency_code] => EUR
[value] => 36.00
)
[quantity] => 1
[description] => Product ID: 720. Variation ID: 2164
[sku] => 2164
)
)
[shipping] => Array
(
[address] => Array
(
[address_line_1] => Via *******
[admin_area_2] => *******
[admin_area_1] => **
[postal_code] => *****
[country_code] => IT
)
)
)
)
[payer] => Array
(
[name] => Array
(
[given_name] => *******
[surname] => *******
)
[email_address] => *******@********.it
[address] => Array
(
[address_line_1] => *******
[admin_area_2] => *******
[admin_area_1] => *******
[postal_code] => *******
[country_code] => IT
)
)
[create_time] => 2024-07-15T15:31:39Z
[links] => Array
(
[0] => Array
(
[href] => https://api.paypal.com/v2/checkout/orders/5D965010W4111133S
[rel] => self
[method] => GET
)
[1] => Array
(
[href] => https://www.paypal.com/checkoutnow?token=5D965010W4111133S
[rel] => approve
[method] => GET
)
[2] => Array
(
[href] => https://api.paypal.com/v2/checkout/orders/5D965010W4111133S
[rel] => update
[method] => PATCH
)
[3] => Array
(
[href] => https://api.paypal.com/v2/checkout/orders/5D965010W4111133S/capture
[rel] => capture
[method] => POST
)
)
)
2024-07-15T15:36:29+00:00 INFO Capturing payment for PayPal order 6AT931542W4999323 via PaymentPlugins\WooCommerce\PPCP\PaymentHandler::process_payment. Order ID: 4029
2024-07-15T15:36:37+00:00 INFO Webhook received. Event: CHECKOUT.ORDER.APPROVED
2024-07-15T15:36:51+00:00 INFO Webhook received. Event: PAYMENT.CAPTURE.COMPLETEDI see client authentication errors for Sandbox mode which occurs when you have invalid API keys entered. I don’t see any entries the correspond to a failed payment in production
Make sure you’re viewing the log entry that corresponds to the WooCommerce order that failed.
I deleted all the logs.
I tried to make a purchase and the log called ‘wc-ppcp’ was created.
Inside I find this text:2024-07-15T18:01:32+00:00 Info PayPal order created via PaymentPlugins\WooCommerce\PPCP\Rest\Routes\CartOrder::handle_post_request. Args: Array
(
[id] => 6M03910424581911N
[intent] => CAPTURE
[status] => CREATED
[purchase_units] => Array
(
[0] => Array
(
[reference_id] => default
[amount] => Array
(
[currency_code] => EUR
[value] => 64.80
[breakdown] => Array
(
[item_total] => stdClass Object
(
[currency_code] => EUR
[value] => 72.00
)
[shipping] => PaymentPlugins\PayPalSDK\Shipping Object
(
[_values:protected] => Array
(
[currency_code] => EUR
[value] => 0.00
)
[mappings:protected] => Array
(
)
[index:PaymentPlugins\PayPalSDK\AbstractObject:private] =>
[patchRequest:PaymentPlugins\PayPalSDK\AbstractObject:private] =>
)
[handling] => stdClass Object
(
[currency_code] => EUR
[value] => 0.00
)
[tax_total] => stdClass Object
(
[currency_code] => EUR
[value] => 0.00
)
[discount] => stdClass Object
(
[currency_code] => EUR
[value] => 7.20
)
)
)
[payee] => Array
(
[email_address] => ***********
[merchant_id] => ***********
)
[items] => Array
(
[0] => Array
(
[name] => ***********
[unit_amount] => stdClass Object
(
[currency_code] => EUR
[value] => 36.00
)
[quantity] => 1
[description] => Product ID: 816. Variation ID: 2124
[sku] => 2124
)
[1] => Array
(
[name] => ***********
[unit_amount] => stdClass Object
(
[currency_code] => EUR
[value] => 36.00
)
[quantity] => 1
[description] => Product ID: 720. Variation ID: 2164
[sku] => 2164
)
)
[shipping] => Array
(
[name] => Array
(
[full_name] => ***********
)
[address] => Array
(
[address_line_1] => ***********
[admin_area_2] => ***********
[admin_area_1] => ***********
[postal_code] => ***********
[country_code] => ***********
)
)
)
)
[payer] => Array
(
[name] => Array
(
[given_name] => ***********
[surname] => ***********
)
[email_address] => ***********
[address] => Array
(
[address_line_1] => ***********
[admin_area_2] => ***********
[admin_area_1] => ***********
[postal_code] => ***********
[country_code] => ***********
)
)
[create_time] => 2024-07-15T18:01:32Z
[links] => Array
(
[0] => Array
(
[href] => https://api.paypal.com/v2/checkout/orders/6M03910424581911N
[rel] => self
[method] => GET
)
[1] => Array
(
[href] => https://www.paypal.com/checkoutnow?token=6M03910424581911N
[rel] => approve
[method] => GET
)
[2] => Array
(
[href] => https://api.paypal.com/v2/checkout/orders/6M03910424581911N
[rel] => update
[method] => PATCH
)
[3] => Array
(
[href] => https://api.paypal.com/v2/checkout/orders/6M03910424581911N/capture
[rel] => capture
[method] => POST
)
)
)@nero2001 I don’t see anything out of the ordinary with that log entry. If you’re getting declined card payments your best bet is to contact PayPal support.
Honestly, my recommendation would be to not use PayPal for card payments. The best setup would be to have Stripe as your main payment processor (cards, GPay, Apple Pay), and just offer the traditional PayPal payment button offered via this plugin.
- You must be logged in to reply to this topic.