phpjuice / paypal-checkout-sdk

PHP SDK for PayPal's Checkout REST API

Home Page:https://phpjuice.gitbook.io/paypal-checkout-sdk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow to set additional parameters to PurchaseUnit

ankurk91 opened this issue · comments

According to paypal docs, the order API allow us to set shipping on purchase_units, but the PurchaseUnit class does not have any method to set shipping, there must be some methods which would allow to set custom properties to the entity.

There are many other properties like - description, custom_id etc, which could be helpful to developers.

https://developer.paypal.com/docs/api/orders/v2/#definition-purchase_unit_request

This applies to other classes as well, all of there classes should allow to set additional body which would be merged with main array by toArray() method.

Thoughts?

@ankurk91 actually this package doesn't mirror exactly what's on PayPal docs. it has only the minimum set of features. I was planning to add more methods to each class.

feel free to work on those if you want to add them.

Okay, I will be sending a PR for the same soon