Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Created July 19, 2012 01:23
Show Gist options
  • Save xcommerce-gists/3140153 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/3140153 to your computer and use it in GitHub Desktop.
Snip from Data.php that determines whether or not the merchant has onboarded
public function getRegistrationRequest()
{
$request = new Varien_Object();
/** @var $fabricAuth Xcom_Xfabric_Model_Authorization */
$fabricAuth = Mage::helper('xcom_xfabric')->getAuthModel();
$postData = array();
$postData['target_capability_name'] = 'Your Extension Name Here';
$postData['legal_agreement_url'] = self::YOUR_LICENSE_URI;
$postData['store_instance_name'] = (string)Mage::app()->getConfig()->getNode(
'default/xfabric/connection_settings/onboarding_store_instance_name'
);
$postData['is_registered'] = $fabricAuth->hasAuthorizationData() ? 1 : 0;
$postData['store_endpoint_url'] = $fabricAuth->getEndpointUrl();
$jsonData = Zend_Json::encode($postData);
$request->setOnboardingInfo(urlencode($jsonData));
return $request;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment