如何将标记为OPTIONS的字段提交给jsonsdk / SiteAccountManagement / addSiteAccount1

时间:2014-09-29 05:39:54

标签: yodlee

documentation listed仅指定如何提交以下字段typeNames:

  • IF_LOGIN
  • IF_PASSWORD

我们在提交使用typeName OPTIONS的用户详细信息时遇到问题。

这是圣乔治的siteInfo,它使用siteId 12099,通过jsonsdk / SiteTraversal / getSiteInfo检索

array (
    'popularity' => 0,
    'siteId' => 12099,
    'orgId' => 6930,
    'defaultDisplayName' => 'St. George Bank (Australia)',
    'defaultOrgDisplayName' => 'St.George Bank',
    'contentServiceInfos' => 
    array (
        0 => 
        array (
            'contentServiceId' => 14551,
            'siteId' => 12099,
            'containerInfo' => 
            array (
                'containerName' => 'bank',
                'assetType' => 1,
            ),
        ),
        1 => 
        array (
            'contentServiceId' => 15662,
            'siteId' => 12099,
            'containerInfo' => 
            array (
                'containerName' => 'bill_payment',
                'assetType' => 0,
            ),
        ),
        2 => 
        array (
            'contentServiceId' => 14738,
            'siteId' => 12099,
            'containerInfo' => 
            array (
                'containerName' => 'credits',
                'assetType' => 2,
            ),
        ),
        3 => 
        array (
            'contentServiceId' => 14839,
            'siteId' => 12099,
            'containerInfo' => 
            array (
                'containerName' => 'insurance',
                'assetType' => 2,
            ),
        ),
        4 => 
        array (
            'contentServiceId' => 14840,
            'siteId' => 12099,
            'containerInfo' => 
            array (
                'containerName' => 'loans',
                'assetType' => 2,
            ),
        ),
    ),
    'enabledContainers' => 
    array (
        0 => 
        array (
            'containerName' => 'bank',
            'assetType' => 1,
        ),
        1 => 
        array (
            'containerName' => 'bill_payment',
            'assetType' => 0,
        ),
        2 => 
        array (
            'containerName' => 'credits',
            'assetType' => 2,
        ),
        3 => 
        array (
            'containerName' => 'insurance',
            'assetType' => 2,
        ),
        4 => 
        array (
            'containerName' => 'loans',
            'assetType' => 2,
        ),
    ),
    'baseUrl' => 'http://www.stgeorge.com.au/',
    'loginForms' => 
    array (
        0 => 
        array (
            'conjunctionOp' => 
            array (
                'conjuctionOp' => 1,
            ),
            'componentList' => 
            array (
                0 => 
                array (
                    'valueIdentifier' => 'LOGIN',
                    'valueMask' => 'LOGIN_FIELD',
                    'fieldType' => 
                    array (
                        'typeName' => 'IF_LOGIN',
                    ),
                    'size' => 20,
                    'maxlength' => 19,
                    'name' => 'LOGIN',
                    'displayName' => 'Card/Access Number',
                    'isEditable' => true,
                    'isOptional' => false,
                    'isEscaped' => false,
                    'helpText' => '76368',
                    'isOptionalMFA' => false,
                    'isMFA' => false,
                ),
                1 => 
                array (
                    'valueIdentifier' => 'PASSWORD',
                    'valueMask' => 'LOGIN_FIELD',
                    'fieldType' => 
                    array (
                        'typeName' => 'IF_PASSWORD',
                    ),
                    'size' => 20,
                    'maxlength' => 6,
                    'name' => 'PASSWORD',
                    'displayName' => 'Security Number',
                    'isEditable' => true,
                    'isOptional' => false,
                    'isEscaped' => false,
                    'helpText' => '76369',
                    'isOptionalMFA' => false,
                    'isMFA' => false,
                ),
                2 => 
                array (
                    'valueIdentifier' => 'PASSWORD1',
                    'valueMask' => 'LOGIN_FIELD',
                    'fieldType' => 
                    array (
                        'typeName' => 'IF_PASSWORD',
                    ),
                    'size' => 20,
                    'maxlength' => 12,
                    'name' => 'PASSWORD1',
                    'displayName' => 'Internet Password',
                    'isEditable' => true,
                    'isOptional' => false,
                    'isEscaped' => false,
                    'helpText' => '76370',
                    'isOptionalMFA' => false,
                    'isMFA' => false,
                ),
                3 => 
                array (
                    'validValues' => 
                    array (
                        0 => '1',
                        1 => '2',
                        2 => '3',
                        3 => '4',
                    ),
                    'displayValidValues' => 
                    array (
                        0 => '1',
                        1 => '2',
                        2 => '3',
                        3 => '4',
                    ),
                    'valueIdentifier' => 'OPTION',
                    'valueMask' => 'LOGIN_FIELD',
                    'fieldType' => 
                    array (
                        'typeName' => 'OPTIONS',
                    ),
                    'size' => 20,
                    'maxlength' => 40,
                    'name' => 'OPTION',
                    'displayName' => 'Issue Number',
                    'isEditable' => true,
                    'isOptional' => false,
                    'isEscaped' => false,
                    'helpText' => '75331',
                    'isOptionalMFA' => false,
                    'isMFA' => false,
                ),
            ),
            'defaultHelpText' => 'login url chaged because site support new login url',
        ),
    ),
    'isHeld' => false,
    'isCustom' => false,
    'siteSearchVisibility' => true,
)

