PHP code example of cullylarson / paypal-experience-cli

1. Go to this page and download the library: Download cullylarson/paypal-experience-cli library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cullylarson / paypal-experience-cli example snippets


curl -s http://getcomposer.org/installer | php
php composer.phar 

> php ./vendor/bin/create-experience-profile PROFILE_CLASS_NAME [PROFILE_NAMESPACE]

> php ./vendor/bin/list-experience-profiles

> php ./vendor/bin/update-experience-profile EXPERIENCE_PROFILE_ID PROFILE_CLASS_NAME [PROFILE_NAMESPACE]

> php ./vendor/bin/remove-experience-profile EXPERIENCE_PROFILE_ID

> touch profiles/MyFirstProfile.php



namespace My\Preferred\Namespace; // not necessary to namespace your profiles

use PayPal\ExperienceCli\Profile;

class MyFirstProfile extends Profile {
    public function GetProfileName() { return "This Needs to be Unique"; }
    public function GetBrandName() { return "My Business"; }
    public function GetLogoUrl() { return "https://www.google.com/images/srpr/logo11w.png"; }
}

> php ./vendor/bin/create-experience-profile MyFirstProfile "\\My\\Preferred\\Namespace"

> php ./vendor/bin/list-experience-profiles



// no more namespace

use PayPal\ExperienceCli\Profile;

class MyFirstProfile extends Profile {
    public function GetProfileName() { return "This Needs to be Unique"; }
    public function GetBrandName() { return "My Better Business Name"; }
    // no more logo
}

> php ./vendor/bin/update-experience-profile THE-EXPERIENCE-PROFILE-ID-FROM-LIST MyFirstProfile

> php ./vendor/bin/remove-experience-profile THE-EXPERIENCE-PROFILE-ID-FROM-LIST