我正在尝试使用此方法为我的客户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:需要付款信息。
我的代码可能存在什么问题。