├── Infusionsoft
├── style.css
├── cache
│ └── empty
├── exports
│ └── empty
├── .htaccess
├── admin
│ ├── remove_field_files
│ │ ├── 0.9.13_remove_fields.txt
│ │ ├── 0.9.14_remove_fields.txt
│ │ └── 0.9.12_remove_fields.txt
│ └── generate_broken_field_files.php
├── tests
│ ├── testClassLoader.php
│ ├── notAuto_test_debug.php
│ ├── testCProgram.php
│ ├── useSessionAppInfoIfPresent.php
│ ├── notAuto_test_InvoiceService_hello.php
│ ├── notAuto_test_WebFormService_getMap.php
│ ├── notAuto_test_InvoiceService_getAllPaymentOptions.php
│ ├── notAuto_test_ShippingService_getAllShippingOptions.php
│ ├── notAuto_test_ContactService_getActivityHistoryTemplateMap.php
│ ├── notAuto_test_get_last_1000_payplanitems.php
│ ├── testWebFormService.php
│ ├── notAuto_test_getEmailTemplate.php
│ ├── notAuto_test_ContactService_add.php
│ ├── notAuto_test_ContactService_refreshApp.php
│ ├── notAuto_test_SearchService_quickSearch.php
│ ├── notAuto_test_FileService_getFile.php
│ ├── notAuto_test_APIEmailService_getOptStatus.php
│ ├── notAuto_test_FileService_getDownloadUrl.php
│ ├── notAuto_test_SearchService_getDefaultQuickSearch.php
│ ├── notAuto_test_InvoiceService_getInvoiceId.php
│ ├── notAuto_test_SearchService_getAvailableQuickSearches.php
│ ├── notAuto_test_WebFormService_getHTML.php
│ ├── notAuto_test_InvoiceService_getOrderId.php
│ ├── notAuto_test_InvoiceService_getPayments.php
│ ├── notAuto_test_InvoiceService_deleteInvoice.php
│ ├── notAuto_test_ContactService_getCampaignStepDetails.php
│ ├── notAuto_test_InvoiceService_recalculateTax.php
│ ├── notAuto_test_APIEmailService_getEmailTemplate.php
│ ├── notAuto_test_ContactService_markLinkUpdated.php
│ ├── notAuto_test_InvoiceService_calculateAmountOwed.php
│ ├── notAuto_test_InvoiceService_validateCreditCard.php
│ ├── notAuto_test_ContactService_getCampaignStepOrder.php
│ ├── notAuto_test_ContactService_locateContactLink.php
│ ├── notAuto_test_InvoiceService_getInvoiceQuickbooksIIF.php
│ ├── notAuto_test_DataService_getAppointmentICal.php
│ ├── notAuto_test_APIAffiliateService_affRunningTotals.php
│ ├── notAuto_test_InvoiceService_deleteSubscription.php
│ ├── notAuto_test_APIEmailService_getAvailableMergeFields.php
│ ├── notAuto_test_get_payment_with_charge_id.php
│ ├── notAuto_test_InvoiceService_createInvoiceForRecurring.php
│ ├── notAuto_test_InvoiceService_getPluginStatus.php
│ ├── testObjectTools.php
│ ├── notAuto_test_DataService_delete.php
│ ├── notAuto_test_DataService_add.php
│ ├── notAuto_test_APIEmailService_optOut.php
│ ├── notAuto_test_ContactService_update.php
│ ├── notAuto_test_FileService_renameFile.php
│ ├── notAuto_test_ContactService_load.php
│ ├── notAuto_test_DataService_getAppSetting.php
│ ├── notAuto_test_ContactService_addToGroup.php
│ ├── notAuto_test_InvoiceService_setInvoiceSyncStatus.php
│ ├── notAuto_test_InvoiceService_setPaymentSyncStatus.php
│ ├── notAuto_test_SearchService_getAllReportColumns.php
│ ├── notAuto_test_InvoiceService_locateExistingCard.php
│ ├── notAuto_test_ContactService_addWithDupCheck.php
│ ├── notAuto_test_ContactService_removeFromGroup.php
│ ├── notAuto_test_FileService_replaceFile.php
│ ├── notAuto_test_APIEmailService_optIn.php
│ ├── notAuto_test_ContactService_findByEmail.php
│ ├── notAuto_test_ContactService_addToCampaign.php
│ ├── notAuto_test_ContactService_getCampaigneeStepDetails.php
│ ├── notAuto_test_ContactService_pauseCampaign.php
│ ├── notAuto_test_DataService_updateCustomField.php
│ ├── notAuto_test_DataService_authenticateUser.php
│ ├── notAuto_test_ContactService_getNextCampaignStep.php
│ ├── notAuto_test_ContactService_removeFromCampaign.php
│ ├── notAuto_test_ContactService_getCampaigneeDetails.php
│ ├── notAuto_test_ContactService_resumeCampaignForContact.php
│ ├── notAuto_test_ContactService_merge.php
│ ├── notAuto_test_ContactService_rescheduleCampaignStep.php
│ ├── notAuto_test_ContactService_submitSurveyAndApplyActionSets.php
│ ├── notAuto_test_InvoiceService_updateJobRecurringNextBillDate.php
│ ├── notAuto_test_DataService_update.php
│ ├── notAuto_test_ContactService_getAppSetting.php
│ ├── notAuto_test_ContactService_getAppSettingInt.php
│ ├── notAuto_test_DataService_load.php
│ ├── notAuto_test_DataService_checkPermission.php
│ ├── testUtils.php
│ ├── notAuto_doubleOptInTest.php
│ ├── notAuto_test_ContactService_linkContact.php
│ ├── notAuto_test_DataService_getTemporaryKey.php
│ ├── notAuto_test_FileService_uploadFile.php
│ ├── notAuto_test_ContactService_applyActivityHistoryTemplate.php
│ ├── notAuto_test_SearchService_getSavedSearchResultsAllFields.php
│ ├── testCustomFieldService_cache.php
│ ├── notAuto_test_ContactService_runActionSequence.php
│ ├── notAuto_test_APIAffiliateService_affPayouts.php
│ ├── notAuto_test_APIAffiliateService_affClawbacks.php
│ ├── notAuto_test_APIAffiliateService_affSummary.php
│ ├── notAuto_test_APIAffiliateService_affCommissions.php
│ ├── notAuto_test_DataService_addCustomField.php
│ ├── testContactService.php
│ ├── notAuto_test_SearchService_getSavedSearchResults.php
│ ├── notAuto_test_APIAffiliateService_updatePhoneStats.php
│ ├── notAuto_test_InvoiceService_chargeInvoice.php
│ ├── notAuto_test_InvoiceService_createBlankOrder.php
│ ├── notAuto_test_InvoiceService_addRecurringCommissionOverride.php
│ ├── testConnectivity.php
│ ├── notAuto_test_DataService_findByField.php
│ ├── notAuto_test_InvoiceService_addManualPayment.php
│ ├── notAuto_test_DataService_query.php
│ └── notAuto_test_InvoiceService_addOrderItem.php
├── FileService.php
├── FunnelService.php
├── .hg_archival.txt
├── APIEmailService.php
├── DiscountService.php
├── ShippingService.php
├── Stage.php
├── Status.php
├── Ticket.php
├── CCharge.php
├── Expense.php
├── FileBox.php
├── Invoice.php
├── MtgLead.php
├── PayPlan.php
├── Product.php
├── CProgram.php
├── Campaign.php
├── Referral.php
├── StageMove.php
├── Template.php
├── UserGroup.php
├── Campaignee.php
├── DataFormTab.php
├── GroupAssign.php
├── InvoiceItem.php
├── LeadSource.php
├── PayPlanItem.php
├── ProductOption.php
├── SavedFilter.php
├── TicketStage.php
├── TicketType.php
├── CampaignStep.php
├── ContactGroup.php
├── LeadSourceExpense.php
├── ProductOptionValue.php
├── DataFormGroup.php
├── EmailAddStatus.php
├── InvoicePayment.php
├── LeadSourceCategory.php
├── ProductCategory.php
├── ProductInterest.php
├── Lead.php
├── LinkedContactType.php
├── ActionSequence.php
├── Company.php
├── ContactGroupCategory.php
├── JobRecurringInstance.php
├── ProductCategoryAssign.php
├── ProductInterestBundle.php
├── LeadSourceRecurringExpense.php
├── ContactAction.php
├── RecurringOrderWithContact.php
├── Generated
│ ├── a_template_class.php
│ ├── a_template_base_class.php
│ ├── EmailAddStatus.php
│ ├── ProductCategoryAssign.php
│ ├── TicketStage.php
│ ├── LeadSourceCategory.php
│ ├── Campaign.php
│ ├── UserGroup.php
│ ├── DataFormGroup.php
│ ├── DataFormTab.php
│ ├── TicketType.php
│ ├── ProductCategory.php
│ ├── GroupAssign.php
│ ├── ActionSequence.php
│ ├── ProductInterestBundle.php
│ ├── Stage.php
│ ├── Template.php
│ ├── Status.php
│ ├── ContactGroupCategory.php
│ ├── SavedFilter.php
│ ├── Campaignee.php
│ ├── ContactGroup.php
│ ├── ContactGroupAssign.php
│ ├── CampaignStep.php
│ ├── FileBox.php
│ ├── PayPlanItem.php
│ ├── Expense.php
│ ├── LeadSourceExpense.php
│ ├── InvoicePayment.php
│ ├── ProductInterest.php
│ ├── ProductOptionValue.php
│ ├── PayPlan.php
│ ├── LeadSourceRecurringExpense.php
│ ├── Referral.php
│ ├── CCharge.php
│ ├── DataFormField.php
│ ├── InvoiceItem.php
│ ├── StageMove.php
│ ├── JobRecurringInstance.php
│ ├── OrderItem.php
│ ├── LeadSource.php
│ ├── Payment.php
│ ├── LinkedContactType.php
│ ├── SubscriptionPlan.php
│ ├── ProductOption.php
│ ├── CProgram.php
│ ├── Product.php
│ └── MtgLead.php
├── SearchService.php
├── TokenStorageProvider.php
├── ProductServiceBase.php
├── Exception.php
├── DiscountServiceBase.php
├── DataServiceBase.php
├── FunnelServiceBase.php
├── CacheProvider.php
├── SdkEvent.php
├── config.sample.php
├── Affiliate.php
├── examples
│ ├── get_saved_search_data.php
│ ├── get_all_contacts_with_custom_fields.php
│ ├── leadscoring.php
│ ├── explore_custom_fields.php
│ ├── events.php
│ ├── create_order.php
│ ├── linked-contacts.php
│ ├── get_invoices_for_contact.php
│ ├── object_editor_all_tables.php
│ └── list_objects.php
├── utilities
│ ├── make_phpstorm_property_hints.php
│ └── code_generator.php
├── WebFormServiceBase.php
├── Contact.php
├── Logger.php
├── CacheTools.php
├── infusionsoft.php
├── OrderServiceBase.php
├── ObjectTools.php
├── CreditCard.php
├── Job.php
├── EmailStatus.php
├── SdkEventManager.php
├── ContactGroupAssign.php
├── User.php
├── Classloader.php
├── Payment.php
├── EmailSent.php
├── EmailBroadcast.php
├── PhoneContact.php
├── ContactService.php
├── CampaignGoalCompletion.php
├── SubscriptionPlan.php
├── SimpleJsonFileTokenStorageProvider.php
├── ActivityFeed.php
├── CreditCardSubmissionService.php
└── FileServiceBase.php
├── .gitignore
├── TestMocks
└── Infusionsoft
│ ├── LowLevelMockService.php
│ └── LowLevelFunnelService.php
├── composer.json
├── example.php
└── MIT-LICENSE.txt
/Infusionsoft/style.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Infusionsoft/cache/empty:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Infusionsoft/exports/empty:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Infusionsoft/.htaccess:
--------------------------------------------------------------------------------
1 | IndexOptions NameWidth=80
2 |
--------------------------------------------------------------------------------
/Infusionsoft/admin/remove_field_files/0.9.13_remove_fields.txt:
--------------------------------------------------------------------------------
1 | a:0:{}
--------------------------------------------------------------------------------
/Infusionsoft/admin/remove_field_files/0.9.14_remove_fields.txt:
--------------------------------------------------------------------------------
1 | a:0:{}
--------------------------------------------------------------------------------
/Infusionsoft/tests/testClassLoader.php:
--------------------------------------------------------------------------------
1 | enableDebug();
9 | $contact = new Infusionsoft_Contact(1);
10 |
--------------------------------------------------------------------------------
/Infusionsoft/CampaignStep.php:
--------------------------------------------------------------------------------
1 |
2 | class Infusionsoft_table; ?> extends Infusionsoft_Generated_table; ?>{
3 | public function __construct($id = null, $app = null){
4 | parent::__construct($id, $app);
5 | }
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/Infusionsoft/SearchService.php:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
3 |
4 |
5 |
6 |
3 |
4 |
5 |
6 |
3 |
4 |
5 |
6 |
3 |
4 |
5 |
6 | message = $message;
8 | $this->method = $method;
9 | $this->args = $args;
10 | }
11 |
12 | public function __toString()
13 | {
14 | return $this->message;
15 | }
16 | }
--------------------------------------------------------------------------------
/Infusionsoft/DiscountServiceBase.php:
--------------------------------------------------------------------------------
1 | data = $data;
14 | }
15 | }
--------------------------------------------------------------------------------
/Infusionsoft/DataServiceBase.php:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | '%'), 'Id', false);
12 | var_dump($out);
13 | }
--------------------------------------------------------------------------------
/Infusionsoft/FunnelServiceBase.php:
--------------------------------------------------------------------------------
1 | $webformName){
8 | ?>
9 |
Webform:
10 |
--------------------------------------------------------------------------------
/Infusionsoft/SdkEvent.php:
--------------------------------------------------------------------------------
1 | subject = $subject;
15 | $this->params = $params;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_getEmailTemplate.php:
--------------------------------------------------------------------------------
1 |
5 |
12 | Template Source (htmlBody)
13 | " . $template['htmlBody'] . "";
15 | }
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_ContactService_add.php:
--------------------------------------------------------------------------------
1 |
2 |
7 |
3 | hash:
4 |
5 |
6 |
7 |
3 | data:
4 |
5 |
6 |
7 |
3 | fileId:
4 |
5 |
6 |
7 |
3 | email:
4 |
5 |
6 |
7 |
3 | fileId:
4 |
5 |
6 |
7 |
2 | userId:
3 |
4 |
5 |
6 |
3 | orderId:
4 |
5 |
6 |
7 |
2 | userId:
3 |
4 |
5 |
6 |
3 | webformId:
4 |
5 |
6 |
7 |
3 | invoiceId:
4 |
5 |
6 |
7 |
3 | invoiceId:
4 |
5 |
6 |
7 |
3 | invoiceId:
4 |
5 |
6 |
7 | Id, $startDate, $endDate);
11 |
12 | foreach ($commissionData)
13 | }
14 | */
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_ContactService_getCampaignStepDetails.php:
--------------------------------------------------------------------------------
1 |
2 |
7 |
3 | invoiceId:
4 |
5 |
6 |
7 | 0);
16 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_APIEmailService_getEmailTemplate.php:
--------------------------------------------------------------------------------
1 |
2 |
7 |
3 | locateMapId:
4 |
5 |
6 |
7 |
3 | invoiceId:
4 |
5 |
6 |
7 |
3 | creditCard:
4 |
5 |
6 |
7 | data->achieveGoal($integrationName, $method, $contactId);
7 | return true;
8 | }
9 | }
10 | /**
11 | * Created by JetBrains PhpStorm.
12 | * User: joey
13 | * Date: 1/28/13
14 | * Time: 3:11 AM
15 | * To change this template use File | Settings | File Templates.
16 | */
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_ContactService_getCampaignStepOrder.php:
--------------------------------------------------------------------------------
1 |
2 |
7 |
3 | locateMapId:
4 |
5 |
6 |
7 |
3 | invoiceId:
4 |
5 |
6 |
7 |
3 | appointmentId:
4 |
5 |
6 |
7 |
3 | affiliateIds:
4 |
5 |
6 |
7 |
3 | subscriptionId:
4 |
5 |
6 |
7 |
3 | mergeContext:
4 |
5 |
6 |
7 |
3 | CChargeId:
4 |
5 |
6 |
7 | $_REQUEST['cChargeId']), 'Id');
13 | var_dump($out);
14 | }
--------------------------------------------------------------------------------
/Infusionsoft/utilities/make_phpstorm_property_hints.php:
--------------------------------------------------------------------------------
1 | getFields();
10 | ?>
11 | =$table?>
12 | /**
13 | */
18 | }
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Infusionsoft/WebFormServiceBase.php:
--------------------------------------------------------------------------------
1 |
3 | recurringOrderId:
4 |
5 |
6 |
7 |
3 | fullyQualifiedClassName:
4 |
5 |
6 |
7 | FirstName = 'A';
7 |
8 | $b = new Infusionsoft_Contact();
9 | $b->FirstName = 'B';
10 |
11 | $c = new Infusionsoft_Contact();
12 | $c->FirstName = 'A';
13 |
14 | $objects[] = $a;
15 | $objects[] = $b;
16 | $objects[] = $c;
17 |
18 | $results = Infusionsoft_ObjectTools::findObjectsInList($objects, array('FirstName' => 'A'));
19 |
20 | if(count($results) == 2){
21 | echo 'Success!!';
22 | } else {
23 | echo 'False!!';
24 | }
25 | ?>
--------------------------------------------------------------------------------
/Infusionsoft/Generated/a_template_base_class.php:
--------------------------------------------------------------------------------
1 |
2 | class Infusionsoft_Generated_table; ?> extends Infusionsoft_Generated_Base{
3 | protected static $tableFields = getFieldsAsArraySource(); ?>;
4 |
5 |
6 | public function __construct($id = null, $app = null){
7 | parent::__construct('table; ?>', $id, $app);
8 | }
9 |
10 | public function getFields(){
11 | return self::$tableFields;
12 | }
13 |
14 | public function addCustomField($name){
15 | self::$tableFields[] = $name;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_DataService_delete.php:
--------------------------------------------------------------------------------
1 |
2 |
8 | Id;
12 | }
13 | if ($app == null){
14 | $app = Infusionsoft_AppPool::getApp();
15 | }
16 |
17 | return 'https://' . $app->getHostname() . '/Contact/manageContact.jsp?view=edit&ID=' . $id;
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_DataService_add.php:
--------------------------------------------------------------------------------
1 |
2 |
8 | Name;
12 | }
13 |
14 | $contact->addCustomFields($customFieldsAsArray);
15 |
16 | $contacts = Infusionsoft_DataService::queryWithOrderBy(new Infusionsoft_Contact(), array('Id' => '%'), 'LastUpdated', 1, 1, array('Id'));
17 |
18 | var_dump($contacts);
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_APIEmailService_optOut.php:
--------------------------------------------------------------------------------
1 |
2 |
8 |
3 | contactId:
4 | data:
5 |
6 |
7 |
8 |
3 | fileId:
4 | fileName:
5 |
6 |
7 |
8 |
3 | id:
4 | selectedFields:
5 |
6 |
7 |
8 |
3 | module:
4 | setting:
5 |
6 |
7 |
8 |
3 | contactId:
4 | groupId:
5 |
6 |
7 |
8 |
3 | id:
4 | syncStatus:
5 |
6 |
7 |
8 |
3 | id:
4 | syncStatus:
5 |
6 |
7 |
8 |
2 | savedSearchId:
3 | userId:
4 |
5 |
6 |
7 |
3 | contactId:
4 | last4:
5 |
6 |
7 |
8 |
3 | data:
4 | dupCheckType:
5 |
6 |
7 |
8 |
3 | contactId:
4 | groupId:
5 |
6 |
7 |
8 |
3 | fileId:
4 | base64encoded:
5 |
6 |
7 |
8 |
3 | email:
4 | permissionReason:
5 |
6 |
7 |
8 |
3 | email:
4 | selectedFields:
5 |
6 |
7 |
8 |
2 | ContactId:
3 |
4 |
5 | _LeadScore = $contact->_LeadScore + 1;
12 | $contact->save();
13 |
14 | echo 'Lead Score for Contact: ' . htmlspecialchars($contact->FirstName) . ' ' . htmlspecialchars($contact->LastName) . ' is now: ' . htmlspecialchars($contact->_LeadScore);
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_ContactService_addToCampaign.php:
--------------------------------------------------------------------------------
1 |
2 |
8 |
3 | contactId:
4 | stepId:
5 |
6 |
7 |
8 |
3 | contactId:
4 | campaignId:
5 |
6 |
7 |
8 |
3 | customFieldId:
4 | values:
5 |
6 |
7 |
8 | getTable() . '_';
15 | }
16 | $files = glob($path . $glob_base . '*');
17 | foreach ($files as $file) {
18 | if (is_file($file)) {
19 | unlink($file);
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_DataService_authenticateUser.php:
--------------------------------------------------------------------------------
1 |
2 |
8 |
3 | contactId:
4 | campaignId:
5 |
6 |
7 |
8 |
3 | contactId:
4 | campaignId:
5 |
6 |
7 |
8 |
3 | contactId:
4 | campaignId:
5 |
6 |
7 |
8 |
3 | contactId:
4 | campaignId:
5 |
6 |
7 |
8 |
3 | contactId:
4 | duplicateContactId:
5 |
6 |
7 |
8 | $value){
15 | if($object->$field != $value){
16 | $match = false;
17 | }
18 | }
19 | if($match){
20 | $matches[] = $object;
21 | }
22 | }
23 |
24 | return $matches;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_ContactService_rescheduleCampaignStep.php:
--------------------------------------------------------------------------------
1 |
2 |
8 | =5.2.0",
16 | "ext-curl": "*",
17 | "neitanod/forceutf8": "~2.0"
18 | },
19 | "autoload": {
20 | "classmap": ["Infusionsoft/infusionsoft.php"]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_ContactService_submitSurveyAndApplyActionSets.php:
--------------------------------------------------------------------------------
1 |
2 |
8 |
3 | jobRecurringId:
4 | newNextBillDate:
5 |
6 |
7 |
8 |
3 | table:
4 | id:
5 | values:
6 |
7 |
8 |
9 |
3 | hash:
4 | module:
5 | param:
6 |
7 |
8 |
9 |
3 | hash:
4 | module:
5 | param:
6 |
7 |
8 |
9 |
3 | table:
4 | id:
5 | selectedFields:
6 |
7 |
8 |
9 |
3 | userId:
4 | module:
5 | setting:
6 |
7 |
8 |
9 | 0){
25 | echo 'It Works!';
26 | }
27 | else{
28 | echo 'It Doesnt Work...';
29 | var_dump($out);
30 | }
31 | }
32 |
33 | function didItWorkObject($out){
34 | if(is_object($out) && $out->Id != ''){
35 | echo 'It Works!';
36 | }
37 | else{
38 | echo 'It Doesnt Work...';
39 | var_dump($out);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Infusionsoft/examples/explore_custom_fields.php:
--------------------------------------------------------------------------------
1 | Name == 'Test'){
11 | $customFieldValues = $customField->getCustomFieldValues();
12 | $customFieldValues[] = rand(1, 100) . ' Value';
13 | $customField->setCustomFieldValues($customFieldValues);
14 | //$customField->save();
15 | }
16 | }
17 |
18 | $customField = Infusionsoft_CustomFieldService::getCustomField(new Infusionsoft_Contact(), 'Test');
19 | var_dump($customField);
20 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_doubleOptInTest.php:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
14 |
15 |
21 |
22 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_ContactService_linkContact.php:
--------------------------------------------------------------------------------
1 |
2 |
9 | Id == ''){
17 | $invoiceId = Infusionsoft_InvoiceService::createBlankOrder($this->ContactId, $this->JobNotes, date('Ymd\TH:i:s', strtotime($this->StartDate)), 0, 0, $app);
18 | $invoice = new Infusionsoft_Invoice($invoiceId);
19 | $this->Id = $invoice->JobId;
20 | }
21 |
22 | $result = parent::save($app);
23 |
24 | return $result;
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_DataService_getTemporaryKey.php:
--------------------------------------------------------------------------------
1 |
2 |
9 |
3 | contactId:
4 | fileName:
5 | base64encoded:
6 |
7 |
8 |
9 |
3 | contactId:
4 | historyId:
5 | userId:
6 |
7 |
8 |
9 |
2 | savedSearchId:
3 | userId:
4 | pageNumber:
5 |
6 |
7 |
8 | array(
5 | ),
6 | '0.9.13' => array(
7 | ),
8 | '0.9.12' => array(
9 | 'Infusionsoft_CProgram' => array('SubCategory')
10 | ),
11 | );
12 |
13 | //We want a cascading effect. If in version 0.9.6 we remove a field, we want to add it to all previous files, so we
14 | //start with the latest version, and work our way backwards, always adding any removed fields from a later date to the earlier versions.
15 | ?> $fields){
17 | if(!empty($previous_fields)) $fields = array_merge($fields, $previous_fields);
18 | $file = fopen('remove_field_files/' . $version . "_remove_fields.txt", "w");
19 | fwrite($file, serialize($fields));
20 | echo $version . " - " . print_r($fields, true) . " ";
21 | $previous_fields = $fields;
22 | }
23 | ?>
3 | contactId:
4 | actionSequenceId:
5 | params:
6 |
7 |
8 |
9 |
3 | affiliateId:
4 | filterStartDate:
5 | filterEndDate:
6 |
7 |
8 |
9 | table = 'EmailStatus';
21 | }
22 |
23 | public function getFields(){
24 | return self::$tableFields;
25 | }
26 |
27 | public function save() {
28 | throw new Infusionsoft_Exception("EmailStatus cannot be saved since they are loaded from a saved search, and not accessible via the Data Service");
29 | }
30 |
31 | public function loadFromArray($data){
32 | parent::loadFromArray($data, true);
33 | $this->Id = $data['Id'];
34 | }
35 | }
--------------------------------------------------------------------------------
/Infusionsoft/Generated/LeadSourceCategory.php:
--------------------------------------------------------------------------------
1 |
3 | affiliateId:
4 | filterStartDate:
5 | filterEndDate:
6 |
7 |
8 |
9 |
3 | affiliateIds:
4 | filterStartDate:
5 | filterEndDate:
6 |
7 |
8 |
9 |
3 | affiliateId:
4 | filterStartDate:
5 | filterEndDate:
6 |
7 |
8 |
9 | FirstName = 'TEST';
13 | $contact->save();
14 | $contact2 = new Infusionsoft_Contact($contact->Id);
15 | $contact2->delete();
16 |
17 | function loaded($event){
18 | echo 'Loaded! ';
19 | }
20 |
21 | function deleted(Infusionsoft_SdkEvent $event){
22 | echo 'Deleted! ';
23 | }
24 |
25 | function saved(Infusionsoft_SdkEvent $event){
26 | echo 'Saved! ';
27 | }
28 |
29 | function saved2(Infusionsoft_SdkEvent $event){
30 | echo 'Saved2! ';
31 | }
--------------------------------------------------------------------------------
/Infusionsoft/Generated/Campaignee.php:
--------------------------------------------------------------------------------
1 |
3 | context:
4 | displayName:
5 | dataType:
6 | groupId:
7 |
8 |
9 |
10 | StartDate = date('Y-m-d H:i:s', strtotime("-1 month"));
10 | $recurringOrder->PaidThruDate = date('Y-m-d H:i:s', strtotime("-1 month"));
11 | $recurringOrder->save();
12 | echo "Subscription Created: " . htmlspecialchars($recurring_order_id) . " ";
13 | }
14 |
15 | ?>
16 | Create Subscription
17 |
22 |
--------------------------------------------------------------------------------
/Infusionsoft/examples/linked-contacts.php:
--------------------------------------------------------------------------------
1 | '%'));
5 |
6 | var_dump($linkedContactTypes);
7 | $firstType = array_shift($linkedContactTypes);
8 |
9 | $contactA = new Infusionsoft_Contact(68665);
10 |
11 | $contactB = new Infusionsoft_Contact(68667);
12 |
13 | Infusionsoft_ContactService::linkContacts($contactA->Id, $contactB->Id, $firstType->Id);
14 |
15 | //What happens with an Invalid Link...
16 | $out = Infusionsoft_ContactService::linkContacts($contactA->Id, 12039875, $firstType->Id);
17 | var_dump($out);
18 |
19 | //What happens with an Invalid Link...
20 | $out = Infusionsoft_ContactService::linkContacts($contactA->Id, 12039875, $firstType->Id);
21 | var_dump($out);
22 | //
23 | //$linkedContacts = Infusionsoft_DataService::query(new Infusionsoft_LinkedContact(), array('Id' => '%'));
24 | //
25 | //var_dump($linkedContacts);
26 |
27 | $linkedContacts = Infusionsoft_ContactService::listLinkedContacts($contactB->Id);
28 | var_dump($linkedContacts);
--------------------------------------------------------------------------------
/Infusionsoft/Generated/ContactGroupAssign.php:
--------------------------------------------------------------------------------
1 | FirstName;
19 |
20 | //Change a value on the loaded Contact object and save the change to Infusionsoft
21 | $contact->FirstName = 'Bob';
22 | $contact->save();
23 |
24 |
25 | /**
26 | * Using the Infusionsoft_DataService::query method
27 | */
28 |
29 | //Query using two different field criteria
30 | $contacts = Infusionsoft_DataService::query(new Infusionsoft_Contact(), array('FirstName' => 'Bob', 'LastName' => 'Doe'));
31 |
32 | //Querying using an IN statement
33 | $contacts = Infusionsoft_DataService::query(new Infusionsoft_Contact(), array('Id' => array(3,5,7)));
--------------------------------------------------------------------------------
/Infusionsoft/Generated/CampaignStep.php:
--------------------------------------------------------------------------------
1 | $id % 10000000, 'ContactId' => floor($id / 10000000)), 1, 0, array('ContactId', 'GroupId', 'DateCreated', 'ContactGroup'), $app);
8 | if (count($results) == 0) {
9 | throw new Infusionsoft_Exception("Could not load " . $this->table . " with id " . $id);
10 | }
11 | $object = $results[0];
12 |
13 |
14 |
15 | $this->GroupId = $object->GroupId;
16 | $this->ContactId = $object->ContactId;
17 | $this->ContactGroup = $object->ContactGroup;
18 | $this->DateCreated = $object->DateCreated;
19 | $this->data['Id'] = $this->ContactId * 10000000 + $this->GroupId;
20 | }
21 |
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/Infusionsoft/Generated/FileBox.php:
--------------------------------------------------------------------------------
1 |
5 | Testing Save With New Contact
6 | FirstName = 'Joey';
9 |
10 | $out = Infusionsoft_ContactService::save($contact);
11 | ?>
12 |
13 |
14 | Testing Save With Existing Contact
15 | FirstName = 'Joey';
17 |
18 | $out = Infusionsoft_ContactService::save($contact);
19 | ?>
20 |
21 |
22 | Testing Add To Campaign
23 |
27 |
28 |
29 |
30 |
31 | Testing Add To Group
32 |
36 |
37 |
38 | Testing Load
39 | Id);
42 |
43 | ?>
44 |
--------------------------------------------------------------------------------
/Infusionsoft/Generated/Expense.php:
--------------------------------------------------------------------------------
1 | paths[] = $path;
15 | }
16 | $path = dirname(dirname(__FILE__)) . "/";
17 | $this->paths[] = $path;
18 | }
19 |
20 | public function loadClass($className)
21 | {
22 | if (strpos($className, "Infusionsoft_") === 0) {
23 | $className = preg_replace('/[^a-zA-Z0-9_]/s', '', $className);
24 | $relativePath = str_replace('_', "/", $className) . ".php";
25 | foreach ($this->paths as $path) {
26 | if (file_exists($path . $relativePath)) {
27 | include($path . $relativePath);
28 | return true;
29 | }
30 | }
31 | }
32 | return false;
33 | }
34 |
35 | protected function addPath($path)
36 | {
37 | $paths[] = $path;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_SearchService_getSavedSearchResults.php:
--------------------------------------------------------------------------------
1 |
2 |
10 | $value));
11 | $invoice = array_shift($invoices);
12 | $this->InvoiceId = $invoice->Id;
13 | } else {
14 | parent::__set($name, $value);
15 | }
16 | }
17 |
18 | public function save($app = null){
19 | if($this->Id == ''){
20 | $success = Infusionsoft_InvoiceService::addManualPayment($this->InvoiceId, $this->PayAmt, $this->PayDate, $this->PayType, $this->PayNote, false, $app);
21 | if(!$success){
22 | throw new Infusionsoft_Exception("Failed while saving payment: " . json_encode($this->toArray()));
23 | }
24 | $this->Id = 'Created, But, Cannot Get Id';
25 | }
26 |
27 | return true;
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/MIT-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2014 Novak Solutions LLC and other contributors
2 | http://novaksolutions.com/
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining
5 | a copy of this software and associated documentation files (the
6 | "Software"), to deal in the Software without restriction, including
7 | without limitation the rights to use, copy, modify, merge, publish,
8 | distribute, sublicense, and/or sell copies of the Software, and to
9 | permit persons to whom the Software is furnished to do so, subject to
10 | the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Infusionsoft/Generated/LeadSourceExpense.php:
--------------------------------------------------------------------------------
1 | table = 'EmailSent';
31 | }
32 |
33 | public function getFields(){
34 | return self::$tableFields;
35 | }
36 |
37 | public function save() {
38 | throw new Infusionsoft_Exception("EmailSent cannot be saved since they are loaded from a saved search, and not accessible via the Data Service");
39 | }
40 |
41 | public function loadFromArray($data){
42 | parent::loadFromArray($data, true);
43 | $this->Id = $data['EmailSentId'];
44 | }
45 | }
--------------------------------------------------------------------------------
/Infusionsoft/Generated/LeadSourceRecurringExpense.php:
--------------------------------------------------------------------------------
1 |
3 | firstName:
4 | lastName:
5 | calls:
6 | totalTime:
7 | averageTime:
8 |
9 |
10 |
11 |
5 |
6 |
7 |
11 |
12 | No Invoices Found
21 | New Invoice
22 | getFields() as $field){
24 | ?>
25 |
26 |
27 | $field); ?>
28 |
29 |
40 |
41 |
--------------------------------------------------------------------------------
/Infusionsoft/Generated/OrderItem.php:
--------------------------------------------------------------------------------
1 |
3 | invoiceId:
4 | notes:
5 | creditCardId:
6 | merchantAccountId:
7 | bypassCommissions:
8 |
9 |
10 |
11 |
3 | contactId:
4 | description:
5 | orderDate:
6 | leadAffiliateId:
7 | saleAffiliateId:
8 |
9 |
10 |
11 | table = 'EmailBroadcast';
35 | }
36 |
37 | public function getFields(){
38 | return self::$tableFields;
39 | }
40 |
41 | public function save() {
42 | throw new Infusionsoft_Exception("EmailBroadcast cannot be saved since they are loaded from a saved search, and not accessible via the Data Service");
43 | }
44 |
45 | public function loadFromArray($data){
46 | parent::loadFromArray($data, true);
47 | $this->Id = $data['MailBatchId'];
48 | }
49 | }
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_InvoiceService_addRecurringCommissionOverride.php:
--------------------------------------------------------------------------------
1 |
2 |
11 |
6 | Testing Host getHostname() . ':' . $app->getPort();?> with API Ping.
7 |
8 |
11 | Ping Succeeded!! Testing your API Key: by calling WebFormService.getMap.
12 | It Works! Everything is communicating properly and your API Key is correct.getMessage(), "[InvalidKey]") !== FALSE){
20 | echo ' Failure!!! Your Key is not correct, please double check the key you put in the config.php with the APIKey in your apps Misc Settings.';
21 | }
22 | else{
23 | echo ' Failure!!! Some other error: ' . $e->error;
24 | }
25 | }
26 | }
27 | else{
28 | ?>
29 | Something is wrong, see below for details, check your config file and
30 | try again.
31 |
34 |
35 |
36 |
37 | getExceptions();
39 | foreach($exceptions as $exception){
40 | echo $exception->getMessage();
41 | ?>
42 |
43 |
3 | table:
4 | limit:
5 | page:
6 | fieldName:
7 | fieldValue:
8 | selectedFields:
9 |
10 |
11 |
12 | 'Contact',
3 | 1 => 'User',
4 | 2 => 'UserGroup',
5 | 3 => 'GroupAssign',
6 | 4 => 'Campaignee',
7 | 5 => 'Template',
8 | 6 => 'CampaignStep',
9 | 7 => 'MtgLead',
10 | 8 => 'Lead',
11 | 9 => 'Stage',
12 | 47 => 'StageMove',
13 | 10 => 'Status',
14 | 11 => 'ProductInterest',
15 | 12 => 'ProductInterestBundle',
16 | 46 => 'ProductCategoryAssign',
17 | 57 => 'ProductCategory',
18 | 13 => 'CProgram',
19 | 14 => 'Product',
20 | 15 => 'CreditCard',
21 | 16 => 'RecurringOrder',
22 | 17 => 'RecurringOrderWithContact',
23 | 18 => 'ContactGroupAssign',
24 | 19 => 'ContactGroup',
25 | 20 => 'ContactGroupCategory',
26 | 21 => 'LeadSource',
27 | 22 => 'Campaign',
28 | 23 => 'Invoice',
29 | 24 => 'Affiliate',
30 | 25 => 'Referral',
31 | 26 => 'InvoiceItem',
32 | 27 => 'InvoicePayment',
33 | 28 => 'PayPlan',
34 | 29 => 'PayPlanItem',
35 | 30 => 'Payment',
36 | 31 => 'CCharge',
37 | 32 => 'Job',
38 | 33 => 'JobRecurringInstance',
39 | 34 => 'OrderItem',
40 | 35 => 'ActionSequence',
41 | 36 => 'ContactAction',
42 | 37 => 'Ticket',
43 | 38 => 'TicketStage',
44 | 39 => 'TicketType',
45 | 40 => 'DataFormTab',
46 | 41 => 'DataFormGroup',
47 | 42 => 'DataFormField',
48 | 43 => 'Expense',
49 | 44 => 'FileBox',
50 | 45 => 'SavedFilter',
51 | 46 => 'Company',
52 | 48 => 'SubscriptionPlan',
53 |
54 | );
--------------------------------------------------------------------------------
/Infusionsoft/Generated/ProductOption.php:
--------------------------------------------------------------------------------
1 |
3 | invoiceId:
4 | amt:
5 | paymentDate:
6 | paymentType:
7 | paymentDescription:
8 | bypassCommissions:
9 |
10 |
11 |
12 | $categoryName));
5 | if(count($categories) > 0){
6 | $category = array_shift($categories);
7 | } else {
8 | throw new Exception("Tag Category: " . $categoryName . " doesn't exist.");
9 | }
10 |
11 | $tags = Infusionsoft_DataService::query(new Infusionsoft_ContactGroup(), array('GroupCategoryId' => $category->Id));
12 | $contactList = array();
13 | foreach($tags as $tag){
14 | /** @var Infusionsoft_ContactGroup $tag */
15 | Infusionsoft_ContactGroupAssign::addCustomField("Contact.FirstName");
16 | Infusionsoft_ContactGroupAssign::addCustomField("Contact.LastName");
17 | $contacts = Infusionsoft_DataService::query(new Infusionsoft_ContactGroupAssign(), array('GroupId' => $tag->Id));
18 | foreach($contacts as $contact){
19 | /** @var Infusionsoft_ContactGroupAssign $contact */
20 | if(!isset($contactList[$contact->ContactId])){
21 | $contactList[$contact->ContactId] = $contact->__get('Contact.FirstName') . ' ' . $contact->__get('Contact.LastName');
22 | }
23 | }
24 | }
25 |
26 | return $contactList;
27 | }
28 | }
--------------------------------------------------------------------------------
/Infusionsoft/CampaignGoalCompletion.php:
--------------------------------------------------------------------------------
1 | table = 'CampaignGoalCompletion';
21 | }
22 |
23 | public function getFields(){
24 | return self::$tableFields;
25 | }
26 |
27 | public function save() {
28 | throw new Infusionsoft_Exception("CampaignGoalCompletion cannot be saved since they are loaded from a saved search, and not accessible via the Data Service");
29 | }
30 |
31 | public function loadFromArray($data){
32 | parent::loadFromArray($data, true);
33 | foreach($data as $key=>$value){
34 | if($key == 'funnel.goalachieved.goal.name'){
35 | $this->GoalName = $value;
36 | } elseif($key == 'funnel.goalachieved.funnel.name'){
37 | $this->CampaignName = $value;
38 | } elseif($key == 'funnel.goalachieved.date.achieved'){
39 | $this->GoalCompletionDate = $value;
40 | }
41 | }
42 | $this->Id = $data['ContactId'].'-'.$data['funnel.goalachieved.goal.name'].'-'.$data['funnel.goalachieved.date.achieved'];
43 | }
44 | }
--------------------------------------------------------------------------------
/Infusionsoft/utilities/code_generator.php:
--------------------------------------------------------------------------------
1 | ";
8 | require_once('../examples/object_editor_all_tables.php');
9 | foreach($all_tables as $table){
10 | $file_name = str_replace('~TableName~', $table, $_POST['fileNamePattern']);
11 | file_put_contents($file_name, str_replace("~TableName~", $table, $_POST['fileTemplate']));
12 | echo "Creating File: $file_name ";
13 | }
14 | echo "Done Merging Files.. ";
15 | }
16 |
17 | /**
18 | * Created by JetBrains PhpStorm.
19 | * User: Joey
20 | * Date: 8/24/12
21 | * Time: 2:02 PM
22 | * To change this template use File | Settings | File Templates.
23 | */
24 | ?>
25 | Code Generator
26 | This tool will generate a file based on the information you put in below for each Data Object.
27 |
32 |
--------------------------------------------------------------------------------
/Infusionsoft/tests/notAuto_test_DataService_query.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | table:
4 | limit:
5 | page:
6 | queryData:
7 | selectedFields:
8 | orderBy:
9 | ascending:
10 |
11 |
12 |
13 |
3 | invoiceId:
4 | productId:
5 | type:
6 | price:
7 | quantity:
8 | description:
9 | notes:
10 |
11 |
12 |
13 | getSimplePrice() . ' / ' . $this->getHumanizedCycle();
9 | }
10 |
11 | public function getSimplePrice(){
12 | if(round($this->PlanPrice) == $this->PlanPrice){
13 | return "\${$this->PlanPrice}";
14 | } else {
15 | return "$" . number_format($this->PlanPrice, 2);
16 | }
17 | }
18 |
19 | public function getHumanizedCycle(){
20 | $cycle = '';
21 | switch($this->Cycle){
22 | case 3:
23 | $cycle = "Week";
24 | break;
25 | case 2:
26 | $cycle = "Month";
27 | break;
28 | case 1:
29 | $cycle = "Year";
30 | break;
31 | case 6:
32 | $cycle = "Day";
33 | break;
34 | default:
35 | $cycle = "Ack! Unknown!";
36 | break;
37 | }
38 |
39 | if($this->Frequency > 1){
40 | $cycle = $this->Frequency . ' ' . $cycle . 's';
41 | }
42 |
43 | return $cycle;
44 | }
45 |
46 | public function __set($name, $value)
47 | {
48 | if(in_array($name, array('Frequency', 'Cycle', 'ProductId'))) {
49 | $value = (int) $value;
50 | }
51 |
52 | parent::__set($name, $value);
53 | }
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/Infusionsoft/examples/list_objects.php:
--------------------------------------------------------------------------------
1 |
9 |
10 | Table:
11 |
12 |
19 |
20 |
21 |
22 | '%'));
29 | ?>
30 |
31 |
32 |
33 | getFields() as $field){
35 | ?>=htmlspecialchars($field)?>
38 |
39 |
40 |
41 | toArray() as $data){
45 | ?>=htmlspecialchars($data)?>
50 |
51 |
52 | fileName = $fileName;
8 | }
9 |
10 | public function saveTokens($appDomainName, $accessToken, $refreshToken, $expiresIn){
11 | $data = $this->readFile();
12 |
13 | $data[$appDomainName] = array(
14 | 'accessToken' => $accessToken,
15 | 'refreshToken' => $refreshToken,
16 | 'expiresAt' => time() + $expiresIn
17 | );
18 |
19 | file_put_contents($this->fileName, "readFile();
24 | if(isset($data[$appDomainName])){
25 | return $data[$appDomainName];
26 | } else {
27 | return array(
28 | 'accessToken' => '',
29 | 'refreshToken' => '',
30 | 'expiresAt' => 0
31 | );
32 | }
33 | }
34 |
35 | public function readFile(){
36 | if (file_exists($this->fileName)) {
37 | $fileContents = file_get_contents($this->fileName);
38 | $fileContents = substr($fileContents, 8);
39 | $data = json_decode($fileContents, true);
40 | return $data;
41 | } else {
42 | $data = array();
43 | return $data;
44 | }
45 | }
46 |
47 | public function getFirstAppName(){
48 | $data = $this->readFile();
49 | return array_keys($data)[0];
50 | }
51 | }
--------------------------------------------------------------------------------
/Infusionsoft/Generated/Product.php:
--------------------------------------------------------------------------------
1 | table = 'ActivityFeed';
33 | }
34 |
35 | public function getFields(){
36 | return self::$tableFields;
37 | }
38 |
39 | public function save() {
40 | throw new Infusionsoft_Exception("ActivityFeed cannot be saved since they are loaded from a saved search, and not accessible via the Data Service");
41 | }
42 |
43 | public function loadFromArray($data){
44 | parent::loadFromArray($data, true);
45 | $this->Id = $data['ContactId'] * 100000000000 + $this->actionToId($data['Type']) * 10000000000 + strtotime($data['Date']);
46 | }
47 |
48 | public function actionToId($actionName){
49 | switch($actionName){
50 | case "EmailOpen":
51 | return 1;
52 | case "EmailClick":
53 | return 2;
54 | case "WebFormSubmission":
55 | return 3;
56 | default:
57 | return 4;
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/Infusionsoft/CreditCardSubmissionService.php:
--------------------------------------------------------------------------------
1 | getHostName()}/app/creditCardSubmission/addCreditCard";
32 | return $url;
33 | }
34 |
35 | public static function requestCreditCardId($token, Infusionsoft_App $app = null){
36 |
37 | $params = array(
38 | $token
39 | );
40 |
41 | $result = parent::send($app, "CreditCardSubmissionService.requestCreditCardId", $params);
42 | foreach ($result as $key => $value){
43 | $cc_data[ucfirst($key)] = $value;
44 | }
45 | $cc = new Infusionsoft_CreditCard();
46 | $cc->loadFromArray($cc_data);
47 | return $cc;
48 | }
49 |
50 | }
--------------------------------------------------------------------------------
/Infusionsoft/FileServiceBase.php:
--------------------------------------------------------------------------------
1 |