create_order_line($sku, $name, $qty, $price, $tax_category); // Create the order object for B2C or B2B $Afterpay->set_order($aporder, 'B2C'); // Set up the AfterPay credentials and sent the order $authorisation['merchantid'] = ''; $authorisation['portfolioid'] = ''; $authorisation['password'] = ''; $modus = 'test'; // for production set to 'live' // Show request in debug var_dump(array('AfterPay Request' => $Afterpay)); $Afterpay->do_request($authorisation, $modus); // Show result in debug var_dump(array('AfterPay Result' => $Afterpay->order_result));