E00121 - No default payment/shipping profile found.
Here is my code when creating a payment profile:
$paymentprofile -> setPayment($payment);
$paymentprofile -> setDefaultPaymentProfile(true);
$paymentprofiles[] = $paymentprofile;
$paymentProfileRequest = new AnetAPI\CreateCustomerPaymentProfileRequest();
$paymentProfileRequest -> setMerchantAuthentication($ma);$paymentProfileRequest -> setCustomerProfileId($customerProfileId);
$paymentProfileRequest -> setPaymentProfile($paymentprofile);
$paymentProfileRequest -> setValidationMode("liveMode");
Yet when I try to recover it using a GetPaymentProfileRequest, it responds with E00121 - No default payment/shipping profile found. I tried searching this error on the developer.authorize.net error part, but according to that site, the error doesn't exist. Am I doing something wrong? I would have assumed with setDefaultPaymentProfile(true); being in there, there is a default profile. Thank you so much for all help.
Hi Ben,
We have tested this flow again and have found nothing wrong with getting the default payment profile, provided it has been created properly.
Is it possible that the flow for CreatePaymentProfileRequest was not successful? That would explain the error message you are receiving.
Please refer to the sample codes for CreatePaymentProfileRequest and GetCustomerPaymentProfileRequest. These sample codes have been tested again today without any issues detected.
If you are still having issues, kindly provide the response messages for these two requests.
Regards, Gabriel
@gnongosie This was a silly mistake on my part, I failed to realize that a CreateCustomerPaymentProfileRequest required its CustomerPaymentProfileType to have a BillTo/CustomerAddressType Attributed to it... However, it is not specified as required on the API reference, so one can see my frustration. Thank you for your help.