maq89 / paytabs-laravel

Other
10 stars 16 forks source link

how to sign products array? #3

Closed greatsami closed 6 years ago

greatsami commented 6 years ago

Dear,

I have a question on products assigned to create_pay_page() function. in example you mentioned in readme, that is for one product.

               'products_per_title'=> "Mobile Phone",
        'currency' => "BHD",
        "unit_price"=> "10",
        'quantity' => "1",
        'other_charges' => "0",
        'amount' => "10.00",
        'discount'=>"0",

how i can pass products array?

maq89 commented 6 years ago

use double pipe sign '||'

'products_per_title' => IPhone || Samsung S5 || Samsung S4 'price' => 21.09 || 22.12 || 12.01 'total' => 1 || 2 || 3

if you use multiple products you must have to give multiple price and quantity also.

for further details you can read in paytabs documentation on page No 12 https://www.paytabs.com/PayTabs-API-Documentation-V-2.1.pdf

greatsami commented 6 years ago

Thank you :)