APIClient
@objc(PAYAPIClient)
public class APIClient : NSObject
PAY.JP API client. cf. https://pay.jp/docs/api/#introduction
-
Shared instance.
Declaration
Swift
@objc(sharedClient) public static let shared: APIClient -
Undocumented
Declaration
Swift
public var tokenOperationObserver: TokenOperationObserverType { get } -
createToken(with:cvc: expirationMonth: expirationYear: name: tenantId: email: phone: useThreeDSecure: completion: ) Create PAY.JP Token
Declaration
Swift
@nonobjc public func createToken( with cardNumber: String, cvc: String, expirationMonth: String, expirationYear: String, name: String? = nil, tenantId: String? = nil, email: String? = nil, phone: String? = nil, useThreeDSecure: Bool = false, completion: @escaping (Result<Token, APIError>) -> Void )Parameters
cardNumberCredit card number
1234123412341234cvcCredit card cvc e.g.
123expirationMonthCredit card expiration month
01expirationYearCredit card expiration year
2020nameCredit card holder name
TARO YAMADAemailCredit card email (Extra Attributes) e.g.
test@example.comphoneCredit card phone number (Extra Attributes) E.164 e.g.
+819012345678useThreeDSecureWhether use 3-D secure or not
completioncompletion action
-
GET PAY.JP CardBrands
Declaration
Swift
@nonobjc public func getAcceptedBrands( with tenantId: String?, completion: CardBrandsResult? )Parameters
tenantIdidentifier of the Tenant
completioncompletion action
-
Undocumented
Declaration
Swift
@objc public func createTokenWith( _ token: PKPaymentToken, completionHandler: @escaping (Token?, NSError?) -> Void ) -
createTokenWith(_:cvc: expirationMonth: expirationYear: name: tenantId: email: phone: useThreeDSecure: completionHandler: ) Undocumented
Declaration
Swift
@objc public func createTokenWith( _ cardNumber: String, cvc: String, expirationMonth: String, expirationYear: String, name: String?, tenantId: String?, email: String?, phone: String?, useThreeDSecure: Bool, completionHandler: @escaping (Token?, NSError?) -> Void ) -
Undocumented
Declaration
Swift
@objc public func getTokenWith(_ tokenId: String, completionHandler: @escaping (Token?, NSError?) -> Void) -
Undocumented
Declaration
Swift
@objc public func getAcceptedBrandsWith( _ tenantId: String?, completionHandler: @escaping ([NSString]?, NSError?) -> Void ) -
Undocumented
Declaration
Swift
@objc public func finishTokenThreeDSecureWith( _ tokenId: String, completionHandler: @escaping (Token?, NSError?) -> Void )
View on GitHub