Search code examples
phpwordpressinfusionsoft

add promocode to the infusionsoft


I have added this code but this is not working. I want the promocodes to be saved in infusionsoft

$carray = array(
  php_xmlrpc_encode($app->key),
  php_xmlrpc_encode($contactId), 
  php_xmlrpc_encode($creditCardId), 
  php_xmlrpc_encode($payPlanId), 
  php_xmlrpc_encode(array($productId1, $productId2)), 
  php_xmlrpc_encode(array($subscriptionPlanId1, $subscriptionPlanId2)), 
  php_xmlrpc_encode($processSpecials), 
  php_xmlrpc_encode(array($promoCode1, $promoCode2)) // array of strings
);
$app->methodCaller("OrderService.placeOrder", $carray);

Solution

  • Promo Codes are read-only. This means that, while they can be used during orders and applied to invoices, you can't add new Promo Codes via the API.

    This is an unfortunate limitation of the InfusionSoft API. Read more in the Table Documentation.