- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Bug - PHP SDK CreateCheckoutRequest does not capture the "taxes" and "discounts" data
Hello, I am using the latest version of the PHP SDK and am following the Square API guide here. I am creating a CreateCheckoutRequest class and am populating the "order" data using CreateOrderRequestOrder class with CreateOrderRequestLineItem. The checkout API has been working fine until I attempted to implement taxes. According to the guide, taxes should be a multi-demensional array passed in CreateOrderRequestOrder and/or CreateOrderRequestLineItem (in the PHP SDK these classes represent the "order" element which contains "line_items" elements). However, this data is omitted when the class is instantiated. Upon inspection of the classes I do not see any data setters for taxes or discounts. The class definition for CreateOrderRequestOrder includes:
(Note taxes and discounts are missing)
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'reference_id' => 'reference_id',
'line_items' => 'line_items'
);
Is this a bug or am I missing something? If the SDK does not support this functionality I will have to build HTTP requests like the V1 API uses. Please let me know.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Thanks for the update, @Tapio!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report