// Modifying this Payment Profile - make some changes and save them back
     // Here we'll add a number 0 through 10 (incrementing each time this demo is run) to their last name
     echo "Modifying the Payment Profile..." . PHP_EOL;
     $lname = $paymentProfile->payment_profile_last_name;
     $paymentProfile->payment_profile_last_name = substr($lname, 0, 4) . strval(intval(substr($lname, -1, 1)) + 1);
     print "Setting the last name to: " . $paymentProfile->payment_profile_last_name . PHP_EOL;
     $response = $oaConn->savePaymentProfile($paymentProfile);
     print "Updated Payment Profile: was-'" . $lname . "' is now-'" . $response->payment_profile_last_name . "'" . PHP_EOL;
     print PHP_EOL;
 }
 // Let's look at the available Payment Types
 // Payment types are specific to your organization; make them up as you need
 // These control the descriptions that end users see on their statements
 // and set a default organization account the money is credited/debited to/from
 echo "Getting Payment Types..." . PHP_EOL;
 $paymentTypes = $oaConn->getPaymentTypes();
 $payment_type_id = '';
 foreach ($paymentTypes as $paymentType) {
     print "Payment Type: " . $paymentType->payment_type_name . PHP_EOL;
     printObj($paymentType, 1);
     if ($paymentType->payment_type_transaction_type == 'debit') {
         $payment_type_id = $paymentType->payment_type_id;
     }
 }
 print PHP_EOL;
 // Demonstrate retrieving an external schedule
 //$paymentSchedule = $oaConn->getPaymentSchedule('6d21907a-a362-47c0-84b5-30ae219dbc78');
 //print "Payment Schedule: " . $paymentSchedule->payment_schedule_id . PHP_EOL;
 //printObj ( $paymentSchedule, 1 );
 // Demonstrate adding a new Payment Profile
 print "Creating new Payment Profile..." . PHP_EOL;