SwiftDeveloper SwiftDeveloper - 2 months ago 15
iOS Question

Apple can approve credit card form in my app?

I have simple ticket app and in my country

Stripe
or
Paypal
doesn't work. I added my app inside credit card form and I integrated into my own api system . Also I'm using https (Secure Api connection) for credit card payment api.

I want to know when I submit my app to appstore: Appstore will approve my app ?

Answer

If this is some proprietary service using some proprietary protocol, you can consider using public key cryptography. Encrypt data with a one time AES key. Send the encrypted data. Encrypt the AES key with your public key and send it along. The server decrypts the symmetric AES key with your private key and thereafter decrypts the data !.

objective C

for more information and additional help see this link

Swift

for swift you can see the example here

or use

RNCryptor

encrypt

 // Encryption
let data: NSData = ...
let password = "Secret password"
let ciphertext = RNCryptor.encryptData(data, password: password)

decrypt

  // Decryption
do {
let originalData = try RNCryptor.decryptData(ciphertext, password: password)
// ...
} catch {
print(error)
}
Comments