使用上述网站信息,这是我们传递给/ jsonsdk / SiteAccountManagement / addSiteAccount1

的内容
array (
    'cobSessionToken' => 'REDACTED',
    'enclosedType' => 'com.yodlee.common.FieldInfoSingle',
    'userSessionToken' => 'REDACTED'
    'credentialFields.enclosedType' => 'com.yodlee.common.FieldInfoSingle',
    'siteId' => '12099',
    'credentialFields[0].valueIdentifier' => 'LOGIN',
    'credentialFields[0].valueMask' => 'LOGIN_FIELD',
    'credentialFields[0].fieldType.typeName' => 'IF_LOGIN',
    'credentialFields[0].size' => '20', 
    'credentialFields[0].name' => 'LOGIN',
    'credentialFields[0].displayName' => 'Card/Access Number',
    'credentialFields[0].isEditable' => 'true',
    'credentialFields[0].value' => 'field1',
    'credentialFields[1].valueIdentifier' => 'PASSWORD',
    'credentialFields[1].valueMask' => 'LOGIN_FIELD',
    'credentialFields[1].fieldType.typeName' => 'IF_PASSWORD',
    'credentialFields[1].size' => '20', 
    'credentialFields[1].name' => 'PASSWORD',
    'credentialFields[1].displayName' => 'Security Number',
    'credentialFields[1].isEditable' => 'true',
    'credentialFields[1].value' => 'field2',
    'credentialFields[2].valueIdentifier' => 'PASSWORD1',
    'credentialFields[2].valueMask' => 'LOGIN_FIELD',
    'credentialFields[2].fieldType.typeName' => 'IF_PASSWORD',
    'credentialFields[2].size' => '20', 
    'credentialFields[2].name' => 'PASSWORD1',
    'credentialFields[2].displayName' => 'Internet Password',
    'credentialFields[2].isEditable' => 'true',
    'credentialFields[2].value' => 'field3',
    'credentialFields[3].valueIdentifier' => 'OPTION',
    'credentialFields[3].valueMask' => 'LOGIN_FIELD',
    'credentialFields[3].fieldType.typeName' => 'OPTIONS',
    'credentialFields[3].size' => '20', 
    'credentialFields[3].name' => 'OPTION',
    'credentialFields[3].displayName' => 'Issue Number',
    'credentialFields[3].isEditable' => 'true',
    'credentialFields[3].value' => '1',
)

不幸的是,我们收到了以下回复:

array (
    'errorOccurred' => 'true',
    'exceptionType' => 'com.yodlee.core.IncompleteArgumentException',
    'referenceCode' => '_4d346818-524f-4583-a5db-2f58b0c8fd2c',
    'message' => 'OPTIONS',
)

有人可以提供我们应该用于typeName = OPTIONS字段的数据格式的工作示例。

是否可以更新API或文档以明确提及getSiteInfo和searchSite中显示的表单信息与addSiteAccount1不兼容。

返回格式错误的字段的原因是什么?

我们是否应该重写所有名为' OPTION' to' OPTIONS',或者这对siteId 12099来说是独一无二的吗?

一个名为' OPTION1'的字段需要重命名为' OPTIONS1&#39 ;;类似于用于LOGIN和PASSWORD字段的现有模式?

1 个答案:

答案 0 :(得分:0)

  • 请使用getSiteLoginForm获取任何网站的登录表单信息。
  • 使用上面的登录表单信息构建addSiteAccount请求。

您提供的样本是正确的,只是按照指示通过以下参数。

  

credentialFields [3]。名称' => ' OPTIONS'

它应该适合你。另外请删除下面的参数表单请求,因为它重复而不是完整

 'enclosedType' => 'com.yodlee.common.FieldInfoSingle',