maxmind/minfraud-api-php

Shopping Cart Item

Closed this issue · 1 comments

I must be thick headed this morning but for the life of me I cannot figure out how to add multiple items for withShoppingCartItem on an immutable object. So I have an order with 3 products. Based on what I am finding I must call withShoppingCartItem 3 times within the same object request (not separate) in order for all the data to be in 1 object. However, I have to do a loop from the database for the products to get all the info and cannot figure out how to loop through the multiple products while at the same time adding it to the same request to create the minFraud object.

Any help would be appreciated.

Sorry, found a test example that explained it. Need to recall the initial variable that was set.