コード例 #1
0
        public async Task <CreateCustomerProfileResponse> CreateAsync(string referenceId, string customerId, string email, string description, string transactionId)
        {
            var createCustomerProfileRequest = new CreateCustomerProfileFromTransactionRequest
            {
                CustomerProfileGenerateTransactionRequest = new CustomerProfileGenerateTransactionRequest
                {
                    MerchantAuthentication = new MerchantAuthentication
                    {
                        LoginId        = _apiLoginId,
                        TransactionKey = _transactionKey
                    },
                    ReferenceId     = referenceId,
                    CustomerProfile = new CreateCustomerProfile
                    {
                        Email = email,
                        MerchantCustomerId = customerId,
                        Description        = description
                    },
                    TransactionId = transactionId
                }
            };

            return(await new AuthorizeNetResult(_authorizeNetUrl).PostAsync <CreateCustomerProfileFromTransactionRequest, CreateCustomerProfileResponse>(createCustomerProfileRequest));
        }
コード例 #2
0
 public Task <CreateCustomerProfileResponse> CreateFromTransactionAsync(
     CreateCustomerProfileFromTransactionRequest request,
     CancellationToken cancellationToken = default)
 {
     return(_createFromTrans.PostAsync(request, cancellationToken));
 }