paypal / PayPal-PHP-SDK

PHP SDK for PayPal RESTful APIs
https://developer.paypal.com/docs/api/
Other
27 stars 100 forks source link

Missing Adress class getter function #76

Closed bram123 closed 10 years ago

bram123 commented 10 years ago

When a payment is executed using Payment->execute(PaymentExecution, ApiContext) a payment object is returned with inside it the Address class..

Payment->getPayerInfo()->getShippingAddress();

This returns the Address class.. And looking at the raw data the Address class includes the variables (line1, line2, city, country_code, postal_code, state, phone & recipientName). However, the class only has setters and getters for the first 7 variables, not for recipientName.

It is possible to get the value using Payment->getPayerInfo()->getShippingAddress()->recipientName; But it would be better if it has a function like the others.

avidas commented 10 years ago

@bram123 good point, do you want to send this in the form of a pull request? Thanks.

jaypatel512 commented 10 years ago

@bram123 you should be able to get this issue resolved. The new release has included those getters and setters.

Please let me know if you are still facing this issue.

Here is the updated class file : ShippingAddress.php