Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
SynchronyFinancialWatchApp/SynchronyFinancial/SynchronyFinancial/Defaults.swift
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
97 lines (79 sloc)
3.45 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Defaults.swift | |
// SynchronyFinancial | |
// | |
// Created by Alan Maynard on 3/12/19. | |
// Copyright © 2019 Alan Maynard. All rights reserved. | |
// | |
import Foundation | |
final class Defaults { | |
// MARK: - Request URLs | |
static let LOGIN_URL = "https://syf-paysol-mocks.getsandbox.com/paysol/login/api/rest/v1_0/login" | |
static let MULTI_ACCT_URL = "https://syf-paysol-mocks.getsandbox.com/paysol/account/api/rest/v1_0/multi_account_summary_details" | |
static let FETCH_BANKS_URL = "https://syf-paysol-mocks.getsandbox.com/paysol/payment/api/rest/v1_0/fetch_banks" | |
static let TRANS_HISTORY_URL = "https://syf-paysol-mocks.getsandbox.com/paysol/account/api/rest/v1_0/transaction_history" | |
static let CANCEL_PAYMENT_URL = "https://syf-paysol-mocks.getsandbox.com/paysol/payment/api/rest/v1_0/cancel_payment" | |
static let MAKE_PAYMENT_URL = "https://syf-paysol-mocks.getsandbox.com/paysol/payment/api/rest/v1_0/make_payment" | |
static let defaultHeader = ["channel": "AW", "device_id": "apple_watch", "trans_id": "apple_watch"] | |
static var headerForLogin: [String: Any] = { | |
return ["client_id": "carecredit", | |
"client_secret": "", | |
"grant_type": "password", | |
"header": defaultHeader, | |
"iovation": ["device_fingerprint": "apple_watch", | |
"ip_address": "0.0.0.0", | |
"mobile_latitude": 0.0, | |
"mobile_longitude": 0.0], | |
"password": "Test12test", | |
"scope": "default", | |
"username": "carecredit"] | |
}() | |
// this header is used for multi-account and fetch banks resources | |
static var headerForMulti: [String: Any] = { | |
return ["header": defaultHeader, | |
"username": "carecredit"] | |
}() | |
static var headerForTransaction: [String: Any] = { | |
// get account alias | |
var account_alias = "" | |
// get today's date as ISO860 - YYYYMMDD string | |
var end_date = "" | |
// get desired start date as ISO860 - YYYYMMDD string | |
var start_date = "" | |
return ["account_alias": account_alias, | |
"begin_sequence": "1", | |
"end_date": end_date, | |
"end_sequence": "30", | |
"header": defaultHeader, | |
"scope_indicator": "B", | |
"start_date": start_date, | |
"username": "carecredit"] | |
}() | |
static var headerForCancelPmt: [String: Any] = { | |
// get account_alias | |
var account_alias = "" | |
// get payment confirmation number | |
var pmt_confirmation = "" | |
// get payment id | |
var payment_id = "" | |
return ["account_alias": account_alias, | |
"header": defaultHeader, | |
"scope_indicator": "B", | |
"payment_confirmation_number": pmt_confirmation, | |
"payment_id": payment_id, | |
"username": "carecredit"] | |
}() | |
static var headerForPmt: [String: Any] = { | |
// get account alias | |
var account_alias = "" | |
// get bank account id to pay from | |
var bank_acct_id = "" | |
return ["account_alias": account_alias, | |
"bank_account_id": bank_acct_id, | |
"header": defaultHeader, | |
"payment_amount": 123.45, | |
"payment_amount_type": "CBL", | |
"scheduled_payment_post_date": "20190306", | |
"username": "carecredit"] | |
}() | |
} |