-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Read through the following steps first to understand how the integration process works. This will help you to understand why these steps are required and why you need to follow a specific sequence.
Step 1: Access your test account
You need to make sure that you have access to a test account with Amazon Payment Services. It is a full test environment that allows you to fully simulate transactions.
Step 2: Choose between a standardized or custom payment UI
The Amazon Payment Services iOS SDK provides you with a standard payment UI that you can use to quickly integrate in-app payments. The standard UI offers limited customizability.
Alternatively, you can choose to build your own payment UI using Amazon Payment Services iOS SDK building blocks, we describe this in the section on custom-coding a payment processing UI.
Step 3: Make sure that you are using the correct integration type
Prior to building the integration, you need to make sure that you are selecting and using the proper parameters in the API calls as per the required integration type. All the mandatory parameters are mentioned under every section in the API document
Step 4: Install the Amazon Payment Services iOS SDK in your development environment
You need to download our iOS SDK from the link provided. Next you need to include the iOS SDK in your Xcode project by following the steps in the next section. You are also required to install the library and to integrate the iOS SDK into your app.
Step 5: Create a test transaction request
You need to create a test transaction request. Processing a valid API request depends on the transaction parameters included, you need to check the documentation and review every parameter to reduce the errors in processing the transaction.
Step 6: Process a transaction response
After every payment, Amazon Payment Services returns the transaction response on the URL configured in your account under Technical Settings, Channel Configuration.
For more details review the transaction feedback instructions in this section. You need to validate the response parameters returned on this URL by calculating the signature for the response parameters using the SHA response phrase configured in your account under security settings.
Step 7: Test and Go Live
You can use our test card numbers to test your integration and simulate your test cases. The Amazon Payment Services team may need to test your integration before going live to assure your application integration.
Below we describe the transaction workflow that occurs when you process a payment using the Amazon Payment Service iOS Mobile SDK.
-
Your customer clicks on the Pay button in your app.
-
Your merchant system (back-end) generates a mobile SDK token using the Amazon Payment Services API.
-
Your app passes the parameters, including the SDK token, to the iOS mobile SDK.
-
The iOS mobile SDK starts a secure connection and sends the transaction request to the Amazon Payment Services server to be validated.
-
The Amazon Payment Services API validates the SDK token, device_ID and other request parameters and returns the validation response to the iOS SDK.
-
Assuming validation is passed your merchant app displays a payment page to the customer.
-
Your customer enters their payment details on the payment page in the iOS SDK prompt on their device.
-
The Amazon Payment Services iOS SDK validates your customer's details and sends a transaction (Authorization or Purchase) request to the relevant payment processor and issuing bank.
-
The payment processor processes the transaction request and returns a transaction response to the iOS SDK.
-
The Amazon Payment Services iOS SDK returns the transaction response to your merchant app.
-
Your merchant app displays the response to your customer.
These are the first steps you need to follow to install the Amazon Payment Services iOS SDK in your iOS application.
You have two options for including the SDK in your Xcode project. You can do so manually, or you can include the SDK by using CocoaPods
-
Obtain the Amazon Payment Services iOS Mobile SDK by downloading it from the Amazon Payment Services website.
-
Extract the folder you downloaded in the previous step.
-
Drag PayFortSDK.xcframework into the Frameworks, Libraries, and Embedded Content section of your target.
[NOTE]: The PayFort SDK is distributed as an XCFramework, therefore you are required to use Cocoapods 1.9.0 or newer.
- Add the following code to your Podfile (inside the target section):
pod 'PayFortSDK'
- Add the following to the bottom of your Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['PayFortSDK'].include? target.name
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
end
- Run the following command:
pod install
[NOTE]: Ensure it is linked once in the Linked Framework and Libraries or just drag the PayFortSDK.xcframework to Embedded Binaries in the general tab in the project settings.
[NOTE]: In Xcode, secondary-click your project's .plist file and select Open As Source Code. Insert the following XML snippet into the body of your file just before the final, as below:
< dict>element
<key>NSAppTransportSecurity</key>
< dict>
<key>NSAllowsArbitraryLoads</key><true/>
< /dict>
To ensure that your app does not disconnect from the SDK when it goes into the background make sure to add this code:
Objective-C:
(void)applicationDidEnterBackground:(UIApplication *)application {
block UIBackgroundTaskIdentifier backgroundTask; backgroundTask = [application beginBackgroundTaskWithExpirationHandler: ^ { [application endBackgroundTask:backgroundTask];
backgroundTask = UIBackgroundTaskInvalid; }]; }
Swift
func applicationDidEnterBackground(_ application: UIApplication)
{
var bgTask: UIBackgroundTaskIdentifier = 0 bgTask = application.beginBackgroundTask(expirationHandler:
{ application.endBackgroundTask(bgTask) bgTask = UIBackgroundTaskInvalid
})
}
A mobile SDK authentication token is required to authenticate every request sent to the SDK. The token is also significant to process payment operations with Amazon Payment Services through our iOS mobile SDK.
To get started with our iOS mobile SDK you must first establish the ability to generate a mobile SDK token.
[NOTE]: The creation and initiation of a mobile SDK token happens on your server -- your server must generate the token by sending a request to the Amazon Payment Services API.
[NOTE:] A unique authentication token must be created for each transaction. Each authentication token has a life-time of only one hour if no new request from the same device is sent.
These are the URLs you need to use when you request a mobile SDK token for your iOS app:
Test Environment URL
https://sbpaymentservices.payfort.com/FortAPI/paymentApi
Production Environment URL
https://paymentservices.payfort.com/FortAPI/paymentApi
You need to submit parameters as a REST POST request using JSON. Below we list the range of parameters for the iOS mobile SDK token request.
When you send your request for an iOS mobile SDK token you must send the following parameters to Amazon Payment Services:
error_reporting(E_ALL);
ini_set('display_errors', '1');
$url = 'https://sbpaymentservices.payfort.com/FortAPI/paymentApi';
$arrData = array(
'service_command' => 'SDK_TOKEN',
'access_code' => 'xxxx',
'merchant_identifier' => 'xxxx',
'language' => 'en',
'device_id'=> 'ffffffff-a9fa-0b44-7b27-29e70033c587',
'signature' => '7cad05f0212ed933c9a5d5dffa31661acf2c827a',
);
$ch = curl_init( $url );
# Setup request to send json via POST.
$data = json_encode($arrData);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $data );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
# Return response instead of printing.
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
# Send request.
$result = curl_exec($ch);
curl_close($ch);
# Print response.
echo "$result";
curl -H "Content-Type: application/json" -d
'{"service_command":"SDK_TOKEN","language":"en","access_code":"xxxxx","merchant_identifier":"xxxx",,"language":"en","device_id":"ffffffff-a9fa-0b44-7b27-29e70033c587",
"signature":"7cad05f0212ed933c9a5d5dffa31661acf2c827a"}'
https://sbpaymentservices.payfort.com/FortAPI/paymentApi
import urllib
import urllib2
import json
url = 'https://sbpaymentservices.payfort.com/FortAPI/paymentApi';
arrData = {
'service_command' : 'SDK_TOKEN',
'access_code' : 'xxxxxx',
'merchant_identifier' : 'xxxxx',
'language' : 'en',
'device_id': 'ffffffff-a9fa-0b44-7b27-29e70033c587',
'signature' : '7cad05f0212ed933c9a5d5dffa31661acf2c827a',
};
values = json.dumps(arrData)
data = urllib.urlencode(values)
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
page = response.read()
print page + '\n\n'
String jsonRequestString = "{\"service_command\" : \"SDK_TOKEN\" , "
+"\"access_code\" : \"xxxxx\", "
+"\"merchant_identifier\" : \"xxxxx\", "
+ "\"language\" : \"en\","
+ "\"device_id\"\"ffffffff-a9fa-0b44-7b27-29e70033c587\", "
+ "\"signature\" : \"7cad05f0212ed933c9a5d5dffa31661acf2c827a\"}";
// Define and Initialize HttpClient
HttpClient httpClient = HttpClientBuilder.create().build();
// Intialize HttpPOST with FORT Payment services URL
HttpPost request = new HttpPost("https://sbpaymentservices.payfort.com/FortAPI/paymentApi");
// Setup Http POST entity with JSON String
StringEntity params = new StringEntity(jsonRequestString);
// Setup request type as JSON
request.addHeader("content-type", "application/json");
request.setEntity(params);
// Post request to FORT
HttpResponse response = httpClient.execute(request);
// Read response using StringBuilder
StringBuilder sb = new StringBuilder();
BufferedReader reader = new BufferedReader(new InputStreamReader(
response.getEntity().getContent()), 65728);
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line);
}
// Print response
System.out.println(sb.toString());
require 'json'
require 'net/http'
require 'net/https'
require 'uri'
require 'openssl'
arrData = {
'service_command' => 'SDK_TOKEN',
'access_code' => 'xxxxxxx',
'merchant_identifier' => 'xxxxx',
'language' => 'en',
'device_id'=> 'ffffffff-a9fa-0b44-7b27-29e70033c587',
'signature' => '7cad05f0212ed933c9a5d5dffa31661acf2c827a',
};
arrData = arrData.to_json
uri = URI.parse("https://sbpaymentservices.payfort.com/FortAPI/paymentApi")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new("/v1.1/auth")
request.add_field('Content-Type', 'application/json')
request.body = arrData
response = http.request(request)
ATTRIBUTES | Description |
---|---|
service_command Alpha Mandatory max: 20 |
Command. Possible/ expected values: SDK_TOKEN Special characters: _ |
access_code Alphanumeric Mandatory Max: 20 |
Access code. Example: zx0IPmPy5jp1vAz8Kpg7 |
merchant_identifier Alphanumeric Mandatory Max: 20 |
The ID of the Merchant. Example: CycHZxVj |
language Alpha Mandatory Max: 2 |
The checkout page and messages language. Possible/ expected values: en/ ar |
device_id Alphanumeric Mandatory Max: 100 |
A unique device identifier. Example: ffffffff-a9fa-0b44-7b27-29e70033c587 Special characters: - |
signature Alphanumeric Mandatory Max: 200 |
A string hashed using the Secure Hash Algorithm. Please refer to section Signature Example: 7cad05f0212ed933c9a5d5dffa31661acf2c827a |
[NOTE:] device_id - This value to be generated from the UIDevice Class Reference, and you can generate this parameter by using the following command: [payFort getUDID]
These parameters will be returned in the Amazon Payment Services response:
ATTRIBUTES | Description |
---|---|
service_command Alpha Max: 20 |
Command. Possible/ expected values: SDK_TOKEN |
access_code Alphanumeric Max: 20 |
Access code. Example: zx0IPmPy5jp1vAz8Kpg7 |
merchant_identifier Alphanumeric Max: 20 |
The ID of the Merchant. Example: CycHZxVj |
language Alpha Max: 2 |
The checkout page and messages language. Possible/ expected values: en/ ar |
device_id Alphanumeric Max: 100 |
A unique device identifier. Example: ffffffff-a9fa-0b44-7b27-29e70033c587 |
signature Alphanumeric Max: 200 |
A string hashed using the Secure Hash Algorithm. Please refer to section Signature Example: 7cad05f0212ed933c9a5d5dffa31661acf2c827a |
sdk_token Alphanumeric Max: 100 |
An SDK Token to enable using the Amazon Payment Services Mobile SDK. Example: dwp78q3 |
response_message Alphanumeric Max: 150 |
Message description of the response code. It returns according to the request language. Possible/ expected values: Please refer to section messages |
response_code Numeric Max: 5 |
Response Code carries the value of our system's response. *The code consists of five digits, the first 2 digits represent the response status, and the last 3 digits represent the response messages. Example: 20064 |
status Numeric Max: 2 |
A two-digit numeric value that indicates the status of the transaction. Possible/ expected values: Please refer to section statuses |
NOTE: Every parameter the merchant sends in the request should be received by the merchant in the response - even the optional parameters.
In this section we outline how you process a transaction using the iOS mobile SDK.
As a merchant you have two ways in which you can process payments using the Amazon Payment Services iOS mobile SDK.
-
Standard payment screen. You can use the standard Amazon Payment Services iOS SDK interface to display a standard payment screen.
This standard payment view is customizable in three ways. You can hide the loading screen, and you can change the presentation style from full screen to OS default. You can also customize some of the UI elements. We address customizing the standard payment screen in this section.
-
Custom integration. You can choose to build your own payment processing screen by coding your own payment processing screen. With this mobile SDK feature, we allow merchants to integrate a native app checkout experience without displaying our standard payment screen -- while still using SDK features for rapid go-live.
With this integration route your customers can securely pay using a custom merchant checkout interface. The SDK provides card input fields and a pay button that merchants can encapsulate inside their checkout interface to match their own inline customer experience.
The Amazon Payment Services SDK will securely transmit the completed card details to the Amazon Payment Services API for processing in order to complete the transaction. We discuss the custom-coded payment UI in this section.
These are the steps you need to follow to perform a checkout using our standard UI. See the next section for building your own customized payment UI.
1- Import the framework into your app
Start by importing the Amazon Payment Service iOS SDK library. You
do so by using the following code:
Objective-C
#import < PayFortSDK/PayFortSDK-Swift.h>
Swift
import PayFortSDK
2- Initialize the controllers
Initialize **PayFortController** within the targeted environment.
You set the target environment by setting one of the two ENUM,
either **PayFortEnviromentSandBox** or
**PayFortEnviromentProduction**
Objective-C
PayFortController *payFort = [[PayFortController alloc]initWithEnviroment: PayFortEnviromentSandBox];
Swift
let payFort = PayFortController.init(enviroment: .sandBox)
3- Preparing Request Parameters
Set a dictionary that contains all keys and values for the SDK
Objective-C
NSMutableDictionary *request = [[NSMutableDictionary alloc]init];
[request setValue:@"10000" forKey:@"amount"];
[request setValue:@"AUTHORIZATION" forKey:@"command"];
[request setValue:@"USD" forKey:@"currency"];
[request setValue:@ "[email protected]" forKey:@"customer_email"]
[request setValue:@"en" forKey:@"language"];
[request setValue:@"112233682686" forKey:@"merchant_reference"]
[request setValue:@"SDK TOKEN GOES HERE" forKey:@"sdk_token"];
[request setValue:@"" forKey:@"payment_option"];
[request setValue:@"gr66zzwW9" forKey:@"token_name"];
Swift
let request = ["amount" : "1000",
"command" : "AUTHORIZATION",
"currency" : "AED",
"customer_email" : "[email protected]",
"installments" : "",
"language" : "en",
"sdk_token" : "token"]
4 . Response callback function
Amazon Payment Services allows you retrieve and receive the response parameters after processing a transaction once the transaction is completed. It only happens during the installation process. This is the code you need to use: Objective-C
[payFort callPayFortWithRequest:request currentViewController:self
success:^(NSDictionary *requestDic, NSDictionary *responeDic) { NSLog(@"Success");
NSLog(@"responeDic=%@",responeDic);
}
canceled:^(NSDictionary *requestDic, NSDictionary *responeDic) { NSLog(@"Canceled");
NSLog(@"responeDic=%@",responeDic);
}
faild:^(NSDictionary *requestDic, NSDictionary *responeDic, NSString *message) {
NSLog(@"Faild");
NSLog(@"responeDic=%@",responeDic);
}];
Swift
payFort.callPayFort(withRequest: request, currentViewController: self, success: { (requestDic, responeDic) in print("success")
},
canceled: { (requestDic, responeDic) in
print("canceled")
}, faild: { (requestDic, responeDic, message) in print("faild")
})
This is a list of the parameters you need to send when you send a request to the iOS SDK.
ATTRIBUTES | Description |
---|---|
command Alpha Mandatory max: 20 |
Command. Possible/ expected values: AUTHORIZATION, PURCHASE. Please refer to this section to know more about the differences. |
merchant_reference Alphanumeric Mandatory Max: 40 |
The Merchant’s unique order number. Example: XYZ9239-yu898 Special characters: - _ . |
amount Numeric Mandatory Max: 10 |
The transaction's amount. *Each currency has predefined allowed decimal points that should be taken into consideration when sending the amount. Example: 10000 |
currency Alpha Mandatory Max: 3 |
The currency of the transaction’s amount in ISO code 3. Example: AED |
language Alpha Mandatory Max: 2 |
The checkout page and messages language. Possible/ expected values: en/ ar |
customer_email Alphanumeric Mandatory Max: 254 |
The customer's email. Example: [email protected] Special characters: _ - . @ + |
sdk_token Alphanumeric Mandatory Max: 100 |
An SDK Token to enable using the Amazon Payment Services Mobile SDK. Example: Dwp78q3 |
token_name Alphanumeric Optional Max: 100 |
The Token received from the Tokenization process. Example: Op9Vmp Special characters: . @ - _ |
payment_option Alpha Optional Max: 10 |
Payment option. Possible/ expected values: - MASTERCARD - VISA - AMEX - MADA (for Purchase operations and eci Ecommerce only) Click here to download MADA Branding Document - MEEZA (for Purchase operations and ECOMMERCE eci only) |
eci Alpha Optional Max: 16 |
Ecommerce indicator. Possible/ expected values: ECOMMERCE |
order_description Alphanumeric Optional Max: 150 |
A description of the order. Example: iPhone 6-S Special characters: ' / . _ - # : $ Space
|
customer_ip Alphanumeric Optional max: 45 |
It holds the customer's IP address. *It's Mandatory, if the fraud service is active. *We support IPv4 and IPv6 as shown in the example below. Example: IPv4 → 192.178.1.10 IPv6 → 2001:0db8:3042:0002:5a55:caff:fef6:bdbf Special characters: . : |
customer_name Alpha Optional Max: 40 |
The customer's name. Example: John Smith Special characters: _ \ / - . '
|
phone_number Alphanumeric Optional max: 19 |
The customer's phone number. Example: 00962797219966 Special characters: + - ( ) Space |
settlement_reference Alphanumeric Optional max: 34 |
The Merchant submits unique value to Amazon Payment Services. The value is then passed to the Acquiring bank and displayed to the merchant in the Acquirer settlement file. Example: XYZ9239-yu898 Special characters: - _ . |
merchant_extra Alphanumeric Optional Max: 999 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith Special characters: . ; / _ - , ' @ |
merchant_extra1 Alphanumeric Optional Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith Special characters: . ; / _ - , ' @ |
merchant_extra2 Alphanumeric Optional Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith Special characters: . ; / _ - , ' @ |
merchant_extra3 Alphanumeric Optional Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith Special characters: . ; / _ - , ' @ |
merchant_extra4 Alphanumeric Optional Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith Special characters: . ; / _ - , ' @ |
merchant_extra5 Alphanumeric Optional Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith Special characters: . ; / _ - , ' @ |
billing_stateProvince Alphanumeric Optional max: 20 |
The state or province of the address. Reference: ISO_3166-2 Example1: AMMAN Example2: TALFILAH |
billing_provinceCode Alphanumeric Optional max: 3 |
The three character ISO 3166-2 country subdivision code for the state or province of the address. Providing this field might improve your payer experience for 3-D Secure payer authentication. Reference: ISO_3166-2 Example1: AM Example2: AT |
billing_street Alphanumeric Optional max: 100 |
The first line of the address. For example, this may be the street name and number, or the Post Office Box details. |
billing_street2 Alphanumeric Optional max: 100 |
The second line of the address (if provided). |
billing_postcode Alphanumeric Optional max: 10 |
The post code or zip code of the address. |
billing_country Alphanumeric Optional min:3, max: 3 |
The 3 letter ISO standard Alphanumeric country code of the address. |
billing_company Alphanumeric Optional max: 100 |
The name of the company associated with this address. |
billing_city Alphanumeric Optional max: 100 |
The city portion of the address. |
shipping_stateProvince Alphanumeric Optional max: 20 |
The state or province of the address. |
shipping_provinceCode Alphanumeric Optional max: 3 |
The three character ISO 3166-2 country subdivision code for the state or province of the address. Providing this field might improve your payer experience for 3-D Secure payer authentication. |
shipping_street Alphanumeric Optional max: 100 |
The first line of the address. For example, this may be the street name and number, or the Post Office Box details. |
shipping_street2 Alphanumeric Optional max: 100 |
The second line of the address (if provided). |
shipping_source Alphanumeric Optional |
How you obtained the shipping address. Possible/ expected values: NEW_ADDRESS, ADDRESS_ON_FILE |
shipping_sameAsBilling Alphanumeric Optional |
Indicates whether the shipping address provided is the same as the payer's billing address. Provide this value if you are not providing the full shipping and billing addresses, but you can affirm that they are the same or different. Possible/ expected values: DIFFERENT, SAME, UNKNOWN |
shipping_postcode Alphanumeric Optional max: 10 |
The post code or zip code of the address. |
shipping_country Alphanumeric Optional min:3, max: 3 |
The 3 letter ISO standard Alphanumeric country code of the address. |
shipping_company Alphanumeric Optional max: 100 |
The name of the company associated with this address. |
shipping_city Alphanumeric Optional max: 100 |
The city portion of the address. |
agreement_id Alphanumeric Optional max: 100 |
identifier for the agreement with the payer to process payments to be used in recurring payments ( Required for MADA ) |
recurring_mode Alphanumeric Optional max: 20 |
Indicates if the subsequent payments within the agreement has same/different amount or unscheduled (unknown interval/amount). ( Required for MADA ) Possible/ expected values: UNSCHEDULED, VARIABLE, FIXED |
recurring_transactions_count Alphanumeric Optional max: 100 |
The number of merchant-initiated payments within the recurring payment agreement. ( Required for MADA and only if recurring_mode = VARIABLE or FIXED ) |
recurring_expiry_date |
The date where the merchant needs to end the recurring. The format is YY-MM-DD [Numeric] with special character - |
recurring_days_between_payments |
The number of days between payments agreed with the payer under your agreement with them. The allowed data type is: Numeric only. |
[NOTE]: Before sending the transaction value you must multiply the value by a factor that matches the ISO 4217 specification for that currency. Multiplication is necessary to accommodate decimal values. Each currency's 3-digit ISO code will have a specification for the number of digits after the decimal separator.
For example: If the transaction value is 500 AED; according to ISO 4217, you should multiply the value with 100 (to accommodate 2 decimal points). You will therefore send an AED 500 purchase amount as a value of 50000.
Another example: If the amount value was 100 JOD; according to ISO 4217, you should multiply the value with 1000 (to accommodate 3 decimal points). You therefore send a JOD 100 purchase amount as a value of 100000.
ATTRIBUTES | Description |
---|---|
command Alpha Max: 20 |
Command. Possible/ expected values: AUTHORIZATION, PURCHASE. Please refer to this section to know more about the differences. |
merchant_reference Alphanumeric Max: 40 |
The Merchant’s unique order number. Example: XYZ9239-yu898 |
amount Numeric Max: 10 |
The transaction's amount.*Each currency has predefined allowed decimal points that should be taken into consideration when sending the amount. Example: 10000 |
currency Alpha Max: 3 |
The currency of the transaction’s amount in ISO code 3. Example: AED |
customer_email Alphanumeric Max: 254 |
The customer's email. Example: [email protected] |
fort_id Numeric Max: 20 |
The order's unique reference returned by our system. Example: 149295435400084008 |
sdk_token Alphanumeric Max: 100 |
An SDK Token to enable using the Amazon Payment Services Mobile SDK. Example: Dwp78q3 |
token_name Alphanumeric max: 100 |
The Token received from the Tokenization process. Example: Op9Vmp |
payment_option Alpha Max: 10 |
Payment option. Possible/ expected values: - MASTERCARD - VISA - AMEX - MADA (for Purchase operations and eci Ecommerce only) Click here to download MADA Branding Document - MEEZA (for Purchase operations and ECOMMERCE eci only) |
eci Alpha Max: 16 |
The E-commerce indicator. Possible/ expected values: ECOMMERCE |
authorization_code Alphanumeric Max: 100 |
The authorization code returned from the 3rd party. Example: P1000000000000372136 |
order_description Alphanumeric Max: 150 |
It holds the description of the order. Example: iPhone 6-S |
response_message Alphanumeric Max: 150 |
The message description of the response code; it returns according to the request language. Possible/ expected values: Please refer to section messages |
response_code Numeric Max: 5 |
Response Code carries the value of our system's response. *The code consists of five digits, the first 2 digits represent the response status, and the last 3 digits represent the response messages. Example: 20064 |
customer_ip Alphanumeric max: 45 |
It holds the customer's IP address. *We support IPv4 and IPv6 as shown in the example below. Example: IPv4 → 192.178.1.10 IPv6 → 2001:0db8:3042:0002:5a55:caff:fef6:bdbf |
customer_name Alpha Max: 40 |
The customer's name. Example: John Smith |
expiry_date Numeric Max: 4 |
The card's expiry date. Example: 2105 |
card_number Numeric Max: 16 |
The masked credit card's number. Only the MEEZA payment option takes 19 digits card number. AMEX payment option takes 15 digits card number. Otherwise, they take 16 digits card number. Example: 400555***0001 |
status Numeric Max: 2 |
A two-digit numeric value that indicates the status of the transaction. Possible/ expected values: Please refer to section statuses |
phone_number Alphanumeric max: 19 |
The customer's phone number. Example: 00962797219966 |
settlement_reference Alphanumeric max: 34 |
The Merchant submits unique value to Amazon Payment Services. The value is then passed to the Acquiring bank and displayed to the merchant in the Acquirer settlement file. Example: XYZ9239-yu898 |
merchant_extra Alphanumeric Max: 999 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith |
merchant_extra1 Alphanumeric Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith |
merchant_extra2 Alphanumeric Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith |
merchant_extra3 Alphanumeric Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith |
merchant_extra4 Alphanumeric Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith |
merchant_extra5 Alphanumeric Max: 250 |
Extra data sent by merchant. Will be received and sent back as received. Will not be displayed in any report. Example: JohnSmith |
billing_stateProvince Alphanumeric max: 20 |
The state or province of the address. Reference: ISO_3166-2 Example1: AMMAN Example2: TALFILAH |
billing_provinceCode Alphanumeric max: 3 |
The three character ISO 3166-2 country subdivision code for the state or province of the address. Providing this field might improve your payer experience for 3-D Secure payer authentication. Reference: ISO_3166-2 Example1: AM Example2: AT |
billing_street Alphanumeric max: 100 |
The first line of the address. For example, this may be the street name and number, or the Post Office Box details. |
billing_street2 Alphanumeric max: 100 |
The second line of the address (if provided). |
billing_postcode Alphanumeric max: 10 |
The post code or zip code of the address. |
billing_country Alphanumeric min:3, max: 3 |
The 3 letter ISO standard Alphanumeric country code of the address. |
billing_company Alphanumeric max: 100 |
The name of the company associated with this address. |
billing_city Alphanumeric max: 100 |
The city portion of the address. |
shipping_stateProvince Alphanumeric max: 20 |
The state or province of the address. |
shipping_provinceCode Alphanumeric max: 3 |
The three character ISO 3166-2 country subdivision code for the state or province of the address. Providing this field might improve your payer experience for 3-D Secure payer authentication. |
shipping_street Alphanumeric max: 100 |
The first line of the address. For example, this may be the street name and number, or the Post Office Box details. |
shipping_street2 Alphanumeric max: 100 |
The second line of the address (if provided). |
shipping_source Alphanumeric |
How you obtained the shipping address. Possible/ expected values: NEW_ADDRESS, ADDRESS_ON_FILE |
shipping_sameAsBilling Alphanumeric |
Indicates whether the shipping address provided is the same as the payer's billing address. Provide this value if you are not providing the full shipping and billing addresses, but you can affirm that they are the same or different. Possible/ expected values: DIFFERENT, SAME, UNKNOWN |
shipping_postcode Alphanumeric max: 10 |
The post code or zip code of the address. |
shipping_country Alphanumeric min:3, max: 3 |
The 3 letter ISO standard Alphanumeric country code of the address. |
shipping_company Alphanumeric max: 100 |
The name of the company associated with this address. |
shipping_city Alphanumeric max: 100 |
The city portion of the address. |
agreement_id Alphanumeric max: 100 |
identifier for the agreement with the payer to process payments to be used in recurring payments |
[NOTE:] Every parameter the Merchant sends in the Request should be received by the Merchant in the Response - even the optional ones.
The following sample code shows you how to process a payment using the standard view. The code sample illustrates how you send a request operation in the mobile SDK.
Objective-C
- (void)viewDidLoad {
[super viewDidLoad];
payfort = [[PayFortController alloc] initWithEnviroment:PayFortEnviromentSandBox];
}
NSMutableDictionary *requestDictionary = [[NSMutableDictionary alloc]init];
[requestDictionary setValue:@"10000" forKey:@"amount"];
[requestDictionary setValue:@"AUTHORIZATION" forKey:@"command"];
[requestDictionary setValue:@"USD" forKey:@"currency"];
[requestDictionary setValue:@"[email protected]" forKey:@"customer_email"];
[requestDictionary setValue:@"en" forKey:@"language"];
[requestDictionary setValue:@"112233682686" forKey:@"merchant_reference"];
[requestDictionary setValue:@"" forKey:@"payment_option"];
[requestDictionary setValue:@"gr66zzwW9" forKey:@"token_name"];
[payFort callPayFortWithRequest:requestDictionary currentViewController:self success:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} canceled:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} faild:^(NSDictionary *requestDic, NSDictionary *responeDic, NSString *message) {
}];
Swift
let request = ["amount" : "1000",
"command" : "AUTHORIZATION",
"currency" : "AED",
"customer_email" : "[email protected]",
"installments" : "",
"language" : "en",
"sdk_token" : "token"]
payFort.callPayFort(withRequest: request, currentViewController: self,
success: { (requestDic, responeDic) in
print("success")
print("responeDic=\(responeDic)")
print("responeDic=\(responeDic)")
},
canceled: { (requestDic, responeDic) in
print("canceled")
print("responeDic=\(responeDic)")
print("responeDic=\(responeDic)")
},
faild: { (requestDic, responeDic, message) in
print("faild")
print("responeDic=\(responeDic)")
print("responeDic=\(responeDic)")
})
When you use the standard payment UI you can customize the payment UI presented by our iOS SDK in a number of ways to better reflect your business. We outline your options below.
You can customize the standard payment user interface in your iOS app.
Standard vs. Customized Mobile SDK Payment Page
Follow these steps to configure a customized payment UI:
-
Create your nibFile .xib and set the name of Arabic xib same name with English one with suffix -ar.
-
Link the xib with PayFortView and bind all the IBOutlets in interface section IBOutlet UILabel *titleLbl;
IBOutlet UIButton *BackBtn;
IBOutlet UILabel *PriceLbl;
IBOutlet JVFloatLabeledTextField *CardNameTxt;
IBOutlet JVFloatLabeledTextField *CardNumberTxt;
IBOutlet JVFloatLabeledTextField *CVCNumberTxt;
IBOutlet JVFloatLabeledTextField *ExpDateTxt;
IBOutlet UILabel *cardNumberErrorlbl;
IBOutlet UILabel *cVCNumberErrorlbl;
IBOutlet UILabel *expDateErrorlbl;
IBOutlet UISwitch *savedCardSwitch;
IBOutlet UIButton *paymentBtn;
IBOutlet UILabel *saveCardLbl;
IBOutlet UIImageView *imageCard;
- Assign new created xib file to Amazon Payment Services controller.
[payFort setPayFortCustomViewNib:@\"PayFortView2\"\];
[NOTE]. If you call Arabic view and the Arabic view not existed
the application will crash.
Don't forget to set the custom view field in the identity inspector
There is an option to hide the loading prompt when the iOS SDK initializes the connection request. You can disable the loading prompt by using following option:
Objective-C
payFort.hideLoading = YES;
Swift
payFort.hideLoading = true
It's easy to change the presentation style from full screen to default by using the following property:
Objective-C
payFort.presentAsDefault = YES;
Swift
payFort.presentAsDefault = true
[NOTE]: The default type is full screen when you set the value to false, when set to true it will appear according to the OS default.
There is an option to show the response view more directly in an elegant view that shows the response results either as success or failed. You do so by activating the following option:
Objective-C
payFort.isShowResponsePage = YES;
Swift
payFort.isShowResponsePage = true
In this section we outline the key information you need to create your own payment processing screen using the tools in the iOS SDK.
You need to generate an SDK token before you can start processing payments using your custom payment processing UI. Refer to the SDK token section earlier in this document for instructions on creating an SDK token.
You create your custom payment screen by using the following five components included in the Amazon Payment Services iOS SDK:
-
CardNumberView
-
CVCNumberView
-
ExpiryDateView
-
CardHolderNameView
-
PayButton
Attributes |
Type |
Description |
---|---|---|
textColor | UIColor |
The input text filed text color |
fontStyle | UIFont |
The input text filed font style |
backgroundColor |
UIColor |
The input text filed background color |
errorText |
String |
The Error Label text |
errorFontStyle |
UIFont |
The Error Label text Font Style |
errorTextColor |
UIColor |
The Error Label text Text Color |
titleText |
String |
The Title Label text |
titleTextColor |
UIColor |
The Title Label text Color |
titleErrorTextColor |
UIColor |
The Error Title Label text Color |
titleFontStyle |
UIFont |
The Title Label Font style |
Components Views
Item property, all these properties are available for each component.
Swift
let property = Property()
property.textColor
property.fontStyle
property.backgroundColor
property.errorFontStyle
property.errorTextColor
property.titleTextColor
property.titleErrorTextColor
property.titleFontStyle
Objective-c
Property *property = [[Property alloc] init]
property.textColor
property.fontStyle
property.backgroundColor
property.errorFontStyle
property.errorTextColor
property.titleTextColor
property.titleErrorTextColor
property.titleFontStyle
- CardNumberView:
The CardNumberView inheritance from UIView, CardNumberView is used to validate the card number, card brand and card number length.
Swift
@IBOutlet private weak var cardNumberView: CardNumberView!
cardNumberView.property = property
Objective-c
@property (nonatomic, weak) IBOutlet CardNumberView *cardNumberView;
cardNumberView.property = property
- ExpiryDateView:
The ExpiryDateView inheritance from UIView, ExpiryDateView is used to check the expiry date for the credit card.
Swift
@IBOutlet private weak var expiryDateView: ExpiryDateView!
expiryDateView.property = property
Objective-c
@property (nonatomic, weak) IBOutlet ExpiryDateView *expiryDateView;
expiryDateView.property = property
- CVCNumberView
The CVCNumberView inheritance from UIView, CVCNumberView used to check if cvc matches cardBrad.
Swift
@IBOutlet private weak var cvcNumberView: CVCNumberView!
cvcNumberView.property = property
Objective-c
@property (nonatomic, weak) IBOutlet CVCNumberView *cvcNumberView;
cvcNumberView.property = property
- HolderNameView
The HolderNameView inheritance from UIView, HolderNameView is used to fill the card holder name.
Swift
@IBOutlet private weak var holderNameView: HolderNameView!
holderNameView.property = property
Objective-c
@property (nonatomic, weak) IBOutlet holderNameView *holderNameView;
holderNameView.property = property
- ErrorLabel
It will show any error message for owner card view, you can set your custom UILabel, Example:
Swift
@IBOutlet private weak var cardNumberErrorLabel: ErrorLabel!
cardNumberView.errorLabel = cardNumberErrorLabel
Objective-c
@property (nonatomic, weak) IBOutlet ErrorLabel *cardNumberErrorLabel;
cardNumberView.errorLabel = cardNumberErrorLabel
Example of components views in Objective-C and Swift
This is one example of how to customize the component:
Swift
let property = Property()
property.textColor = .yellow
property.backgroundColor = .green
property.errorTextColor = .green
property.titleTextColor = .red
cardNumberView.property = property
Objective-c
Property * property = [[Property alloc] init];
property.textColor = UIColor.yellowColor;
property.backgroundColor = UIColor.greenColor;
property.errorTextColor = UIColor.greenColor;
property.titleTextColor = UIColor.redColor;
cardNumberView.property = property;
PayButton
Used to collect the card data from card components above and to submit successful payment. With a few simple steps it also has the capability to perform Direct Pay without the need for the card component, see the next section.
PayfortPayButton methods
/**
Update Request After doing Setup
- Parameter request: a new request dictionary
*/
public func updateRequest(request: [String: String])
/**
Responsible for Save token or not
- Parameter enabled: a new bool value
*/
public func isRememberEnabled(_ enabled: Bool)
In this section we illustrate how you use the PayButton using sample code for Swift and Objective-C.
Swift
@IBOutlet weak var payButton: PayButton!
let builder = PayComponents(cardNumberView: cardNumberView, expiryDateView: expiryDateView, cvcNumberView: cvcNumberView, holderNameView: holderNameView, rememberMe: saveCardSwitch.isOn)
payButton.setup(with: request, enviroment: enviroment, payComponents: builder, viewController: self) {
// Process started
} success: { (requestDic, responeDic) in
// Process success
} faild: { (requestDic, responeDic, message) in
// Process faild
}
Objective-C
@property (nonatomic, weak) IBOutlet PayButton *payButton;
PayComponents *builder = [[PayComponents alloc] initWithCardNumberView:cardNumberView expiryDateView: expiryDateView cvcNumberView: cvcNumberView, holderNameView: holderNameView rememberMe: saveCardSwitch.on];
[payButton setupWithRequest: request
enviroment: enviroment
payComponents: builder
currentViewController: self
Success:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} Canceled:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} Faild:^(NSDictionary *requestDic, NSDictionary *responeDic, NSString *message) {
}];
The Direct Pay feature enables Amazon Payment Services merchants to securely process e-commerce transactions using tokenized payment card details.
For customers that already supplied their payment card details in a previous transaction and where a card token was generated, customers need to just provide the card_security_code to complete their purchase.
The card token and provided card security code can be sent to the Amazon Payment Services iOS mobile SDK to complete the customer purchase through Direct Pay operation to complete the order placement using eCommerce channel.
Note you can use Direct Pay both with the standard payment UI or with a customized payment UI.
Swift
@IBOutlet weak var directPayButton: PayButton!
// request should has all mandatory params and also you need to send card_security_code, token_name
let request = ["amount" : "1000",
"command" : "AUTHORIZATION",
"currency" : "AED",
"customer_email" : "[email protected]",
"language" : "en",
"card_security_code" : "123",
"token_name" : "payfort",
"merchant_reference" : "merchant reference",
"sdk_token" : "token"]
directPayButton.setup(with: request, enviroment: enviroment, viewController: self) {
// Process started
} success: { (requestDic, responeDic) in
// Process success
} faild: { (requestDic, responeDic, message) in
// Process faild
}
Objective-c
@property (nonatomic, weak) IBOutlet PayButton *directPayButton;
NSMutableDictionary *requestDictionary = [[NSMutableDictionary alloc]init];
[requestDictionary setValue:@"10000" forKey:@"amount"];
[requestDictionary setValue:@"AUTHORIZATION" forKey:@"command"];
[requestDictionary setValue:@"USD" forKey:@"currency"];
[requestDictionary setValue:@"[email protected]" forKey:@"customer_email"];
[requestDictionary setValue:@"en" forKey:@"language"];
[requestDictionary setValue:@"112233682686" forKey:@"merchant_reference"];
[requestDictionary setValue:@"payfort" forKey:@"token_name"];
[requestDictionary setValue:@"123" forKey:@"card_security_code"];
[requestDictionary setValue:@"token" forKey:@"sdk_token"];
[directPayButton setupWithRequest: request
enviroment: enviroment
currentViewController: self
Success:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} Canceled:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} Faild:^(NSDictionary *requestDic, NSDictionary *responeDic, NSString *message) {
}];
While a transaction is processed, we will send a response directly to your direct transaction feedback URL. In theory, direct response feedback cannot be interrupted unless the URL you provided for responses is not functional at the time of the response.
We do this so that your server receives a response even if your customer does not successfully redirect to the return URL on your website, which may happen if your customer's browser or connection fails during the transaction.
There are two ways in which you receive transaction feedback:
Direct transaction feedback. Amazon Payment Services sends an immediate payment processing response whenever a transaction is completed.
You can rely on this response for transaction feedback even where your user closed the browser before getting redirected successfully to the redirection URL or where your user was not redirected due to a drop in the internet connection.
Notification feedback. Were we need to provide you with the status of a transaction once it is received. In other words, we send notification feedback to alert you to any changes in the status of a transaction.
For example, if the transaction was pending due to the unavailability of any party to the transaction, the final update will be pushed to your notification feedback endpoint.
Notification feedback deals with a wide range of scenarios and it is critical that your website is configured to receive notification feedback correctly. For example, transaction feedback can alert you to any transactions that were stuck in "uncertain" status, but which have recovered to final status.
Direct feedback allows you to subscribe to transaction updates for uncertain transactions whenever you process a payment. It is a method for receiving the transaction response automatically once the transaction had completed or if there was an update.
To receive transaction feedback, you must register with Amazon Payment Services the transaction feedback URLs you set up on your server. Follow these steps:
-
Log in to your back-office account.
-
Select the active channel under Integration Settings > Technical Settings.
-
Enter your Direct Transaction Feedback URL and Notification Transaction Feedback URL.
-
Click the "Save Changes" button.
We will send the response via HTTP POST request in POST form format to your webhook URL. The submission type can be changed from POST form to JSON or XML in your APS account settings. We only permit configuring URLs in HTTPS for direct feedback and for notification feedback.
To acknowledge receiving the direct feedback and notification successfully, the webhook URL must return a 2xx or 302 HTTP status. In case the URL returns different HTTP responses, our server will keep retrying up to 10 times until we receive a success response. We wait ten seconds between retries.
You can change and configure the retry mechanism attributes to increase or decrease the number of retries, time between retries and the grace period before we send the notifications.
You must create endpoints that accept direct transaction feedback and notification feedback from us via a webhook. You can customize how transaction feedback works -- for example, by including the grace period before a direct feedback notification is sent, and the time elapsed between retrying feedback submission.
To customize transaction feedback, email [email protected]. You can request to change the submission type to JSON or XML. You can also change the grace period or the time interval between the retries -- please contact us.
[NOTE]: You can check the direct and notification feedback logs in your back office account to check the details related to the submission like the Transaction Feedback URL which was triggered, The response which our system pushed, the response Code and Status retuned from your Transaction Feedback URL.
[NOTE]: The specifics of the data will differ based upon the financial operation that has been processed. Your code must be able to accommodate different data.
Amazon Payment Services offers an API to request validation of the payment card details without performing an actual transaction.
ValidateAPI can help you to initiate an API request in order to validate the input parameters values, this will reduce the possibility of encountered API errors due to wrong user inputs before processing the actual payment card transaction.
Swift
let request = ["amount" : "1000",
"command" : "AUTHORIZATION",
"currency" : "AED",
"customer_email" : "[email protected]",
"language" : "en",
"sdk_token" : "token"]
payFortController.callValidateAPI(with: request) {
// Process started
} success: {
// Process success
} faild: { (requestDic, responeDic, message) in
// Process faild
}
Objective-c
NSMutableDictionary *request = [[NSMutableDictionary alloc]init];
[requestDictionary setValue:@"10000" forKey:@"amount"];
[requestDictionary setValue:@"AUTHORIZATION" forKey:@"command"];
[requestDictionary setValue:@"USD" forKey:@"currency"];
[requestDictionary setValue:@"[email protected]" forKey:@"customer_email"];
[requestDictionary setValue:@"en" forKey:@"language"];
[requestDictionary setValue:@"112233682686" forKey:@"merchant_reference"];
[requestDictionary setValue:@"token" forKey:@"sdk_token"];
[payFortController callValidateAPIWithRequest: request
ShowLoader:^() {
} Success:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} Faild:^(NSDictionary *requestDic, NSDictionary *responeDic, NSString *message) {
}];
[NOTE]: When you make use of the Validate API call you still need to generate a mobile SDK token even though you are not processing a transaction.
In this section we outline the steps you need to take to migrate from version 2.3 of the Amazon Payment Services iOS SDK to the latest release. To complete the migration follow these steps:
-
Remove PayFortSDK.framework and PayFortSDK.bundle
-
Use CocoaPods or manual integration -- by dragging the PayFortSDK.xcframework into your project
-
Import PayFortSDK.xcframework:
Objective-C
The replace import is shown below
//From
#import <PayFortSDK/PayFortSDK>
//To
#import <PayFortSDK/PayFortSDK-Swift.h>
Swift import
If you're using Swift you can import PayFortSDK directly on your controller, there is no need to use Bridging-Header any more
import PayFortSDK
-
Change callPayFortWithRequest method as below:
Objective-C
//From
[payFort callPayFortWithRequest:myRequest currentViewController:self
Success:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} Canceled:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} Faild:^(NSDictionary *requestDic, NSDictionary *responeDic,
}];
//TO
[payFort callPayFortWithRequest:myRequest currentViewController:self
success:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} canceled:^(NSDictionary *requestDic, NSDictionary *responeDic) {
} faild:^(NSDictionary *requestDic, NSDictionary *responeDic,
}];
Swift
Chane the callPayFortWithRequest request param from NSMutableDictionary to Dictionary
- Change callPayFortForApplePayWithRequest method as below:
Objective-C
//From
[payFort callPayFortForApplePayWithRequest:myRequest
applePayPayment:payment
currentViewController:self
Success:^(NSDictionary *requestDic, NSDictionary *responeDic) {
}
Faild:^(NSDictionary *requestDic, NSDictionary *responeDic, NSString *message) {
completion(PKPaymentAuthorizationStatusFailure);
}];
//To
[payFort callPayFortForApplePayWithRequest:myRequest
applePayPayment:payment
currentViewController:self
success:^(NSDictionary *requestDic, NSDictionary *responeDic) {
}
faild:^(NSDictionary *requestDic, NSDictionary *responeDic, NSString *message) {
completion(PKPaymentAuthorizationStatusFailure);
}];
Swift
Change callPayFortForApplePay request param from NSMutableDictionary to Dictionary
- Change callPayFortForApplePay method as below
Objective-C
//From
paycontroller.callPayFortForApplePay(withRequest: ["":""],
applePay: payment,
currentViewController: self) { (requestDic, responeDic) in
} faild: { (requestDic, responeDic, message) in
}
//To
paycontroller.callPayFortForApplePay(withRequest: ["":""],
applePayPayment: payment,
currentViewController: self) { (requestDic, responeDic) in
} faild: { (requestDic, responeDic, message) in
}
Swift
No changes necessary
- Change environment as follows:
Objective-C
From KPayFortEnviromentSandBox to PayFortEnviromentSandBox
From KPayFortEnviromentProduction to PayFortEnviromentProduction
Swift
From KPayFortEnviromentSandBox to .sandbox
From KPayFortEnviromentProduction to **.production
**
- Modify the IsShowResponsePage property:
Objective-C:
From IsShowResponsePage to isShowResponsePage
Swift
No changes needed
- HideLoading property:
Objective-C:
From HideLoading to hideLoading
Swift
No changes needed.
The Amazon Payment Services iOS SDK supports IOS 12.2+ and Xcode 11.0 and above.
You can use both English and Arabic when you implement the iOS SDK.
Currently, portrait is the only orientation supported within the Amazon Payment Services mobile SDK -- unless you build a customized payment integration.
Using the iOS SDK the merchant can process debit or credit card transactions only.
The supported credit card payment options are VISA, MASTERCARD, American Express (AMEX), MADA and MEEZA.