Support » Plugin: PayPal Plus for WooCommerce » Invalid ‘approvalUrl’

  • Resolved borisdiakur

    (@borisdiakur)


    Hi,
    I’m currently getting this error in both live and sandbox mode in the checkout:

    INTERNAL-LOG: renderMessage(), warning: {"type":"checks_failed","sourcePath":"/approvalUrl","sourceValue":"null"}
    ppplus.min.js?ver=1.0:27 Invalid 'approvalUrl'.

    What am I missing here? Where can I set/request this approval url?

    • This topic was modified 1 year, 1 month ago by  borisdiakur.
    • This topic was modified 1 year, 1 month ago by  borisdiakur.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Biont

    (@biont)

    Hello borisdiakur,

    Thank you for this report. I will investigate and fix the error. The approval URL is something we receive from Paypal when initializing the Payment process, so it’s not something that can be set by the user (or the plugin). We’ll have a fix ready soon.

    Plugin Author Biont

    (@biont)

    If you have access, could you post the (recent) contents of wp-content/uploads/wc-logs/paypal_plus-*.log? If you’re uncomfortable with posting that information, a search for “approval_url” should bring up the entries I’d be interested in.

    Sorry for the redundant post. Please see below.

    • This reply was modified 1 year, 1 month ago by  borisdiakur.
    • This reply was modified 1 year, 1 month ago by  borisdiakur.

    I changed the brandname which previously did not match the one used in the Paypal Account. Then the error went away at first. After submitting the form using credit card payment method, the order was processed correctly (it was received), however I was redirected to the cart/ instead of checkout/order-received/ Also I noticed that I did not need to enter any fake credit card data (I was in sandbox mode). I expected to be confronted with a paypal sandbox modal layer with a form used to enter fake credit card data, but there was nothing, just a redirect to cart/. Now comes the weird part: I tried to buy another item and was now presented the same error message as before: Invalid approvalUrl. Anyway, here are some logs, hope they help you figure something out:

    
    [11-05-2017 06:27:25] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.sandbox.paypal.com/v1/oauth2/token
    [11-05-2017 06:27:26] PayPal\Core\PayPalHttpConnection : DEBUG: Request Headers 	: POST /v1/oauth2/token HTTP/1.1, Host: api.sandbox.paypal.com, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.11.0 (platform-ver=7.1.3; bit=64; os=Linux_3.13.0-042stab120.18; machine=x86_64; crypto-lib-ver=1.0.1f; curl=7.35.0), Authorization: Basic QVRxxxxxxxxxxxxxxxxxZYm4=, Accept: */*, PayPal-Partner-Attribution-Id: WooCommerce_Cart_Plus, Content-Length: 29, Content-Type: application/x-www-form-urlencoded, ,
    [11-05-2017 06:27:26] PayPal\Core\PayPalHttpConnection : DEBUG: Request Data		: grant_type=client_credentials
    --------------------------------------------------------------------------------------------------------------------------------
    
    [11-05-2017 06:27:26] PayPal\Core\PayPalHttpConnection : INFO: Response Status 	: 200
    [11-05-2017 06:27:26] PayPal\Core\PayPalHttpConnection : DEBUG: Response Headers	: HTTP/1.1 200 OK, Date: Thu, 11 May 2017 18:27:25 GMT, Server: Apache, paypal-debug-id: 3a8xxxxxxxxxxab, X-PAYPAL-TOKEN-SERVICE: IAAS, Paypal-Debug-Id: 3a8xxxxxxxxxxab, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dplatformapiserv%26TIME%3D229446745%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Thu, 11 May 2017 18:57:25 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 550, Connection: close, Content-Type: application/json, ,
    [11-05-2017 06:27:26] PayPal\Core\PayPalHttpConnection : DEBUG: Response Data 	: {"scope":"https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks openid https://uri.paypal.com/payments/payouts https://api.paypal.com/v1/vault/credit-card/.*","nonce":"2017-05-11T18:27:25Z6zE0lhq7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0k","access_token":"A21xxxxxxxxxxxxxxxxxxxxxTXA","token_type":"Bearer","app_id":"APP-80xxxxxxxxxxxx3T","expires_in":32400}
    
    ================================================================================================================================
    
    [11-05-2017 06:27:26] PayPal\Core\PayPalHttpConnection : INFO: GET https://api.sandbox.paypal.com/v1/payments/payment?count=1
    [11-05-2017 06:27:27] PayPal\Core\PayPalHttpConnection : DEBUG: Request Headers 	: GET /v1/payments/payment?count=1 HTTP/1.1, Host: api.sandbox.paypal.com, Accept: */*, Content-Type: application/json, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.11.0 (platform-ver=7.1.3; bit=64; os=Linux_3.13.0-042stab120.18; machine=x86_64; crypto-lib-ver=1.0.1f; curl=7.35.0), Authorization: Bearer A21xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTXA, PayPal-Partner-Attribution-Id: WooCommerce_Cart_Plus, ,
    [11-05-2017 06:27:27] PayPal\Core\PayPalHttpConnection : DEBUG: No Request Payload
    --------------------------------------------------------------------------------------------------------------------------------
    
    [11-05-2017 06:27:27] PayPal\Core\PayPalHttpConnection : INFO: Response Status 	: 200
    [11-05-2017 06:27:27] PayPal\Core\PayPalHttpConnection : DEBUG: Response Headers	: HTTP/1.1 200 OK, Date: Thu, 11 May 2017 18:27:26 GMT, Server: Apache, paypal-debug-id: c86xxxxxxxxxxxxxa5, Content-Language: *, Paypal-Debug-Id: c86xxxxxxxxxxxxxa5, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dplatformapiserv%26TIME%3D246223961%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Thu, 11 May 2017 18:57:26 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 25, Connection: close, Content-Type: application/json, ,
    [11-05-2017 06:27:27] PayPal\Core\PayPalHttpConnection : DEBUG: Response Data 	: {"payments":[],"count":0}
    
    ================================================================================================================================
    
    [11-05-2017 06:27:27] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.sandbox.paypal.com/v1/payment-experience/web-profiles/
    [11-05-2017 06:27:28] PayPal\Core\PayPalHttpConnection : DEBUG: Request Headers 	: POST /v1/payment-experience/web-profiles/ HTTP/1.1, Host: api.sandbox.paypal.com, Accept: */*, Content-Type: application/json, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.11.0 (platform-ver=7.1.3; bit=64; os=Linux_3.13.0-042stab120.18; machine=x86_64; crypto-lib-ver=1.0.1f; curl=7.35.0), Authorization: Bearer A21xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTXA, PayPal-Request-Id: https://example.com591xxxxxxxxxxx, PayPal-Partner-Attribution-Id: WooCommerce_Cart_Plus, Content-Length: 232, ,
    [11-05-2017 06:27:28] PayPal\Core\PayPalHttpConnection : DEBUG: Request Data		: {"name":"example59xxxxxxxxxxxxx","input_fields":{"no_shipping":0,"address_override":1},"presentation":{"logo_image":"https://example.com/wp-content/themes/example/images/example-logo-with-name-190x60.png","brand_name":"example"}}
    --------------------------------------------------------------------------------------------------------------------------------
    
    [11-05-2017 06:27:28] PayPal\Core\PayPalHttpConnection : INFO: Response Status 	: 201
    [11-05-2017 06:27:28] PayPal\Core\PayPalHttpConnection : DEBUG: Response Headers	: HTTP/1.1 201 Created, Date: Thu, 11 May 2017 18:27:26 GMT, Server: Apache, paypal-debug-id: 181e63cedd9fa, Paypal-Debug-Id: 181e63cedd9fa, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dplatformapiserv%26TIME%3D246223961%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Thu, 11 May 2017 18:57:26 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 280, Connection: close, Content-Type: application/json, ,
    [11-05-2017 06:27:28] PayPal\Core\PayPalHttpConnection : DEBUG: Response Data 	: {"id":"XP-xxxxxxxxxxxxxxxxxxxxx","name":"example59xxxxxxxxxxxxxxxxxxxxx","temporary":false,"input_fields":{"no_shipping":0,"address_override":1},"presentation":{"brand_name":"example","logo_image":"https://example.com/wp-content/themes/example/images/example-logo-with-name-190x60.png"}}
    
    ================================================================================================================================
    
    [11-05-2017 06:29:36] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.sandbox.paypal.com/v1/payments/payment
    [11-05-2017 06:29:37] PayPal\Core\PayPalHttpConnection : DEBUG: Request Headers 	: POST /v1/payments/payment HTTP/1.1, Host: api.sandbox.paypal.com, Accept: */*, Content-Type: application/json, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.11.0 (platform-ver=7.1.3; bit=64; os=Linux_3.13.0-042stab120.18; machine=x86_64; crypto-lib-ver=1.0.1f; curl=7.35.0), Authorization: Bearer A21xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTXA, PayPal-Request-Id: https://example.com59xxxxxxxxxxxxxxxx, PayPal-Partner-Attribution-Id: WooCommerce_Cart_Plus, Content-Length: 668, ,
    [11-05-2017 06:29:37] PayPal\Core\PayPalHttpConnection : DEBUG: Request Data		: {"intent":"sale","experience_profile_id":"XP-836K-6B8T-2RPW-456S","payer":{"payment_method":"paypal"},"redirect_urls":{"return_url":"https://example.com/wc-api/paypal_plus/","cancel_url":"https://example.com/checkout/"},"transactions":[{"amount":{"currency":"EUR","total":"20.70","details":{"shipping":"3.64","tax":"1.35","subtotal":"15.70"}},"item_list":{"items":[{"name":"Big Raccoon","currency":"EUR","quantity":1,"price":"6.45"},{"name":"item","currency":"EUR","quantity":1,"price":"9.25"}]},"description":"Payment description","invoice_number":"591xxxxxxxxxxxxxxxxxxxxx","notify_url":"https://example.com/wc-api/Woo_Paypal_Plus_Gateway/"}]}
    --------------------------------------------------------------------------------------------------------------------------------
    
    [11-05-2017 06:29:37] PayPal\Core\PayPalHttpConnection : INFO: Response Status 	: 400
    [11-05-2017 06:29:37] PayPal\Core\PayPalHttpConnection : DEBUG: Response Headers	: HTTP/1.1 400 Bad Request, Date: Thu, 11 May 2017 18:29:36 GMT, Server: Apache, paypal-debug-id: a65xxxxxxxxxx, Content-Language: *, Connection: close, Paypal-Debug-Id: a65xxxxxxxxxx, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dplatformapiserv%26TIME%3D2427262041%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Thu, 11 May 2017 18:59:36 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 320, Content-Type: application/json, ,
    [11-05-2017 06:29:37] PayPal\Core\PayPalHttpConnection : ERROR: Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/payment. {"name":"VALIDATION_ERROR","details":[{"field":"transactions[0].amount","issue":"Transaction amount details (subtotal, tax, shipping) must add up to specified amount total"}],"message":"Invalid request - see details","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"a65xxxxxxxxxx"}
    [11-05-2017 06:29:37] PayPal\Core\PayPalHttpConnection : DEBUG:
    
    ===============================================================================================================================
    
    
    Plugin Author Biont

    (@biont)

    Thank you borisdiakur, this has been very helpful.

    We will push an update very soon and it should fix your problems.

    Downgrading to PHP 7.0.18 helped resolving the issue with the invalid approval_url somehow, but I still do not get presented any screen for inputting credit card data. The order status results always in pending payment.

    • This reply was modified 1 year, 1 month ago by  borisdiakur.
    Plugin Author Biont

    (@biont)

    Hi borisdiakur,

    Did you have a chance to check out the update (1.0.2) yet? Please let us know if it fixed your issue and close the issue if it did. We’d appreciate a review if you’re satisfied with the plugin.

    Best,

    Moritz

    Hi Moritz,

    unfortunately it din’t help. I’m getting redirected to the cart page after submitting the checkout form. In the admin area I see the new order with the status pending payment. So I, as a user, do not get the chance to pay.

    For now we have switched to a different payment provider, so we are not totally desperate to have this bug fixed and I will close the issue. Anyway thanks for the great support so far, keep it up this way!

    Cheers,
    Boris

    I still have a similar problem, we got a letter from PayPal with this:

    Guten Tag XY !

    Bitte überprüfen Sie den Server, der für sofortige Zahlungsbestätigungen von PayPal zuständig ist. Sofortige Zahlungsbestätigungen an den/die folgende(n) URL(s) sind fehlgeschlagen:

    https://www. X Y .de/wc-api/Woo_Paypal_Plus_Gateway/

    Wenn Sie diese URL nicht erkennen, nutzen Sie vielleicht einen Serviceprovider, der die sofortige Zahlungsbestätigung in Ihrem Namen verwendet. Bitte wenden Sie sich mit den oben genannten Informationen an Ihren Serviceprovider. Wenn dieses Problem weiterhin besteht, könnten die sofortigen Zahlungsbestätigungen für Ihr Konto deaktiviert werden.

    Wir bedanken uns für die rasche Erledigung dieser Angelegenheit.

    Herzliche Grüße

    Ihr PayPal-Team

    SCHÜTZEN SIE IHR PASSWORT

    Geben Sie Ihr Passwort NIEMALS an andere Personen weiter, auch nicht an Mitarbeiter von PayPal. Schützen Sie sich vor betrügerischen Websites, indem Sie ein neues Browserfenster (z.B. in Internet Explorer oder Netscape) öffnen und die PayPal-URL jedes Mal eingeben, wenn Sie sich in Ihr Konto einloggen.

    Bitte antworten Sie nicht auf diese E-Mail. Um mit einem Mitarbeiter unseres Kundenservice zu sprechen, klicken Sie auf ”
    Hilfe und Kontakt
    https://www.paypal.com/selfhelp/home

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Invalid ‘approvalUrl’’ is closed to new replies.