NotifyUrl is not a fully qualified URL

diegoStickmen
Contributor
Contributor

Hi, 

This morning my API implementation in Sandbox environment stop working by sending this error message :

This happends when I'm creating a plan. The error is refering to "NotifyUrl is not a fully qualified URL", but I'm not setting the NotificationURL (NotifyUrl ), since the documentation says it is read only at this stage. Is there any changes in Paypal side that may be causing this error?

 

Type: InvalidArgumentException

Message: NotifyUrl is not a fully qualified URL

Filename: /var/www/html/PayPal-PHP-SDK/paypal/rest-api-sdk-php/lib/PayPal/Validation/UrlValidator.php

Line Number: 23

Backtrace:

File: /var/www/html/PayPal-PHP-SDK/paypal/rest-api-sdk-php/lib/PayPal/Api/MerchantPreferences.php
Line: 131
Function: validate

File: /var/www/html/PayPal-PHP-SDK/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalModel.php
Line: 256
Function: setNotifyUrl

File: /var/www/html/PayPal-PHP-SDK/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalModel.php
Line: 244
Function: assignValue

File: /var/www/html/PayPal-PHP-SDK/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalModel.php
Line: 223
Function: fromArray

File: /var/www/html/PayPal-PHP-SDK/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalModel.php
Line: 270
Function: fromArray

File: /var/www/html/PayPal-PHP-SDK/paypal/rest-api-sdk-php/lib/PayPal/Api/Plan.php
Line: 364
Function: fromJson

File: /var/www/html/application/controllers/PayPalApi.php
Line: 241
Function: create

Login to Me Too
4 REPLIES 4

premiumsoft
Contributor
Contributor

I have the same problem today.

Login to Me Too

iliyanlishkov
New Community Member

I also started receiving this problem.. how to fix it?

Login to Me Too

gratiafide
Contributor
Contributor

Here's the solution to this problem:  

 

https://github.com/paypal/PayPal-PHP-SDK/pull/1152

 

While waiting for this fix to get merged in, you can alternatively comment out the above lines in your own vendor files, or to simplify things you can just comment out this 1 line (although this wi

 

 

<?php

namespace PayPal\Validation;

/**
 * Class UrlValidator
 *
 * @package PayPal\Validation
 */
class UrlValidator
{

    /**
     * Helper method for validating URLs that will be used by this API in any requests.
     *
     * @param      $url
     * @param string|null $urlName
     * @throws \InvalidArgumentException
     */
    public static function validate($url, $urlName = null)
    {
        if (filter_var($url, FILTER_VALIDATE_URL) === false) {
//            throw new \InvalidArgumentException("$urlName is not a fully qualified URL");
        }
    }
}

 

Login to Me Too

kotov
Contributor
Contributor

It's didn't help for me((( 

How to validate Webhook?

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.