Skip to content

Commit

Permalink
Create script to create coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosrivereto committed Dec 17, 2024
1 parent f055677 commit 1454230
Show file tree
Hide file tree
Showing 7 changed files with 611 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,10 @@ Carthage/Build
#
*/Podfile.lock
*/Pods/

# Sonar
sonar-reports/*
.scannerwork
compile_commands.json
Coverage.xml
*.log
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM sonarqube:community
COPY sonar-custom-plugin-*.jar /opt/sonarqube/extensions/
31 changes: 16 additions & 15 deletions Example/TrustlySDK/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,22 @@ class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

self.establishData = ["accessId": "<ACCESS_ID>",
"merchantId" : "<MERCHANT_ID>",
"currency" : "USD",
"amount" : "1.00",
"merchantReference" : "<MERCHANT_REFERENCE>",
"paymentType" : "Retrieval",
"returnUrl": "/returnUrl",
"cancelUrl": "/cancelUrl",
"requestSignature": "<REQUEST_SIGNATURE>",
"customer.name": "John",
"customer.address.country": "US",
"metadata.urlScheme": "demoapp://",
"description": "First Data Mobile Test",
"env": "<[int, sandbox, local]>",
"localUrl": "<YOUR LOCAL URL WHEN `ENV` PROPERTY IS `LOCAL` (ex: 192.168.0.30:8000)>"]
self.establishData = [
"accessId": "A48B73F694C4C8EE6306",
"merchantId" : "110005514",
"currency" : "USD",
"amount" : "1.00",
"merchantReference" : "cac73df7-52b4-47d7-89d3-9628d2cfb65e",
"paymentType" : "Retrieval",
"returnUrl": "/returnUrl",
"cancelUrl": "/cancelUrl",
"requestSignature": "HT5mVOqBXa8ZlvgX2USmPeLns5o=",
"customer.name": "John",
"customer.address.country": "US",
"metadata.urlScheme": "demoapp://",
"description": "First Data Mobile Test",
"env": "int",
"localUrl": "192.168.0.13"]


self.trustlyView.onChangeListener { (eventName, attributes) in
Expand Down
2 changes: 2 additions & 0 deletions Sources/TrustlySDK/Session/SessionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ struct SessionCid: Codable {
func isValid(expirationTimeLimit: Int) -> Bool {
let dateNow = Date()


let diffs = Calendar.current.dateComponents([.hour], from: expirationTime, to: dateNow)


if let hours = diffs.hour {
return hours < expirationTimeLimit
}
Expand Down
Loading

0 comments on commit 1454230

Please sign in to comment.