Code Monkey home page Code Monkey logo

datatrans / ios-sdk Goto Github PK

View Code? Open in Web Editor NEW
8.0 9.0 2.0 192.48 MB

Accept payments on your iOS apps: Our mobile SDKs support your entire payment and registration process and simplify the integration of any payment method in your mobile apps.

Home Page: https://datatrans.ch

License: Other

Objective-C 82.31% Swift 0.10% C 0.57% Ruby 0.14% HTML 16.69% JavaScript 0.19%
payment payment-gateway payment-integration mobile-payment mobile-payments online-payment datatrans

ios-sdk's People

Contributors

adrianfriedli avatar paschmid avatar richiehug avatar serhii-libin avatar skirsche-ieffects avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-sdk's Issues

Build Framework with latest toolchain (Swift 5.5)

I was trying to use the SDK from SPM and got this error in the latest Xcode

This SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.4.2 
(swiftlang-1205.0.28.2 clang-1205.0.19.57)', while this compiler is 'Apple Swift version 5.5
 (swiftlang-1300.0.31.1 clang-1300.0.29.1)'). Please select a toolchain which matches the SDK.

Name collision

Your repository is named ios-sdk which can cause a naming collision in a swift package, if any other dependencies also has the name ios-sdk. SPM checkouts each repo which causes the collision.

We had the issue with our sdk and renamed it, but it could easily happen with anyother.

My recommendation would be to rename your repository to datatrans-ios-sdk oder datatrans-ios.

It also helps writing Package.swift files, because at the moment your sdk is reference by ios-sdk, which makes it difficult to read and understand which sdk it is.

        .target(
            name: "SnabbleDatatrans",
            dependencies: [
                "SnabbleCore",
                "SnabbleUI",
                "ios-sdk",
            ],
            path: "Datatrans/Sources"
        )

Twint is not opening in TestFlight

We are integrating Sdk version 1.5.1. And we can open the Twint app on Android.
After we release the app to TestFlight in iOS, Twint app is not opening and instead gives the following error:
No or outdated version of Twint is installed.

Even though we have a newest version installed.

But when we debug using a real device connected to xcode opens the Twint app.

What could be the possible reason?

WhatsApp Image 2022-11-24 at 12 16 17 PM

SDK not integrable

Good day
I'd like to integrate the Datatrans SDK into our mobile app, but without success until now.
So far, I integrated the dependency via Xcode's Swift Package dependency. There I pointed to this repository (https://github.com/datatrans/ios-sdk) with version 1.4.0 . This step passed without any errors. But when I import Datatrans-Swift module in the app delegate, for testing purposes, the needed classes from the example code cannot be resolved (please see screenshot for details). Xcode states, that the number of passed arguments to the Transaction constructor do not match. When I try to go to the class definition, Xcode doesn't know where to go.

Since payment is an essential part of our app, I would really appreciate any help and suggestions on this issue to be able to proceed.

Thank you very much in advance.
Best regards

Daniel

image

ITMS-91064: Invalid tracking information

Even on 3.6.1. the app is getting rejected because of this:

ITMS-91064: Invalid tracking information - A PrivacyInfo.xcprivacy file contains invalid tracking information at the following path: “Frameworks/KlarnaMobileSDK.framework/PrivacyInfo.xcprivacy”. NSPrivacyTracking must be true if NSPrivacyTrackingDomains isn‘t empty. Keys and values in your app’s privacy manifest must be valid.

Checked and DataTrans should update their Klarna version: Klarna repo issue

Btw if someone do not use Klarna does this mean they still have to set NSPrivacyTracking to true even if technically they do not track anything? That does not sound right, we should have an option to mitigate that.

Previous/Old SDK version M1 support

While trying to build the old SDK (4.6.4) on an M1(X) Mac it fails due to the static lib not having the correct arm64-sim object inside "building for iOS Simulator, but linking in object file built for iOS".

I see that it does not happen with the new version, but it'll take sometime for us to move to the new SDK version.

Is there any non-public release of the previous SDK version that supports building under M1?

A connection error has occured

While we try to call the add payment method on the mobile-sdk for the testing purpose. we encounter "A connection error has occured". despite that we have been initially returning a mobile token from the backend side. at first stage we invoke the init service along with below parameters.

