S-Business Card

The SDK offers a declarative API to instantiate a controller for S-Business card payment and card storage processes with result callbacks for success, cancellation and failure. Present this controller and handle the callbacks accordingly.


PiaSDK.controller(
    for: cardPayment.sBusiness(),
    success: { piaController, transactionId in  },        // Commit the transaction with your merchant backend
    cancellation: { piaController, transactionId in },    // User canceled, rollback the transaction
    failure: { piaController, error in}                      // Rollback transaction, check error object for detail. 
)

The following sample code demonstrates how registration results are returned to the SDK via callback.


fun registerCardPayment(userChoseToStoreCardForLater storeCard: Bool, piaCallback: (TransactionID, RedirectURL) -> Void) {

    // Make a card registration request with your backend to retrieve a transactionID and redirectURL.
    // The SDK passes `true` for `storeCard` if the user has checked to store the card for later use. 

    // Callback with `transactionID` and `redirectURL` obtained from your merchant backend
    callback(.success(withTransactionID: response.transactionId, redirectURL: response.redirectURL))

    // If registration request failed with your backend, callback the SDK with the error. 
    callback(.failure(error))
}
Netaxept backend integration request body - S-Business Card Payment registration:

Make sure to add the below parameter along with all other required parameters for card payment registeration.

{
    "paymentMethodActionList" : { 
        "PaymentMethod" : "SBusinessCard" 
    }
}

Note: Netaxept backend integration tips can be found in 5.4 Backend Tips, S-Business Card Payment registration section

Deprecated: system authentication is no longer used.