I want to add another item to the order_lines array but however I do it I end up with an error:
$data = [
'purchase_country'=>$company_country,
'purchase_currency'=>$currency_nm,
'order_amount'=>$api_amount,
'locale'=>"en-GB",
'order_tax_amount'=>0,
'order_lines'=>[
[
'name'=>$product_name,
'quantity'=>1,
'unit_price'=>$api_amount,
'tax_rate'=>0,
'total_amount'=>$api_amount,
'total_tax_amount'=>0
]
],
"intent"=>"buy"
];
I thought this would work:
'order_lines'=>[
[
'name'=>$product_name,
'quantity'=>1,
'unit_price'=>$api_amount,
'tax_rate'=>0,
'total_amount'=>$api_amount,
'total_tax_amount'=>0
],
[
'name'=>$product_name2,
'quantity'=>1,
'unit_price'=>$api_amount2,
'tax_rate'=>0,
'total_amount'=>$api_amount2,
'total_tax_amount'=>0
]
],
"intent"=>"buy"
];
Any ideas please?
Thanks!