tap-payments / gosellsdk-ios Goto Github PK
View Code? Open in Web Editor NEWgoSell iOS SDK
License: MIT License
goSell iOS SDK
License: MIT License
When we go for checkout and payment failed or success we have found your root controller replace our root controller.
which made the issues in my application.
so pls provide me any solution.
pls check below screenshot
https://prnt.sc/pqn902
The background UI update crash will not fix until you guys post in cocoapods.. I still get 2.2.42 .
hellow Every One
please Solved this issue
'SessionDelegate' is not a member type of 'GoSellSDK'
the sessionDelegate is conflict with Alamofire sessionDelegate
I am trying to do some transactions using the Test card provide in section. I have tried all the cards but getting the below response each time.
"response" : {
"code" : "515",
"message" : "Declined, Tap"
},
"save_card" : true,
"source" : {
"channel" : "INTERNET",
"id" : "tok_CjBXn1311012ji4M527179",
"object" : "token",
"payment_method" : "MASTERCARD",
"payment_type" : "CREDIT",
"type" : "CARD_NOT_PRESENT"
},
"statement_descriptor" : "Payment statement descriptor will be here",
"status" : "DECLINED",
"threeDSecure" : true,
"transaction" : {
"asynchronous" : false,
"created" : "1585930920419",
"expiry" : {
"period" : 30,
"type" : "MINUTE"
},
"timezone" : "UTC+03:00"
}
Im getting error in creating a charge request
let request = CreateChargeRequest(amount: 1000.0, currency: "kwd", customer: self.customer, redirect: redirect)
Cannot invoke initializer for type 'CreateChargeRequest' with an argument list of type '(amount: Double, currency: String, customer: Customer, redirect: CreateChargeRedirect)'
i also tried
CreateChargeRequest(amount: 1000.0, currency: "kwd", redirect: redirect, source: source)
(amount: 100.0, currency: "kwd", customer: self.customer, redirect: redirect, source: source)
nothing works. All these methods gives the same error.
Please help me to resolve this issue....! Thanks in advance !
Hi,
I just added goSellSDK pod and got the following errors:
and this screenshot if or one of them:
From this tweet, I can learn this is an issue with Xcode future features, but mine is 13.2.1 a bit older, and it has the same issue.
Here the Podfile of the project I am working on:
platform :ios, '12.0'
$FirebaseSDKVersion = '8.12.0'
source 'https://cdn.cocoapods.org/'
target 'Waffer' do
...
pod 'goSellSDK'
...
target 'OneSignalNotificationServiceExtension' do
#only copy below line
pod 'OneSignal', '>= 3.0.0', '< 4.0'
end
end
The version installed for goSellSDK is 2.3.6, I couldn't find higher version to try.
That's all for now, please let me know if I should mention more details.
Hello Team,
How to change the background color of the tap payment button? I'm using swift language.
Thanks in advance.
getting following error in TapURLSerializer.swift file
in line number 58
under case .array(let params):
Value of type '[CustomStringConvertible]' has no member 'compactMap'
Can SDKs be used in a React-Native project?
Using createToken function with test authentication and encryption keys returns a 200 with no Token and an error:
▿ Optional<Error> ▿ some : DecodingError ▿ keyNotFound : 2 elements - .0 : CodingKeys(stringValue: "livemode", intValue: nil) ▿ .1 : Context - codingPath : 0 elements - debugDescription : "No value associated with key CodingKeys(stringValue: \"livemode\", intValue: nil) (\"livemode\")." - underlyingError : nil
The SDK is trying to find the key 'livemode' but the server is returning the key as 'live_mode'
{
"errors" : [
{
"code" : "2104",
"description" : "Invalid API Key"
}
]
}
Hi, I am getting an error in the Tap SDK since yesterday saying Serialization error has ocurred
whenever the user enters a credit card in the SDK. It is basically impossible to perform purchase or authorize calls.
I have placed PayButton in storyboard and set datasource and delegate.
But it is only showing paybutton without any text(green background) and not working even if I tap the paybutton. Nothing happened.
// Transaction mode
GoSellSDK.mode = .sandbox
// Set language
if(UserInfo.sharedInstance.currentLanguage == KEY_ENGLISH)
{
GoSellSDK.language = "en"
}
else {
GoSellSDK.language = "ar"
}
// Session Delegate
self.payButton.delegate = self
// Session Datasource
self.payButton.dataSource = self
// Session Appearance
self.payButton.appearance = self
import struct CoreGraphics.CGBase.CGFloat --- Struct 'CGFloat' does not exist in module 'CoreGraphics'.
i am getting error in tap addition kit ....every file....
i had trid to resolve this with UIKit or Foundation according needs.....
then getting error like
Segmentation fault: 11 (in target 'TapAdditionsKit' from project 'Pods')
check below two image and i had shared images too,....
please help me
We have started working on Tap SDK. We have downloaded SDK and demo from here. Run SDK in the device and entered Plain amount but Pay button not getting activated or not able to tap on it.
Then we have tried to install in our application and do the same steps as given in the document. The same thing happened the Pay button click on working.
URL response: <NSHTTPURLResponse: 0x2820dd940> { URL: https://api.tap.company/v2/init } { Status Code: 401, Headers {
"Content-Length" = (
60
);
"Content-Type" = (
"application/json; charset=utf-8"
);
Date = (
"Thu, 17 Dec 2020 10:45:31 GMT"
);
Etag = (
"W/"3c-/Wfjvfg/OrZzLhu4fMVZxJTBdrA""
);
"Strict-Transport-Security" = (
"max-age=15552000; includeSubDomains"
);
"content-security-policy" = (
"img-src imgur.com; script-src 'self'; object-src 'none'; frame-ancestors 'none'; default-src 'none'; base-uri 'self'; form-action 'self'"
);
"feature-policy" = (
"camera 'none';autoplay 'none'"
);
"referrer-policy" = (
"no-referrer"
);
"x-content-security-policy" = (
"img-src imgur.com; script-src 'self'; object-src 'none'; frame-ancestors 'none'; default-src 'none'; base-uri 'self'; form-action 'self'"
);
"x-content-type-options" = (
nosniff
);
"x-dns-prefetch-control" = (
off
);
"x-download-options" = (
noopen
);
"x-frame-options" = (
SAMEORIGIN
);
"x-webkit-csp" = (
"img-src imgur.com; script-src 'self'; object-src 'none'; frame-ancestors 'none'; default-src 'none'; base-uri 'self'; form-action 'self'"
);
"x-xss-protection" = (
"1; mode=block"
);
} }
TAP API SDK ERROR
Errors detected on the backend:
Error ErrorCode: Invalid API Key
We submitted our app in app store and we got this message back from app store review team
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).
Our Project is a ReactNative project which includes latest goSellSDK in the Pod file
pod 'goSellSDK'
On analysis we found that TapAdditionskitV2 have a class // UIWebView+Additions.swift
which has a UIWebView extension.
We suspect this could be the reason . Can you please help us resolve this issue.
Also I can see - TapAdditionsKitV2 (0.0.5). in Podfile.lock whereas the latest version is 0.0.7. Why the latest version is not pulled from cocoapods.
Hi,
The SDK (v 2.2.4) is not compiling for my project in Xcode 11. It was working in the previous versions of Xcode.
Thanks
Hi,
I noticed there have been a lot of commits on the development_2.0
branch. Is there an estimate for a new release with those changes?
documentation is well explained, but so many info is missing,
The library contains reference to UIWebView, and Apple does not allow apps to be uploaded to the app store with UIWebView, you must use WKWebView instead
Hey team,
I upgraded to the latest Xcode version and when I try to build my project I found many issues in your SDK.
Struct 'CGFloat' does not exist in module 'CoreGraphics'
Struct 'Data' does not exist in module 'Foundation'
Struct 'URLRequest' does not exist in module 'Foundation'
Class 'JSONDecoder' does not exist in module 'Foundation'
Struct 'Locale' does not exist in module 'Foundation'
Struct 'CharacterSet' does not exist in module 'Foundation'
FYI @AbdullahAlajmi
i want to run my app on simulator for testing purpose but this line prevent project from build
goSellSDK.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
Hello
I have managed to use apple pay ui button(which was hidden and BTW there was no method to make it visible :D )
any way after clicking it (and before that setting customer info and pay item) the bellow modal appears.untill now every thing is ok but the problem happens after tapping on PAY WITH PASSCODE and it shows an indicator with processing text bellow it :)
after the some time the processing text goes away and an alert shows which says the payment was not complete
@tapmobiledeveloper @osamaguc @tappayments @halaq @sadbar-khattak
any help :)
oh and btw here is the request i send :
let paymentItem = PKPaymentSummaryItem.init(label: "SHOE 1", amount: NSDecimalNumber(value: 100)) let paymentNetworks = [PKPaymentNetwork.amex, .discover, .masterCard, .visa] if PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: paymentNetworks) { let request = PKPaymentRequest() request.currencyCode = "USD" request.countryCode = "US" request.merchantIdentifier = "merchant.com.*********.ios" request.merchantCapabilities = [.capability3DS, .capabilityEMV, .capabilityCredit] request.supportedNetworks = paymentNetworks request.paymentSummaryItems = [paymentItem]
While doing the payment via k-net, payment is showing success but not receiving any callback method just closing the payment screen
and while doing payment via card, below response occurred
URL: https://api.tap.company/v2/charges/
HTTP status code: 400
Headers:
Date: Wed, 05 Feb 2020 13:11:40 GMT
Content-Length: 120
x-powered-by: Express
Etag: W/"78-xeOZg9SNIlq0RB+09eZ8TrzxfHk"
Content-Type: application/json
Body:
{
"errors" : [
{
"code" : "1108",
"description" : "Save card features are not enabled"
}
]
}
After a Successful or Failed Payment Session try when the app show a. new vc a white screen Pops up
is there a way to disable Apple pay button from appearing
or completely disable apple pay ?
Serialization error has occured every time when i click Pay button and didn't make any change when clicking report button also. I pposted this issue 2nd time but didn't get any response . Waste of time.
@IBOutlet private weak var loader: TapActivityIndicatorView? {
didSet {
self.loader?.animationDuration = Theme.current.commonStyle.loaderAnimationDuration
self.loader?.usesCustomColors = true
self.loader?.outterCircleColor = .tap_hex("535353")
self.loader?.innerCircleColor = .tap_hex("535353")
self.loader?.startAnimating()
}
}
crash here after redirecting
Hello Team,
I am using goSellSDK-iOS wher we have SessionDelegate. I am also using Alamofire has also SessionDelegate protocol. so when I tried to extend the delegate it shows me error.
'SessionDelegate' is ambiguous for type lookup in this context
could you please share your thoughts on the same?
Thanks in advance.
Error description : The data couldn’t be read because it is missing. keyNotFound
(CodingKeys(stringValue: "verified_application", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "data", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "verified_application", intValue: nil) ("verified_application").", underlyingError: nil))
crash file TapNibContentViewLoader
guard let contentView = nib.instantiate(withOwner: self, options: nil).first as? UIView else {
fatalError("Failed to instantiate \(selfType.tap_className) from nib named \(selfType.nibName).")
}
Why you use internal access modifier in the example?
Application crashes when click on CANCEL on Payment Screen.
private func tap_removeSeparateWindow() {
self.tap_separateWindow?.isHidden = true
self.tap_separateWindow?.rootViewController = nil
self.tap_separateWindow = nil
}
Are tab support SwiftUI , according documentation , I don't find any reference for swiftUI
Hi, I'm trying to integrate Apple Pay into my project, I did the steps mentioned in the readme and I'm receiving this error.
TAP SDK ERROR : Error type: API
Error:
Errors detected on the backend:
Error ErrorCode: Failed to decrypt token data
In my project I have my own classes for Currency
, Address
, etc. So to access the Currency
class in goSellSDK
I have to put the module name before it but that clashes with the name for the goSellSDK
class.
I want to:
goSellSDK.Currency(isoCode: "USD")
But Xcode compiler says Type 'goSellSDK' has no member 'Currency'
as it takes goSellSDK
as the class and not the module.
Possible solution would be to rename either the module or the goSellSDK
class.
Another solution, more common in ObjC than Swift, would be to prefix the classes in this library with a common prefix but this would require a name change in all classes and is not so Swifty.
Please update your library with src_all source identifier and phone key as mentioned in api doc because in create charge method it is mentioned phone as string parameter but really it should be object as per your create charge doc that content has country code & number .
Getting below error :
Serialization
Underlying error: The data couldn’t be read because it is missing.
URL response: <NSHTTPURLResponse: 0x60000041b2e0> { URL: https://api.tap.company/v2/charges/ } { Status Code: 400, Headers {
Connection = (
"keep-alive"
);
"Content-Length" = (
109
);
"Content-Type" = (
"application/json"
);
Date = (
"Mon, 04 Mar 2019 05:37:49 GMT"
);
Etag = (
"W/"6d-jkEDe8bsK4b0IpmIVyj1xMHo2nQ""
);
"X-Powered-By" = (
Express
);
} }
//
// ViewController.swift
// TapPaymentSDKDemo
//
// Created by Harshit Padalia on 15/03/21.
//
import UIKit
import goSellSDK
class ViewController: UIViewController, SessionDelegate, SessionDataSource {
@IBOutlet weak var button: PayButton!
var mode: TransactionMode {
return .purchase
}
var customer: Customer? {
return self.newCustomer
}
/// Creating a customer with known identifier received from Tap before.
// var identifiedCustomer: Customer? {
//
// return try? Customer(identifier: "cus_to_mer")
// }
/// Creating a customer with raw information.
var newCustomer: Customer? {
let emailAddress = try! EmailAddress(emailAddressString: "[email protected]")
let phoneNumber = try! PhoneNumber(isdNumber: "91", phoneNumber: "123456789")
return try? Customer(emailAddress: emailAddress,
phoneNumber: phoneNumber,
firstName: "test",
middleName: nil,
lastName: "test")
}
var currency: Currency? {
return .with(isoCode: "USD")
}
var amount: Decimal {
return Decimal(120)
}
var postURL: URL? {
return URL(string: "https://tap.company/post")
}
var paymentDescription: String? {
return "jkjk";
}
var paymentMetadata: [String : String]? {
return [:]
}
var paymentReference: Reference? {
return Reference(transactionNumber: "12",
orderNumber: "13")
}
var paymentStatementDescriptor: String? {
return "Payment statement descriptor will be here"
}
var require3DSecure: Bool {
return false
}
var receiptSettings: Receipt? {
return Receipt(email: true, sms: true)
}
var allowsToSaveSameCardMoreThanOnce: Bool {
return false
}
var isSaveCardSwitchOnByDefault: Bool {
return true
}
let sesssion : Session? = nil
override func viewDidLoad() {
super.viewDidLoad()
button.isEnabled = true
button.dataSource = self
button.delegate = self
sesssion?.dataSource = self
updatePayButtonAmount()
self.button?.updateDisplayedState()
self.title = "Tap Payment"
}
internal func updatePayButtonAmount() {
self.button?.updateDisplayedState()
}
internal func TabPaymentGatewayViewController() {
self.button?.updateDisplayedState()
}
func paymentSucceed(_ charge: Charge, on session: SessionProtocol) {
print(charge)
// self.dismiss(animated: true, completion: { self.callback?(charge.identifier,"1")})
}
func paymentFailed(with charge: Charge?, error: TapSDKError?, on session: SessionProtocol) {
if let error = error {
let errorMessage:String = "\(error) \n \(error.description)"
let alert:UIAlertController = UIAlertController(title: "Error", message: errorMessage, preferredStyle: .alert)
let copyAction:UIAlertAction = UIAlertAction(title: "Copy", style: .destructive) { (_) in
UIPasteboard.general.string = errorMessage
}
alert.addAction(copyAction)
present(alert, animated: true, completion: nil)
}
}
@IBAction private func addButtonTouchUpInside(_ sender: Any) {
// self.showPaymentItemViewController()
}
func sessionHasStarted(_ session: SessionProtocol) {
print(session)
}
func sessionCancelled(_ session: SessionProtocol) {
print(session)
DispatchQueue.main.async{
self.dismiss(animated: true, completion: {
// self.callback?("0","0")
})
}
}
func sessionHasFailedToStart(_ session: SessionProtocol) {
print(session)
}
}
TAP SDK KNOWN ERROR : Serialization
Error description : The data couldn’t be read because it is missing. keyNotFound(CodingKeys(stringValue: "verified_application", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "data", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "verified_application", intValue: nil) ("verified_application").", underlyingError: nil))
URL : https://api.tap.company/v2/init
Error Response Body : ["data": {
"encryption_key" = "-----BEGIN PUBLIC KEY——XXXXX——END PUBLIC KEY-----\n";
"key_type" = "secret_key";
"live_mode" = 0;
livemode = 0;
merchant = {
background = {
url = "https://goselljslib.b-cdn.net/photo-1497366754035-f200968a6e72.jpeg";
};
logo = "https://www.gotapnow.com/web/tapimg.aspx?cst=7538289";
name = "";
};
"merchant_id" = XXXXX;
"merchant_name" = "";
permission = {
"card_wallet" = 1;
"pci_dss" = 0;
threeDSecure = 1;
};
permissions = (
"card_wallet_enabled"
);
"private_key" = “” ; //sandbox publishable key used here
"sdk_settings" = {
"otp_resend_attempts" = 3;
"otp_resend_interval" = 60;
"status_display_duration" = 5;
};
"session_token" = “”;
}, "status": success]
Error URL Body : <NSHTTPURLResponse: 0x6000033b8f00> { URL: https://api.tap.company/v2/init } { Status Code: 200, Headers {
"Content-Length" = (
1557
);
"Content-Type" = (
"application/json; charset=utf-8"
);
Date = (
"Mon, 15 Mar 2021 09:34:20 GMT"
);
Etag = (
"W/"615-PefWMrBXbcpuLOAcVfUCOBGZbCk""
);
"Strict-Transport-Security" = (
"max-age=15552000; includeSubDomains"
);
"content-security-policy" = (
"img-src imgur.com; script-src 'self'; object-src 'none'; frame-ancestors 'none'; default-src 'none'; base-uri 'self'; form-action 'self'"
);
"feature-policy" = (
"camera 'none';autoplay 'none'"
);
"referrer-policy" = (
"no-referrer"
);
"x-content-security-policy" = (
"img-src imgur.com; script-src 'self'; object-src 'none'; frame-ancestors 'none'; default-src 'none'; base-uri 'self'; form-action 'self'"
);
"x-content-type-options" = (
nosniff
);
"x-dns-prefetch-control" = (
off
);
"x-download-options" = (
noopen
);
"x-frame-options" = (
SAMEORIGIN
);
"x-webkit-csp" = (
"img-src imgur.com; script-src 'self'; object-src 'none'; frame-ancestors 'none'; default-src 'none'; base-uri 'self'; form-action 'self'"
);
"x-xss-protection" = (
"1; mode=block"
);
} }
After this logs sessionHasFailedToStart method called and then payment failed method call
Always getting the below error for Token
Underlying error: The data couldn’t be read because it is missing.
URL response: <NSHTTPURLResponse: 0x141ae2a20> { URL: https://api.tap.company/v1.1/token/ } { Status Code: 403, Headers {
Connection = (
"keep-alive"
);
"Content-Length" = (
75
);
"Content-Type" = (
"application/json; charset=utf-8"
);
Date = (
"Thu, 07 Feb 2019 06:59:07 GMT"
);
Etag = (
"W/"4b-lAo6cX0/0Ucuxwlw7scmQzWPSJA""
);
"X-Powered-By" = (
Express
);
} }
Got an Error while building an app in xcode 11 , got an error while tap view got disappear after respectfull action like (saved card, cancel card etc. ), when tap's custom view got disappear its crashing
TAP SDK KNOWN ERROR : Serialization
Error description : The data couldn’t be read because it isn’t in the correct format. dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "card", intValue: nil), CodingKeys(stringValue: "address", intValue: nil), CodingKeys(stringValue: "avenue", intValue: nil)], debugDescription: "The container contains nothing serializable.", underlyingError: nil))
User should press Tap pay button twice in order to card tokenizing or purchasing. I get this error the first time
Error description : The data couldn’t be read because it is missing. keyNotFound(CodingKeys(stringValue: "verified_application", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "data", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: \"verified_application\", intValue: nil) (\"verified_application\").", underlyingError: nil))
The second time it will continue to fill card information.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.