package com.quyunshuo.module.home.pay

import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class PaymentService @Inject constructor(
    private val weChatAlipayPayMent: WeChatAlipayPayMent,
    private val weChatAlipayPayShoppingCartMent: WeChatAlipayPayShoppingCartMent

) {
    fun getPaymentStrategy(type: String): PaymentStrategy {  
        return when (type) {  
            "weChatAlipayPayMent" -> weChatAlipayPayMent//微信支付
            "WeChatAlipayPayShoppingCartMent"-> weChatAlipayPayShoppingCartMent// 微信支付宝 购物车
            else -> throw IllegalArgumentException("Unknown payment type: $type")
        }  
    }  
}