AuthorizeNet / sample-code-php

This repository contains working code samples which demonstrate php integration with the Authorize.Net API
MIT License
175 stars 197 forks source link

Does not include charge with shipping profile #142

Open thesigae opened 5 years ago

thesigae commented 5 years ago

Why does this example not show how to include the customers shipping information in the example. I feel like most API examples for integrations are so thin on details it is frustrating to figure what class, object, or method to use.

I have tried: But I noticed that there is no Class:ShippingProfileType(); // Shipping Profile to Charge $shippingProfile = new AnetAPI\ShippingProfileType(); $shippingProfile->setShippingProfileId(Crypt::decrypt($shippingProfileId));

I have tried: But there is no method setShippingProfileId() // Shipping Profile to Charge $shippingProfile = new AnetAPI\PaymentProfileType(); $shippingProfile->setShippingProfileId(Crypt::decrypt($shippingProfileId));

Finally I tried this which works: // Customer Profile to charge $profileToCharge = new AnetAPI\CustomerProfilePaymentType(); $profileToCharge->setCustomerProfileId(Crypt::decrypt($customerProfileId)); $profileToCharge->setShippingProfileId(Crypt::decrypt($shippingProfileId));

I think you all should include this in the example.