PHP code example of riazxrazor / thankster

1. Go to this page and download the library: Download riazxrazor/thankster 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/ */

    

riazxrazor / thankster example snippets


Riazxrazor\Thankster\ThanksterServiceProvider::class,

'Thankster' => Riazxrazor\Thankster\ThanksterFacade::class


// Load, create, or update a user account.
\Thankster::findOrCreateUserByEmail([
                                          'email'     => '[email protected]',
                                          'fname'     => 'Michael',
                                          'lname'     => 'Scharf',
                                          'address'   => '123 Road',
                                          'address2'  => 'Apartment 5F',
                                          'city'      => 'New Martinsville',
                                          'state'     => 'WV',
                                          'zip'       => '26155',
                                          'company'   => 'Igicom LLC'
                                      ])->getResponse();


// This creates a new Project with a single card in it.
\Thankster::createCardProject([
                                        'templateID'=> 1433354,
                                        'thanksterUserID'=>7655,
                                        'r_fname'     => 'Michael',
                                        'r_lname'     => 'Scharf',
                                        'r_company'   => 'Igicom LLC',
                                        'r_address'   => '123 Road',
                                        'r_address2'  => 'Apartment 5F',
                                        'r_city'      => 'New Martinsville',
                                        'r_state'     => 'WV',
                                        'r_zip'       => '26155',
                                        'r_country'   => 'US',
                                        'r_email'     => '[email protected]'
                            
                                      ])->getResponse();
\Thankster::applyMessages([
                                'thanksterRecipientID' => 1221,
                                'thanksterUserID' => 1,
                                'inside1' => "TEXT",
                                'inside2' => "TEXT 2"
                            ])->getResponse();
                         
                            
\Thankster::orderProject([
                             'thanksterProjectID' => 1212,
                             'thanksterUserID' => 1,
                         ])->getResponse();
                         
                         
                         
\Thankster::setPartnerOrderID([
                              'thanksterOrderID' => 1212,
                              'orderID' => 34,
                          ])->getResponse();
  
                          
\Thankster::approveForPrinting([
                              'thanksterOrderID' => 1212,
                              'orderID' => 34,
                          ])->getResponse();
                                      


console
php artisan vendor:publish --tag=config

   
    'API_KEY' => 'Thankster API KEY',

    'DEBUG' => FALSE