Ios 我对TAP付款有意见

Ios 我对TAP付款有意见,ios,swift,payment,payment-processing,tap-payment,Ios,Swift,Payment,Payment Processing,Tap Payment,我已经在我的swift代码中集成了tap付款方法,但它不起作用。如果我遗漏了什么,请指导 这是我的密码 **AppDelegate未使用选项完成启动** let secretKey = SecretKey(sandbox: "my key", production: "my key") GoSellSDK.secretKey = secretKey let secretKey = SecretKey(sandbox: "my key", production: "my key"

我已经在我的swift代码中集成了tap付款方法,但它不起作用。如果我遗漏了什么,请指导

这是我的密码

**AppDelegate未使用选项完成启动**

    let secretKey = SecretKey(sandbox: "my key", production: "my key")
    GoSellSDK.secretKey = secretKey
let secretKey = SecretKey(sandbox: "my key", production: "my key")
GoSellSDK.secretKey = secretKey
GoSellSDK.mode = .sandbox
点击按钮后,未显示“点击付款视图控制器”的情况不会发生 视图控制器

let session = Session()
session.dataSource = self
session.delegate = self


@IBAction func btnCheckout(_ sender: UIButton) {

         SVProgressHUD.show()
         session.start()

    }
会话委托方法

    //TAP Payment

internal func paymentSucceed(_ charge: Charge, on session: SessionProtocol) {

    // payment succeed, saving the customer for reuse.

    if (charge.receiptSettings?.identifier) != nil {

        print(charge.transactionDetails.authorizationID!)
        print(charge.receiptSettings!.identifier!)


    }
}

internal func paymentFailed(with charge: Charge?, error: TapSDKError?, on session: SessionProtocol) {


    print("Error :: ",error?.localizedDescription)

}

internal func authorizationSucceed(_ authorize: Authorize, on session: SessionProtocol) {

    // authorization succeed, saving the customer for reuse.

    if let customerID = authorize.customer.identifier {



    }
}
func authorizationFailed(with authorize: Authorize?, error: TapSDKError?, on session: SessionProtocol)

{
    SVProgressHUD.dismiss()
    print("Error authorizationFailed:: ",error?.localizedDescription)

}


func sessionIsStarting(_ session: SessionProtocol)
{

    print("sessionIsStarting")

}


func sessionHasStarted(_ session: SessionProtocol)
{
    print("sessionHasStarted")

}

func sessionHasFailedToStart(_ session: SessionProtocol)
{
    print("sessionHasFailedToStart")
    SVProgressHUD.dismiss()

}

func sessionCancelled(_ session: SessionProtocol)
{
    print("sessionCancelled")
    SVProgressHUD.dismiss()
}
会话数据源

//MARK:-SessionDataSource

extension PaymentMethodsVC: SessionDataSource {


var currency: Currency? {

    return .with(isoCode: "KWD")
}


var amount: Decimal {

    let amount = 5.99

    return Decimal(amount)
}

var mode: TransactionMode {

    return .purchase
}

var customer: Customer? {

    //        if customerIDIsKnown {
    //
    //            return self.identifiedCustomer
    //        }
    //        else {

    return self.newCustomer
    //        }
}

/// Creating a customer with raw information.
var newCustomer: Customer? {

    let emailAddress = try! EmailAddress(emailAddressString: "customer@mail.com")
    let phoneNumber = try! PhoneNumber(isdNumber: "965", phoneNumber: "96512345")

    return try? Customer(emailAddress:  emailAddress,
                         phoneNumber:   phoneNumber,
                         firstName:     "Steve",
                         middleName:    nil,
                         lastName:      "Jobs")
}


var postURL: URL? {

    return URL(string: "https://tap.company/post")
}

var paymentDescription: String? {

    return "Awesome payment description will be here.";
}

}

如果要在沙盒环境中进行测试,请在**AppDelegate didFinishLaunchingWithOptions中添加此选项**

    let secretKey = SecretKey(sandbox: "my key", production: "my key")
    GoSellSDK.secretKey = secretKey
let secretKey = SecretKey(sandbox: "my key", production: "my key")
GoSellSDK.secretKey = secretKey
GoSellSDK.mode = .sandbox

如果要在沙盒环境中进行测试,请在**AppDelegate didFinishLaunchingWithOptions中添加此选项**

    let secretKey = SecretKey(sandbox: "my key", production: "my key")
    GoSellSDK.secretKey = secretKey
let secretKey = SecretKey(sandbox: "my key", production: "my key")
GoSellSDK.secretKey = secretKey
GoSellSDK.mode = .sandbox

我得到了同样的问题,我写了下面的代码

let secretKey = SecretKey(sandbox: "my key", production: "my key")
GoSellSDK.secretKey = secretKey
GoSellSDK.mode = .production

我得到了同样的问题,我写了下面的代码

let secretKey = SecretKey(sandbox: "my key", production: "my key")
GoSellSDK.secretKey = secretKey
GoSellSDK.mode = .production

Chirag Gajjar你找到解决方案了吗it@Customcommander我也面临着同样的问题。Chirag Gajjar你有没有找到解决这个问题的办法it@Customcommander你找到解决问题的办法了吗?我也面临同样的问题。