Skip to content

Commit

Permalink
made tangible lineitem parameter optional
Browse files Browse the repository at this point in the history
  • Loading branch information
w3guy committed Mar 6, 2016
1 parent 618cca7 commit 962f046
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ public function getData()
$data['li_'.$i.'_name'] = $item['name'];
$data['li_'.$i.'_price'] = $item['price'];
$data['li_'.$i.'_quantity'] = $item['quantity'];
$data['li_'.$i.'_tangible'] = $item['tangible'];

// optional item/product parameters
if (isset($item['tangible'])) {
$data['li_'.$i.'_tangible'] = $item['tangible'];
}
if (isset($item['product_id'])) {
$data['li_'.$i.'_product_id'] = $item['product_id'];
}
Expand Down

0 comments on commit 962f046

Please sign in to comment.