What is the difference between getPaymentProfileId() and getCustomerPaymentProfileIds()? When should I use which?
I teste using this code:
$rsp = $req->createCustomerPaymentProfile($customer_id, $payment, 'testMode');
$payment_id = $rsp->getPaymentProfileId();
but sometimes $payment_id is "" (i.e. empty string). I also tested on production server with 'liveMode', and the result is the same.
Should I use getCustomerPaymentProfileIds() even if I only add one payment profile? The name suggest that the function would return an array of paymentIds, but when I tried it only returned one scalar value.
Since I can't find any document on either function, can someone please explain when to use which?
01-31-2013 02:15 PM
I think is depend on how many payment profile id that customer profile id have.
01-31-2013 02:19 PM
That's what I thought to, but unfortunately that's not the case.
I only created one customer payment profile, so I thought I should use getPaymentProfileId(), but it's returning empty string.
01-31-2013 02:25 PM
Look to me for createCustomerPaymentProfile, use getPaymentProfileId because there is only one allow for each call.
And getCustomerPaymentProfileIds for createCustomerProfile because you can do multiple payment profiles.
01-31-2013 04:50 PM