Accept Hosted setting the customerProfileId field value to display four most recent Payment Profiles
Regarding the Accept Hosted solution, I am trying to send the necessary attributes in order to have the four most recent payment profiles for a customer profile displayed so that the customer can choose among these payment methods or enter new payment information. In reading the API documentation, it appears that the hostedPaymentPaymentOptions attribute is used to set the customerProfileId to 'true. I do so (with PHP) this way:
Also, the customerProfileId field value for the Customer Profile for which I want to display the four most recent payment profiles must be passed in the API call. But my question is HOW TO PASS THAT customerProfileId FIELD VALUE?
The API documentation says "If you use the Customer Profiles feature to store customer payment information, you can send a customer profile ID in the customerProfileId element of the getHostedPaymentPageRequest call." However, when I set both the customerProfileId field to 'true' in hostedPaymentPaymentOptions with the above code, and set the customerProfileId value to my sandbox Customer Profile ID in GetHostedPaymentPageRequest per the API description in the last line of this code:
$request = new AnetAPI\GetHostedPaymentPageRequest(); $request->setMerchantAuthentication($merchantAuthentication); $request->setRefId($refId); $request->setTransactionRequest($transactionRequestType); $request->setCustomerProfileId("912952269");
I get a fatal error that the call is to an undefined method GetHostedPaymentPageRequest::setCustomerProfileId().
"Fatal error: Call to undefined method net\authorize\api\contract\v1\GetHostedPaymentPageRequest::setCustomerProfileId()"
Is setting the customerProfileId value under the GetHostedPaymentPageRequest object like above really correct? It doesn't appear to be. So if not, how is it set so that it can be sent in the API call in order to specify the Customer Profile for which to display the four most recent Payment Profiles in the hosted payment form?