Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E00121: No default payment/shipping profile found #30

Open
mkarbowiak opened this issue May 7, 2018 · 2 comments
Open

E00121: No default payment/shipping profile found #30

mkarbowiak opened this issue May 7, 2018 · 2 comments
Labels

Comments

@mkarbowiak
Copy link

I create CustomerProfile with CustomerPaymentProfile assgined. Here's the CustomerPaymentProfileType object that I use.

// createCustomerProfile.js

let customerPaymentProfileType = new ApiContracts.CustomerPaymentProfileType({
  customerType: 'individual',
  payment: new ApiContracts.PaymentType({ creditCard: creditCard }),
  defaultPaymentProfile: true,
});

Whole request is successful and I can see CustomerProfile with PaymentProfile assigned on my sandbox account in the CIM section.

However, when I try to authorize the payment using only CustomerProfileId

// authorizePayment.js

let profileToAuthorize = new ApiContracts.CustomerProfilePaymentType({
  customerProfileId: data.profileId,
});

let transactionRequestType = new ApiContracts.TransactionRequestType({
  transactionType: ApiContracts.TransactionTypeEnum.AUTHONLYTRANSACTION,
  profile: profileToAuthorize,
  amount: data.amount,
});

let createRequest = new ApiContracts.CreateTransactionRequest({
  merchantAuthentication: merchantAuthenticationType,
  transactionRequest: transactionRequestType,
});

there's an error:

Failed Transaction.
Error Code: E00121
Error message: No default payment/shipping profile found.

I tried to create customerPaymentProfileType like this, for double check's sake:

// createCustomerProfile.js

let customerPaymentProfileType = new ApiContracts.CustomerPaymentProfileType();
customerPaymentProfileType.setCustomerType('individual')
customerPaymentProfileType.setPayment(new ApiContracts.PaymentType({ creditCard: creditCard }));
customerPaymentProfileType.setDefaultPaymentProfile(true);

which also creates a CustomerProfile but the authorization fails anyway.

The authorization is successful only when I explicitly provide CustomerPaymentProfileId

// authorizePayment.js
// create profileToAuthorize like before

let paymentProfile = new ApiContracts.PaymentProfile({
  paymentProfileId: data.paymentProfileId
});

profileToAuthorize.setPaymentProfile(paymentProfile);

// create transaction and request like before
Successfully created transaction with Transaction ID:
Response Code: 1
Message Code: 1
Description: This transaction has been approved.
@ashtru ashtru added the feature-bug Bug in APIs/Feature label Oct 8, 2018
@gnongsie
Copy link
Contributor

Hi @mkarbowiak ,

Thanks for bringing this to our attention. We will communicate this issue with the CreateCustomerProfile API to the relevant team to get it addressed.

In the meantime, a suitable workaround for this is shown below:

@JCMais
Copy link

JCMais commented Jan 14, 2019

Having same issue, from what I can see livemode validation would not work with the workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants