Created
July 19, 2012 01:23
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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