09-04-2018 02:20 PM
Hi @mohammedjasam, I am unable to reproduce this issue. I created a profile, used it for a transaction and am able to see both
Can you try again or provide us more details?
09-06-2018 04:42 AM
Hi @gmokhasi, I'm sending a request for customer profile creation from the following code.
strJSON = JsonConvert.SerializeObject(aobjRequest)
ValidateStandardPaymentConfiguration(aobjRequest)
strMarketType = aobjRequest.Configuration.GetStringValue("MarketType")
ApiOperationBase(Of ANetApiRequest, ANetApiResponse).RunEnvironment = GetEnvironment(aobjRequest)
ApiOperationBase(Of ANetApiRequest, ANetApiResponse).MerchantAuthentication = New merchantAuthenticationType() With
{
.name = aobjRequest.Merchant.ID,
.ItemElementName = ItemChoiceType.transactionKey,
.Item = aobjRequest.Merchant.Password
}
objCC.cardNumber = aobjRequest.Customer.CreditCard.Number
objCC.expirationDate = aobjRequest.Customer.CreditCard.ExpirationMonth + aobjRequest.Customer.CreditCard.ExpirationYear
If aobjRequest.Customer.CreditCard.SecurityCode.IsNullOrEmptyOrBlankSpace Then
Else
objCC.cardCode = aobjRequest.Customer.CreditCard.SecurityCode
End If
objBillingInfo.firstName = aobjRequest.Customer.FirstName
objBillingInfo.lastName = aobjRequest.Customer.LastName
objBillingInfo.address = aobjRequest.Customer.BillingAddress.Line1
objBillingInfo.city = aobjRequest.Customer.BillingAddress.City
objBillingInfo.zip = aobjRequest.Customer.BillingAddress.Zip
objBillingInfo.state = aobjRequest.Customer.BillingAddress.State
objBillingInfo.country = aobjRequest.Customer.BillingAddress.Country
objPaymentType.Item = objCC
objPaymentProfile.payment = objPaymentType
objPaymentProfile.billTo = objBillingInfo
Dim objPaymentProfiles() As customerPaymentProfileType = {objPaymentProfile}
Dim objShipToList() As customerAddressType = {objBillingInfo}
objCustomerProfile.merchantCustomerId = aobjRequest.Merchant.ReferenceNumber
objCustomerProfile.paymentProfiles = objPaymentProfiles.ToArray()
objCustomerProfile.shipToList = objShipToList.ToArray()
If aobjRequest.Customer.Email.IsNullOrEmptyOrBlankSpace Then
objCustomerProfile.email = "noreply@dummy.com"
Else
objCustomerProfile.email = aobjRequest.Customer.Email
End If
objRequest.profile = objCustomerProfile
objRequest.validationMode = validationModeEnum.liveMode
Dim objController As New createCustomerProfileController(objRequest)
objController.Execute()
objCreateBillingProfileResponse = objController.GetApiResponse()
If objCreateBillingProfileResponse.IsConstructed AndAlso
objCreateBillingProfileResponse.messages.resultCode = messageTypeEnum.Ok AndAlso
objCreateBillingProfileResponse.messages.message.ToString().IsNotNullOrEmpty Then
If objCreateBillingProfileResponse.messages.message(0).text = "Successful." AndAlso
objCreateBillingProfileResponse.messages.message(0).code.StartsWith("I") Then
objResponse.ReturnCode = USIPaymentResult.Success
objResponse.Message = objCreateBillingProfileResponse.messages.message(0).text
objResponse.PayerInfo.CustomerProfileID = objCreateBillingProfileResponse.customerProfileId
objResponse.PayerInfo.BillingProfileID = objCreateBillingProfileResponse.customerPaymentProfileIdList(0)
End If
Else
If objCreateBillingProfileResponse.IsConstructed AndAlso
objCreateBillingProfileResponse.messages.message(0).code.StartsWith("E") Then
objResponse.ReturnCode = USIPaymentResult.Failed
objResponse.Message = objCreateBillingProfileResponse.messages.message(0).text
Else
objResponse.ReturnCode = USIPaymentResult.Failed
objResponse.Message = USIHttpGlobals.CommonPhraseDictionary.LookupMessage(USIConstants.BasePhrases.NoResponseFromTheGateway)
End If
End If
Please let me know if I'm missing anything that's not letting me view the successfully created profiles on the sandbox.authorize.net CIM.
Thank you for your help!
09-07-2018 06:15 AM - edited 09-07-2018 06:16 AM