I am new to Rest Api's . I am trying to create a payment using paypal express checkout via php sdk rest api.I have downloaded and installed their official sdk.
Now I can create a normal payment and everything is working fine.Now I want to set landing page type to billing.In documentation page I have been told to set landing_page_type to billing. How can I do that in my php script.
Link : https://developer.paypal.com/docs/api/#flowconfig-object
My php script looks something like
$transaction = new Transaction();
$transaction->setAmount($amount)
->setItemList($itemList)
->setDescription("Payment description")
->setInvoiceNumber(uniqid());
$payment = new Payment();
$payment->setIntent("sale")
->setPayer($payer)
->setRedirectUrls($redirectUrls)
->setTransactions(array($transaction));
$payment->create($apiContext);
So As for I understood ,I must create new object named flow config and add landing page to it.I tried something like
$billing = new FlowConfig();
$billing->setLandingPageType("billing");
What to do next ? How to integrage this $billing in my $payment