Open xeon826 opened 5 years ago
So after looking around, I came up with this
$payment->setDetails([
'METHOD' => 'SetExpressCheckout',
'VERSION' => '108',
'L_BILLINGTYPE0' => 'RecurringPayments',
'L_BILLINGAGREEMENTDESCRIPTION0' => "first item",
'L_BILLINGTYPE1' => 'RecurringPayments',
'L_BILLINGAGREEMENTDESCRIPTION1' => "second item",
]);
But only the first item shows up on Paypal after redirecting to the targetUrl, am I missing something?
I have some items that will be one time payments and others that will recurring, I'm wanting to know how to have these in the same cart. One idea I had was that I could send them to the payment gateway to pay for the one time items and then redirect them back after the payment was successful or at least attempted and have them attempt to pay for the rest (The recurring payment items) But I don't know that this is the best way, is there a way I can specify both in the same cart?
In this,
pay_for_county
is the item type that would be a recurring payment and any other would be one time. Looking at this page atL_BILLINGTYPEn
I'm lost on a couplethings, one of which, what doesn
orm
indicate? Also,MerchantInitiatedBilling
looks like the right option as I need to specify per-transaction billing agreements but how would I set this and then how would I specify which items were one-item and which were recurring?Here I'm adding the products to the final order, could I possibly do it here? And even though it's a thing I'll have to figure out AFTER I fix this, how would I go about pinging the payment gateway to ensure the recurring payment had been successful? Since there are several items that are recurring payments, I don't know that I could have a way of figuring out which had been successful.