omise / omise-ios

Omise iOS SDK
https://www.opn.ooo
MIT License
74 stars 36 forks source link

Cannot create source payment for duitnow_obw #302

Closed keepsecretly closed 1 week ago

keepsecretly commented 2 weeks ago

Expected behavior

The API request should be sent to the https://api.omise.co

Screenshot 2567-10-16 at 10 05 25

Ref: https://docs.opn.ooo/duitnow-obw#creating-a-source

Actual behavior

The API request to https://vault.omise.co on SDK version 5.0.0 (and the latest version 5.2.0)

https://github.com/omise/omise-ios/blob/v5.0.0/OmiseSDK/Sources/OmiseAPI/OmiseAPI.swift

omise-5 0 0

https://github.com/omise/omise-ios/blob/v4.27.1/OmiseSDK/Configuration.swift

omise-4 27 1

Steps to reproduce the issue

  1. Create a source to perform the payment for duitnow_obw
  2. Observe for the result
  3. Getting error for 404 not found
            let jsonString = "{\"amount\":\(amount),\"currency\":\"\(currencyCode)\",\"platform_type\":\"IOS\",\"bank\":\"\(bankCode)\",\"type\":\"duitnow_obw\"}"
            let payload: CreateSourcePayload? = parse(jsonString: jsonString)

            guard let payload else {
               // return error
            }

            client.createSource(payload: payload) { result in
                switch result {
                case .failure(let error):
                    // return error
                case .success(let token):
                    // return success
                }
            }

Logs

omise-source-request-4.27.1.txt omise-source-request-5.2.0.txt

Screenshots

No response

Name and version information

XCode version 15.2 Omise-iOS version 5.2.0 (SwiftPM) iOS version 17.6.1

aashishgurung commented 1 week ago

@keepsecretly Thanks for reaching out. We will look into this and let you know about our findings.

keepsecretly commented 1 week ago

The bank transaction is working fine on version 5.2.1. Thank you. 👍