convertToLegacySession
Converts the current Session instance to a legacy AirwallexSession object.
This conversion is primarily required for Local Payment Methods (LPM), as they are not yet supported by the unified Session flow.
Determines which legacy session to create based on Session properties:
paymentConsentOptions == null→ AirwallexPaymentSession (one-off)paymentConsentOptions != null && amount == 0→ AirwallexRecurringSessionpaymentConsentOptions != null && amount > 0→ AirwallexRecurringWithIntentSession
Preserves PaymentIntentProvider for Express Checkout scenarios where applicable.
Return
A legacy AirwallexSession object representing the current session state
Throws
if required properties are missing