Closed alan-hadyk closed 4 years ago
Test in QuickStart.playground:
QuickStart.playground
func createCharge() { let currency = Currency.thb let params = ChargeParams( value: Value( amount: currency.convert(toSubunit: 6000.00), currency: currency ), sourceType: .installment( Installment.CreateParameter( brand: .scb, numberOfTerms: 6 ) ), isAutoCapture: false, returnURL: URL(string: "http://omise.co") ) Charge.create(using: client, params: params) { (result) in switch result { case let .success(charge): print("created charge: \(charge.id) - \(charge.value.amount)") case let .failure(err): print("error: \(err)") } } }
Remark - tested successfully with other installment charges
Test in
QuickStart.playground
: