CIM创建客户付款配置文件错误

时间:2014-08-25 06:16:49

标签: python authorize.net

我正在尝试使用此方法为我的客户auth net个人资料创建多个付款资料。

def createAuthnetPaymentProfile(profileID, tries = 3):
    profile = client.factory.create("CreateCustomerPaymentProfile")
    profile.merchantAuthentication = merchantAuthentication
    profile.customerProfileId = profileID
    profile.paymentProfile = getAuthnetProfile(profileID, tries).paymentProfiles  
    payment_simple_type = client.factory.create('PaymentType')
    card_simple_type = client.factory.create('CreditCardSimpleType')
    payment_simple_type.creditCard = card_simple_type
    profile.payment = payment_simple_type
    profile.payment.creditCard = card_simple_type   
    profile.validationMode.value = "none"
    profileResult = makeAuthnetCall(client.service.CreateCustomerPaymentProfile, profile, tries)
    checkForError(profileResult)
    return profileResult.customerPaymentProfileId

然而,这会返回此错误 AuthnetError:E00029:需要付款信息。

我的代码可能存在什么问题。

0 个答案:

没有答案