https://api.sandbox.datatrans.com/v1/transactions

{
currency: "CHF",
refno: "CCReg-160-44124",
language: "EN",
paymentMethods: [
"VIS",
"ECA",
"AMX",
],
option: {
returnMobileToken: true,
createAlias: true,
},
webhook: {
url: "https://zpuqbtdz6p.api.quickmocker.com/webhook/datatrans",
},
}

.xcframework implementation error

i am getting loading screen only on simulator and on device i am getting below error -

dyld: Library not loaded: @rpath/Datatrans.framework/Datatrans
Reason: image not found

Integration on SwiftUI

thanks for this amazing sources i have been looking and option to integrate it on swiftUI but there is not info about it, it would be so amazing to see if this is possible.

Consider renaming repo for better Swift 5.6 integration

Since Swift 5.6, the method package(name:url:_:) to define a Swift package dependency has been deprecated. The new recommended way to define a dependency is to use package(url:from:).

With that new method, we can no longer specify an explicit name for the package. Before we defined the Datatrans dependency as follows with an explicit name Datatrans:

// swift-tools-version:5.5
import PackageDescription

let package = Package(
  name: "example",
  products: [
    .library(name: "example", targets: ["example"]),
  ],
  dependencies: [
    .package(name: "Datatrans", url: "https://github.com/datatrans/ios-sdk.git", .upToNextMajor(from: "1.5.1")),
  ],
  targets: [
    .target(
      name: "example",
      dependencies: [
        .product(name: "Datatrans"),
      ]
    ),
  ]
)

Now with the new recommended method we can no longer explicitly name the dependency. It defaults to the repo name. If the names of the product (here Datatrans) and the package (here ios-sdk) don't coincide, we have to explicitly name the package when listing the dependency in the target:

// swift-tools-version:5.5
import PackageDescription

let package = Package(
  name: "example",
  products: [
    .library(name: "example", targets: ["example"]),
  ],
  dependencies: [
    .package(url: "https://github.com/datatrans/ios-sdk.git", from: "1.5.1"),
  ],
  targets: [
    .target(
      name: "example",
      dependencies: [
        .product(name: "Datatrans", package: "ios-sdk"),
      ]
    ),
  ]
)

The package name ios-sdk is too broad and at risk of clashing with other packages. Thus, I'd suggest to rename the repo to something containing datatrans, e.g. datatrans-ios or datatrans-ios-sdk.

PPRiskMagnes conflicts with new Paypal iOS SDK

PayPal is deprecating their PayPal Checkout SDK and suggesting moving over to PayPal SDK - in doing so, there is a naming conflict in with "PPRiskMagnes" as it's used in both Package.swift files. It would be great if you all could add a moduleAlias to avoid this conflict, or suggest a method to solve this. Cheers

Screenshot 2023-09-27 at 9 58 24 PM

A connection error has occurred. Please try again.

Hello !

This issue seems to be similar if not the same as the one described by @canavci1. After we init a transaction with the mobile token returned by our backend, the DataTrans modal opens and right afterwards we get an alert view with "Error, A connection error has occurred." We are already setting the testing flag to true. We only get this on iOS, Android is working fine with the same backend API.

DataTrans SDK v2.7.2 (also tried with an older version 2.4.0)
iOS 16.4 and 15.6.1
Same behaviour on the simulator and device
Error callback from TransactionDelegate is not called at all.

https://api.sandbox.datatrans.com/v1/transactions is called by the SDK and returns 200.

Here's how we call the SDK:

` let transaction: Datatrans.Transaction

  //same error happens for newly created cc
  if let creditCard = self.card, self.isNewCC {
    transaction = Transaction(mobileToken: token, card: creditCard)
  } else {
    transaction = Transaction(mobileToken: token)
  }
  transaction.delegate = self
  transaction.options.useCertificatePinning = true
  #if DEBUG
    transaction.options.testing = true
  #else
    transaction.options.testing = false
  #endif
  
  transaction.start(presentingController: self.navigationController ?? self)`

Let me know if you need more details. Any help will be much appreciated

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.