41 lines
739 B
Swift
41 lines
739 B
Swift
//
|
|
// CanChargeRequest.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 2023/08/11.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
struct CanChargeRequest: Encodable {
|
|
let title: String
|
|
let chargeCan: Int
|
|
let paymentGateway: PaymentGateway
|
|
let price: Double
|
|
let locale: String
|
|
}
|
|
|
|
struct PgChargeRequest: Encodable {
|
|
let canId: Int
|
|
let paymentGateway: PaymentGateway
|
|
}
|
|
|
|
struct CanChargeResponse: Decodable {
|
|
let chargeId: Int
|
|
}
|
|
|
|
struct CanVerifyRequest: Encodable {
|
|
let receiptString: String
|
|
let chargeId: Int
|
|
}
|
|
|
|
struct PgVerifyRequest: Encodable {
|
|
let receiptId: String
|
|
let orderId: String
|
|
|
|
enum CodingKeys : String, CodingKey {
|
|
case receiptId = "receipt_id"
|
|
case orderId = "order_id"
|
|
}
|
|
}
|