Reputation:
I'm in the process of creating a payment with PayPal with their REST API.
I have everything set up and working but when I create a WebProfile and call setNoShipping(1)
, nothing changes:
My code:
$inputFields = new InputFields();
$inputFields->setNoShipping(1)
$webProfile = new WebProfile();
$webProfile->setName('test' . uniqid())->setInputFields($inputFields);
And according to this post on StackOverflow it's not possible, but is that still the case 1 year later?
Upvotes: 6
Views: 1889
Reputation: 93
I had the same problem but after some research and many try & error i got it to work.
You have to "create" the profile and add its id to the Payment.
[...]
$webProfileId = $webProfile->create($apiContext)->getId();
$payment = new Payment();
$payment->setExperienceProfileId($webProfileId);
Upvotes: 9