Sie sind auf Seite 1von 43

C HASE M OBILE

P AYMENTS SDK

D EVELOPER S G UIDE
March 2015
Version 1.2.0
Chase Mobile Payments SDK
Version 1.2.0
March 2015
Copyright 2015 Chase Paymentech Solutions, LLC. All rights reserved.
Not for Disclosure outside Chase Paymentech Solutions, L.L.C. or its customers.
This publication is for information purposes only, and its content does not represent a contract in any form.
Furthermore, this publication shall not be deemed to be a warranty of any kind, either express or implied.
Chase Paymentech expressly disclaims, and you expressly waive, any and all warranties, including without
limitation those of merchantability and fitness for a particular purpose. Chase Paymentech reserves the right
to alter product specifications without notice. No part of this publication may be reproduced or transmitted in
any form or by any means, electronic or mechanical, including photocopy, recording, or any information
storage or retrieval system, without Chase Paymentech's permission.
All brand names and product names used in this document are trade names, service marks, or registered
trademarks of their respective owners.

Last Revised: 3/6/2015 12:12 PM


Change Control Log
Revision Date Author Description
1.0.0 09.08.2014 Ent. Product Initial Market Release

1.1.0 10.20.2014 Ent. Product General Updates; Removal of Recurring, Level 2 and Order
Notification Classes.

1.2.0 3.3.2015 Ryan Yoder Added formatPaymentWithRequest


Chase Mobile Payments SDK Developers Guide Table of Contents

Table of Contents
Chapter 1 Overview ...........................................................................................................5
1.1 System Requirements/Environment Setup ................................................................ 6
1.2 Adding the Framework to an App ............................................................................ 6
Chapter 2 Chase Mobile Payments Framework ..............................................................9
2.1 CPSGateway Class ................................................................................................. 9
2.2 CPSAuthorizationRequest Class ............................................................................. 16
2.2.1 CPSAddress Class ........................................................................................... 23
2.2.1.1 CPSBillingAddress Class ............................................................................. 25
2.2.1.2 CPSShippingAddress Class.......................................................................... 26
2.2.2 CPSAudit Class............................................................................................... 28
2.2.3 CPSReceiptRequest Class ................................................................................ 30
2.3 CPSAuthorizationResponse Class ........................................................................... 32
2.3.1 CPSResponseCode Class ................................................................................. 36
2.3.2 CPSEnhancedAuth Class .................................................................................. 38
2.4 CPSDecryptionRequest Class ................................................................................ 40
Appendix A Error Code List ............................................................................................42
A.1 Error Codes ........................................................................................................ 42

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 4 of 43
Chase Mobile Payments SDK Developers Guide

Chapter 1 Overview

The Chase Mobile Payments SDK is used to perform cardholder authenticated credit card
transactions. It assembles payment data received from the hosting Merchant Application and
sends it to the Chase Paymentech Orbital SOAP Service in JSON format.

Data sent to our SOAP service is validated, disassembled, and processed by existing Chase
Paymentech services in order to facilitate authenticated card authorizations, as depicted in the
diagram below.

Data formatted by the handset wallet (iOS Passkit) is passed through the hosting Merchant
Application unchanged when the hosting Merchant Application calls the payment function exposed
by the Chase Mobile Payments SDK. The data is formatted in an encrypted payment bundle.
Using a private and public key infrastructure (PKI), Chase Paymentech is able to authenticate each
incoming request prior to authorization.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 5 of 43
Chase Mobile Payments SDK Developers Guide

1.1 System Requirements/Environment Setup


Following are the minimum requirements to use the Chase Mobile Payments SDK framework.
Development Environment:
1. Mac OS X 10.9.4 or above
2. Xcode 6 or above

Xcode:
1. Xcode Project Build Settings
a. Base SDK : iOS 8.0 or above
b. Deployment Target Settings : iOS 8.0 or above
2. Applications can be developed using Objective-C and Swift using this framework.
3. Simulator/Device OS : iOS 8.0 or above

1.2 Adding the Framework to an App


1. Place the framework library in a folder accessible to your application.
2. Select Project Setting and Build Phase. Click on Link Binary With Libraries section. Then
press + button to add the framework.

3. Click on Add Other and choose ChasePaymentech.framework from the physical location
in step 1.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 6 of 43
Chase Mobile Payments SDK Developers Guide

4. Click Copy Files, ensure Framework is selected in Description drop-down. Click + as


indicated below.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 7 of 43
Chase Mobile Payments SDK Developers Guide

5. Select ChasePaymentech.framework under frameworks.

6. Under Project Navigator, within Frameworks, ChasePaymentech.framework would have


been added.

ChasePaymentech.h is the main header file for the framework.

Objective-C:
#import <ChasePaymentech/ChasePaymentech.h>

Swift:
import ChasePaymentech

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 8 of 43
Chase Mobile Payments SDK Developers Guide

Chapter 2 Chase Mobile Payments Framework

Key Classes
CPSGateway
CPSAuthorizationRequest
CPSAuthorizationResponse
CPSDecryptionRequest

Request Classes
CPSAddress
CPSBillingAddress
CPSShippingAddress
CPSAudit
CPSReceiptRequest

Response Classes
CPSResponseCode
CPSEnhancedAuth

2.1 CPSGateway Class

Inherits from NSObject


Availability Available for iOS 8.0 and later.
Declared in CPSGateway.h

Overview
The CPSGateway class provides methods to execute and authorize a credit card transaction.

The CPSGateway class contains three methods:


authorizePaymentWithRequest
o This is the key method used to perform the transaction and requires no merchant
server side processing. Parameters required by the Gateway must be populated and
validated using the CPSAuthorizationRequest object and this object is used by the
authorizePaymentWithRequest to construct the data in the format required by the
Gateway to complete the transaction. Communication to the Gateway is performed
securely using the HTTPS protocol.
o This method is asynchronous and expects a completionHandler block. The
completionHandler block is passed a CPSAuthorizationResponse object with
CPSGateway response and an NSError. If the CPSAuthorizationResponse object is
nil, then the NSError object with the error code and error message is returned. On a
valid transaction, Gateway responses are translated and will be available as
properties in CPSAuthorizationResponse.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 9 of 43
Chase Mobile Payments SDK Developers Guide

formatPaymentWithRequest
o This method prepares a JSON formatted request to the Gateway and returns it to the
calling application for processing. Use of this method requires the merchant to
perform some server side processing. Merchants may decide to use this method to
exercise more control over transaction processing but will need to pass the JSON
request to the Gateway at the server side. Parameters required by the Gateway must
be populated and validated using the CPSAuthorizationRequest objects validate
method and this object is used by the formatPaymentWithRequest to construct the
data in the format required by the Gateway to complete the transaction
o This method is synchronous and returns a NSData * containing the formatted JSON
request. This NSData * should then be passed to the merchant server side
application for aggregation and posting to the Gateway for authorization.
formatDecryptionRequestWithRequest
o This method prepares an encrypted XML request to be used at the merchants server
side application in order to decrypt an Apple Pay transaction via the Chase
Paymentech Gateways XML interface.
o Clients invoke this synchronous method on the application layer, passing in a
CPSAuthorizationRequest. The method returns data that the application then passes
to the merchant server side for passage to the Gateway. The In-App Debundle
Service Developers Guide details the usage at the server side in the SDK Mode
section.

Note: For development and testing, the test property should be set to YES. When set to YES,
authorizePaymentWithRequest method will send transaction requests to the Gateway Test
environment. This test environment will not relay transactions to the credit card networks and will
simulate responses based on transaction amounts, eg: $5.00 authorizations will always result in an
approval due to the even dollar amount.

Valid Transactions and Responses


The CPSAuthorizationResponse object is returned after a successful transaction request. A
transaction is considered to be successful only if the following conditions are met.
HTTP Status Code
HTTP Status Code is assumed to be 200 for further validation of messages.
procStatus and procStatusMessage
The procStatus property in the CPSAuthorizationReponse should be 0 for a successful
transaction. If the procStatus property is greater than 0, then the procStatusMessage will
have appropriate error message returned by the Gateway.
Valid Transaction
If the respCode property of the CPSAuthorizationResponse is 0, 1, or 2, then the transaction
is considered to be successful. Successful transactions are considered be approved, partially
approved or declined (declined is a valid issuer response).

Error Handling
The framework validates errors by validating the property values set in the
CPSAuthorizationRequest object, network connectivity and HTTP Status Codes returned by the
Gateway Server. Such errors are returned as part the completionHandler set by the
authorizePaymentWithReqeust method.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 10 of 43
Chase Mobile Payments SDK Developers Guide

Validating the CPSAuthorizationRequest


The validate method in CPSAuthorizationRequest object is called to perform the validation,
therefore it is advisable for the host application to call this method to validate the request
values before submitting to the Gateway. See the validate method in the
CPSAuthorizationRequest for more details.
Test for network connectivity
The CPSGateway object validates the availability of internet to reach the Gateway using
HTTPS.
HTTP Status Codes
Only HTTP status codes is returned in NSError object and the error message will be empty
in case of HTTP status. Developers are advised to refer to RFC 2616 for HTTP status
messages.

Tasks

Working with test environment


Test property

Initializing the Instance


- [alloc [init]]

Authorize a Payment
- authorizePaymentWithRequest: request withCompletionHandler:completionHandler

Properties

test

This allows the SDK to point to either the Production or Test environment. This property is set to
True by default.

@property (nonatomic, assign, getter=isTest) BOOL test;

Instance Methods

authorizePaymentWithRequest
This authorizes credit cards by formatting and sending transaction requests to the Gateway. The
completionHandler block returns the CPSAuthorizationResponse and the NSError object.

The purpose of NSError object is to capture all errors before the transaction. Some of the errors
returned are connectivity errors and HTTP errors.

- (void)authorizePaymentWithRequest:(CPSAuthorizationRequest *)request
withCompletionHandler:(CPSAuthorizationCompletionHandler)completionHandler;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 11 of 43
Chase Mobile Payments SDK Developers Guide

Parameters
request
Filled and validated CPSAuthorizationRequest object is passed to perform credit card
authorizations.
completionHandler
Block handling operation completion. The block returns the CPSAuthorizationResponse
object as a parameter. The CPSAuthorizationRequest object contains the Gateway response. If
this object is nil, an error condition is indicated and the application should check the NSError object
for the Error Code and Error Message. The NSError object will be nil if a valid Gateway transaction
occurs. See topics, Valid Transaction and Responses, Error handling.

void (^)(CPSAuthorizationResponse*, NSError*);

Return Value
void

formatDecryptionRequestWithRequest
This prepares a decryption request for credit cards by formatting transaction requests for the
Gateway. The method returns a formatted and encrypted request as an object containing
encrypted and base64 encoded authorization datato be used in merchant server side processing.

- (CPSDecryptionRequest *)formatDecryptionRequestWithRequest:(CPSAuthorizationRequest
*)request error:(NSError * __autoreleasing *)error;

Parameters
request
Filled and validated CPSAuthorizationRequest object is passed to perform credit card
authorizations.

error
A pointer to a pointer containing an error object that's owned by the caller. If the return value is
false, error will contain an NSError object. Otherwise, it will be nil.

Return Value
CPSDecryptionRequest *
An object containing an encrypted and base64 encoded request. This may be passed to the
merchants server side application and then forwarded to the Gateway for decryption over the XML
interface.
Refer to the In-App Debundle Service Developers Guide for details concerning POSTing to the XML
service in SDK Mode.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 12 of 43
Chase Mobile Payments SDK Developers Guide

formatPaymentWithRequest
This prepares an authorization for credit cards by formatting transaction requests for the Gateway.
The method returns a formatted JSON request as a NSData * to be used in merchant server side
processing.

- (NSData *)formatPaymentWithRequest:(CPSAuthorizationRequest *)request error:(NSError *


__autoreleasing *)error;

Parameters
request
Filled and validated CPSAuthorizationRequest object is passed to perform credit card
authorizations.

error
A pointer to a pointer containing an error object that's owned by the caller. If the return value is
false, error will contain an NSError object. Otherwise, it will be nil.

Return Value
NSData *
A formatted JSON request. This may be passed to the merchants server side application and then
forwarded to the Gateway for authorization.
At the server side POST the JSON to the Gateway URLs below. The server will process the request
and return a JSON response. Note that for an authorization only POST to /auth and for an
authorization with sale POST to /authcap

Production URL
https://mobileservices.chasepaymentech.com/gateway/1/order/creditcard/auth
https://mobileservices.chasepaymentech.com/gateway/1/order/creditcard/authcap

Test URL
https://mobileservices-uat.chasepaymentech.com/gateway/1/order/creditcard/auth
https://mobileservices-uat.chasepaymentech.com/gateway/1/order/creditcard/authcap

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 13 of 43
Chase Mobile Payments SDK Developers Guide

Sample JSON Request (Merchant server posts to the Gateway)

{
"discountAmount" : "500",
"billAddress" : {
"city" : "Tampa",
"phone" : "1112223456",
"countryCode" : "11",
"phoneType" : "D",
"state" : "FL",
"address2" : "addressTwo",
"zip" : "33333",
"address1" : "addressOne"
},
"level2" : {
"pcardDestinationZip" : "33624",
"pcardPurchaseOrder" : "123456789"
},
"taxAmount" : "70",
"encryptedPaymentBundle" : {
"header" : {
"publicKeyHash" : "dxCK7GDzZd3JocWOla8OtUeLJ7tf+OHLFAi9heOMb6o=",
"applicationData" : "94ee059335e587e501cc4bf90613e0814f00a7b08bc7c64c2",
"ephemeralPublicKey" : "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE",
"transactionId" : "c1caf5ae72f0039a82bad9dcb60a795"
},
"data" : "f6TlGdkXa3UIuTQe8gahT20vTnT",
"version" : "EC_v1"
},
"orderId" : "2277",
"tipAmount" : "20",
"orderNotifications" : {
"items" : [
{
"name" : "Baseball glove",
"totalAmount" : "0",
"price" : "1999",
"quantity" : "0"
}
],
"taxes" : [
{
"percentage" : "0",
"name" : "FL state sales tax",
"amount" : "140"
}
]
},
"merchantId" : "com.paymentech",
"audit" : {

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 14 of 43
Chase Mobile Payments SDK Developers Guide

"latitudeLongitude" : "1,1",
"softwareID" : "TEST"
},
"comments" : "a comment",
"surchargeAmount" : "1000",
"sendReceipt" : {
"custReceiptPhone" : "813-123-4567",
"custReceiptEmail" : "developer@chasepaymentech.com"
},
"shipAddress" : {
"city" : "Tampa",
"phone" : "9998881234",
"countryCode" : "11",
"phoneType" : "H",
"state" : "FL",
"address2" : "addressTwo",
"zip" : "44444",
"shippingMethod" : "G",
"address1" : "addressOne"
}
}

Sample JSON Response (returned from the Gateway)

{
cardBrand = VI;
enhancedAuth = {
};
hash1 = 3adfe2a59aeede7b3d090c3b2293bb1e07c79e8015da69372c1d3d55078de29b;
hash2 = a46014f1e3a3018d44e5c5eecb80a7027cf8bce743eec713d7d8fe89fbf3778c;
lastFourDPAN = 0839;
orderId = 3932;
responseCode = {
approvalStatus = 0;
authorizationCode = "";
avsRespCode = " ";
hostAvsRespCode = "";
hostResponseCode = 05;
mcRecurringAdvCode = "";
procStatus = 0;
respCode = 05;
respCodeMessage = "Do Not Honor";
visaVbVRespCode = "";
};
txRefNum = 54F60B76A36286AAD26E7F837BF2E3AD9AF65322;
}

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 15 of 43
Chase Mobile Payments SDK Developers Guide

2.2 CPSAuthorizationRequest Class

Inherits from NSObject


Availability Available for iOS 8.0 and later.
Declared in CPSAuthorizationRequest.h

Overview
The CPSAuthorizationRequest class holds all parameters that can be sent to the Gateway using the
CPSGateway object. The CPSAuthorizationRequest class also provides methods to validate all
parameters before submitting it to the CPSGateway object.

Tasks

Creating and Initializing Requests


- initWithPaymentData:

orderId property
merchantId property
discountAmount property
tipAmount property
taxAmount property
surchargeAmount property
comments property
cardIndicators property
partialAuthInd property
audit property
paymentData property
sendReceipt property
shipAddress property
billingAddress property
capture property

Validating Request Values


- validate

Properties

orderId
This is a unique identification value of an order that is generated by the hosting application. For a
single order, there could be one or more transaction reference numbers associated due to partial
approvals.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 16 of 43
Chase Mobile Payments SDK Developers Guide

@property (nonatomic) NSString *orderId;

Minimum Maximum Mandatory / Optional Default Value Example


Length Length
1 character 22 characters Mandatory nil ABCdef123456890

Error Values Description


CPSAuthorizationErrorOrderIdMandatory The orderId property is mandatory. If this
value is not set then this error is returned.
CPSAuthorizationErrorOrderIdOutOfRange This error is returned if the orderId length is
below or above the limit.
CPSAuthorizationErrorOrderIdNotAlphaNumeric This error is returned if there are non-
aplhanumeric characters ([A-Z]|[a-z]) or
numbers [0-9].

merchantId
This is an optional merchant ID which may be used to process a transaction on another merchant
ID setup for transaction processing. The merchantId can be used in a multi-merchant chain setup
and is subject to validation checks at the Gateway.

@property (nonatomic) NSString *merchantId;

Minimum Maximum Mandatory / Optional Default Value Example


Length Length
1 character 12 characters Optional nil 009999

Error Values Description


CPSAuthorizationErrorMerchantIdOutOfRange This error is returned if the merchantId length
is below or above the limit.

discountAmount

This is the discounted amount from the total to be approved.

@property (nonatomic) NSUInteger discountAmount;

Minimum Maximum Mandatory / Optional Default Value Example


Value Value
1 99999999 Optional NSUIntegerMax 12345678

Error Values Description


CPSAuthorizationErrorDiscountOutOfRange This error is returned if the value of
discountAmount is outside of the min and max
range.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 17 of 43
Chase Mobile Payments SDK Developers Guide

tipAmount

The tipAmount is represented in the lowest denomination of its currency. For example, cents is the
lowest denomination for USD. By default the value is initialized to NSUIntegerMax and is
considered optional. See validate method reference for more details.

@property (nonatomic) NSUInteger tipAmount;

Minimum Value Maximum Value Mandatory / Optional Default Value Example


1 9999999 Optional NSUIntegerMax 1234567

Error Values Description


CPSAuthorizationErrorTipAmountOutOfRange This error is returned if the value of tipAmount
is outside of the min and max range.

taxAmount
Order level Tax. The taxAmount is represented in the lowest denomination of its currency. For
example, cents is the lowest denomination for USD. By default the value is initialized to
NSUIntegerMax and is considered optional. See validate method reference for more details.

@property (nonatomic) NSUInteger taxAmount;

Minimum Value Maximum Mandatory / Optional Default Value Example


Value
1 999999999999 Optional NSUIntegerMax 123456789012

Error Values Description


CPSAuthorizationErrorTaxAmountOutOfRange This error is returned if the value of
taxAmount is outside of the min and max
range.

surchargeAmount
The surchargeAmount is represented in the lowest denomination of its currency. For example,
cents is the lowest denomination for USD. By default the value is initialized to NSUIntegerMax and
is considered optional. See validate method reference for more details.

@property (nonatomic) NSUInteger surchargeAmount;

Minimum Value Maximum Value Mandatory / Optional Default Value Example


1 99999999 Optional NSUIntegerMax 12345678

Error Values Description


CPSAuthorizationErrorSurchargeAmountOutOfRange This error is returned if the value of
surchargeAmount is outside of the
min and max range.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 18 of 43
Chase Mobile Payments SDK Developers Guide

Note: The sum of discountAmount, tipAmount, taxAmount and surchargeAmount cannot be greater
than the total transaction amount. This validation will not be performed by the validate method
since the transaction amount is part of the paymentData object. The host application is expected
to perform this validation. The Gateway may return an error if the validation fails.

comments
A short comment associated with the transaction.

@property (nonatomic, copy) NSString *comments;

Minimum Maximum Mandatory / Default Acceptable Example


Length Length Optional Value characters
1 character 64 characters Optional nil A-Z, a-z, 0-9 123456890
-.,$@&\*/

Error Values Description


CPSAuthorizationErrorCommentsLengthOutOfRange This error is returned if length of
comments is below its minimum or
maximum length.
CPSAuthorizationErrorCommentsInvalid This error is returned if unacceptable
characters are present in comments.
Refer to above table for acceptable
characters.

cardIndicators
The cardIndicators returns extra data containing the issuer characteristics of the card
@property (nonatomic) CPSCardIndicatorscardIndicators;

CPSCardIndicators Description
Enumeration

CPSCardIndicatorsNone By default, this value is set during object initialization. This value will
not be sent to Gateway and is considered optional.

CPSCardIndicatorsYes Set this value to get enhanced card data as part of response from the
Gateway.

CPSCardIndicatorsNo Set this value to ignore enhanced card data as part of response from
the Gateway.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 19 of 43
Chase Mobile Payments SDK Developers Guide

The declaration for CPSCardIndicators is available in CPSConstants.h

Error Values Description


CPSAuthorizationErrorCardIndicatorOutOfRange This error is returned if the value of
cardIndicators is other than the
values listed above.

partialAuthInd
The partialAuthIndproperty is used to indicate to the card issuer if the host application can support
logic to perform and manage a partial approval response. In the case of a partial approval,
business logic must be in place in the host application to determine what action should be taken
with the balance owing.

@property (nonatomic) CPSPartialAuthIndpartialAuthInd;

CPSPartialAuthIndEnumeration Description

CPSPartialAuthIndNone By default, this value is set during object initialization. This


value will not be sent to the Gateway and is considered
optional.

CPSPartialAuthIndSupport Set this value to support partial approvals during the


authorization response.

CPSPartialAuthIndNotToSupport Set this value to not support partial approval of the


transaction. If not supported, only full approvals will be
returned. A transaction that could otherwise have been
partially approved will be returned as a decline.

CPSPartialAuthIndOveride If the Gateway merchant profile is set not to partially approve


transactions, use this value to override the Gateway setting.

Declaration for CPSPartialAuthInd is available in CPSConstants.h

Error Values Description


CPSAuthorizationErrorPartialAuthOutOfRange This error is returned if the value of
partialAuthInd is other than the values
listed above.

audit
The audit property is used by the Gateway to validate the authenticity of the transaction for its
approval. Vendor ID and Software ID may be provided as part of the Tampa (PNS) host
certification process. See CPSAudit class reference for more details. Geo-coordinates can be sent
to the gateway as an optional value for validation.

@property (nonatomic, copy) CPSAudit *audit;


CLLocation *loc = [[CLLocation alloc] initWithLatitude:-180.00000 longitude:+180.00000];
audit.location = loc;
req.audit = audit;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 20 of 43
Chase Mobile Payments SDK Developers Guide

paymentData
This is encrypted payment data received from the iOS Passkit. The data received from iOS will be
in JSON format and is set to the paymentData property for the Gateway to parse and use for the
credit card authorization request. This object is mandatory to submit a transaction request and
should be passed in the initWithPaymentData method.

@property (nonatomic, copy) NSData *paymentData;

Error Values Description


CPSAuthorizationErrorPaymentDataMandatory The paymentData property is mandatory.
This error is returned if the value is nil.

sendReceipt
Use this property to send a customer receipt by email or text message. This property is optional.
See the CPSReceiptRequest class reference for more details.

@property (nonatomic, copy) CPSReceiptRequest *sendReceipt;

shipAddress
Shipping address for the order. See CPSShippingAddress class for more details.

@property (nonatomic, copy) CPSShippingAddress *shipAddress;

billingAddress
Billing address of the card used for the transaction. This address can also be used to perform an
address verification request as part of the authorization. Sending the billing zip/postal code may
qualify the transaction for a lower interchange rate.
See CPSBillingAddress class for more details.

@property (nonatomic, copy) CPSBillingAddress *billingAddress;

capture
Set the capture property to YES to indicate that the Gateway should authorize and capture the
transaction amount for settlement. Set this property to NO to indicate an authorization only
request. Authorize only is typically used when future order fulfillment is required.

@property (nonatomic) BOOL capture;

Value
YES The Gateway is expected to perform authorization and capture the transaction amount.
NO The Gateway is expected only to only authorize funds from the cards open-to-buy.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 21 of 43
Chase Mobile Payments SDK Developers Guide

Instance Methods

initWithPaymentData
Initializes request properties with default values. The orderId, audit and paymentData properties
are mandatory for the Gateway to process a transaction.

- (instancetype)initWithPaymentData:(NSData *)paymentData
NS_DESIGNATED_INITIALIZER;

Default values initialized for optional properties:


Property Default Value:
discountAmount 0
tipAmount 0
taxAmount 0
surchargeAmount 0
comments nil
cardIndicators CPSCardIndicatorsNone
partialAuthInd CPSPartialAuthIndNone
sendReceipt nil
shipAddress nil
billingAddress nil
capture YES
merchantId nil

validate
Validates all request properties and returns list of errors in an NSArray containing NSError objects.
If a property does not validate, then the related error code and error message is added as a
NSError object.

Validation of amount properties


The properties discountAmount, tipAmount, taxAmount and surchargeAmount are represented in
the lowest denomination of its currency. For example, cent is the lowest denomination for USD. By
default the value is initialized to NSUIntegerMax and is considered optional.

Validation of optional request properties


All amount fields are set to 0 by default and the validate method considers 0 as optional does not
send to the Gateway. For properties, sendReceipt, shipAddress and billingAddress, the values are
set to nil by default. The validate checks these parameters but will not send them to the Gateway
if nil.

Validation of the audit object


In the audit object, the vendorId and softwareId in combination are optional. If the vendorId is
provided then softwareId should also be sent. By default these two properties are set to nil. Geo-
coordinates can be sent to the gateway as an optional value for validation.

- (NSArray *)validate;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 22 of 43
Chase Mobile Payments SDK Developers Guide

2.2.1 CPSAddress Class

Inherits from NSObject


Availability Available for iOS 8.0 and later.
Declared in CPSAddress.h

Overview
The CPSAddress class has properties to store postal address and phone number. The
CPSBillingAddress and the CPSShippingAddress classes inherit CPSAddress.

Publically Available Properties


name property
addressOne property
addressTwo property
city property
state property
postalCode property
countryCode property
phoneNumber property

name
Name associated with this address.

@property (nonatomic, copy) NSString *name;

addressOne
Frist line of the street address.

@property (nonatomic, copy) NSString *addressOne;

addressTwo
Second line of the street address.

@property (nonatomic, copy) NSString *addressTwo;

city
City name of this address.

@property (nonatomic, copy) NSString *city;

state
Two character state code. Example: NY for New York.

@property (nonatomic, copy) NSString *state;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 23 of 43
Chase Mobile Payments SDK Developers Guide

postalCode
ZIP (for USA) or Postal Code (for Canada) associated with this address. The host application is
expected to validate ZIP/Postal Code for its format.

For USA the zip code can be 5 digits or 9 digits. Examples: 12345 or 12345-6789.
For Canada, the postal code should be 6 characters in letter-number format. Example: Z1Z1Z1

@property (nonatomic, copy) NSString *postalCode;

countryCode
County code associated with this address. US for United States of America, CA for Canada.

@property (nonatomic, copy) NSString *countryCode;

phoneNumber
Phone number associated with this address.

@property (nonatomic, copy) NSString *phoneNumber;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 24 of 43
Chase Mobile Payments SDK Developers Guide

2.2.1.1 CPSBillingAddress Class

Inherits from CPSAddress


Conforms to NSCopying
Availability Available for iOS 8.0 and later.
Declared in CPSBillingAddress.h

Adopted Protocol
NSCopying
copyWithZone:

Publically Available Property


phoneType property

Property

phoneType
Type of phone number.

CPSPhoneTypeEnumeration Description

CPSPhoneTypeNone By default, CPSPhoneTypeNone is set.

CPSPhoneTypeDay Day time phone number.

CPSPhoneTypeHome Home phone number.

CPSPhoneTypeNight Night time phone number.

CPSPhoneTypeWork Work phone number.

@property CPSPhoneType phoneType;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 25 of 43
Chase Mobile Payments SDK Developers Guide

2.2.1.2 CPSShippingAddress Class

Inherits from CPSAddress


Conforms to NSCopying
Availability Available for iOS 8.0 and later.
Declared in CPSShippingAddress.h

Adopted Protocol
NSCopying
copyWithZone:

Publically Available Property


phoneType property
shippingMethod property

Properties

phoneType

Phone type of the phone number provided in phoneNumber property of CPSAddress object.

CPSPhoneType Enumeration Description

CPSPhoneTypeNone By default, CPSPhoneTypeNone is set.

CPSPhoneTypeDay Day time phone number.

CPSPhoneTypeHome Home phone number.

CPSPhoneTypeNight Night phone number.

CPSPhoneTypeWork Work phone number.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 26 of 43
Chase Mobile Payments SDK Developers Guide

shippingMethod

The method in which the order items need to be shipped.

CPSShippingMethod Enumeration Description


CPSShippingMethodNone
By default, CPSShippingMethodNone is set.
CPSShippingMethodLowerCost
Lowest Cost Available
CPSShippingMethodCarrierDesignatedByCustomer
Carrier designated by customer.
CPSShippingMethodElectronicDelivery
Electronic Delivery
CPSShippingMethodGround
Ground Shipping
CPSShippingMethodInternational
International Shipping
CPSShippingMethodMilitary
Shipping to a Military post.
CPSShippingMethodNextDayOrOvernight
Day or Overnight Shipping.
CPSShippingMethodOther
Other type of shipping.
CPSShippingMethodStorePickup
Store Pickup.
CPSShippingMethodSameDay
Same Day Shipping
CPSShippingMethodTwoDayService
Ships in Two days.
CPSShippingMethodThreeDayService
Ships in Three days.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 27 of 43
Chase Mobile Payments SDK Developers Guide

2.2.2 CPSAudit Class

Inherits from NSObject


Conforms to NSCopying
Availability Available for iOS 8.0 and later.
Declared in CPSAudit.h

The CPSAudit class is mandatory for the Gateway to validate the transaction.

Adopted Protocol
NSCopying
copyWithZone:

Tasks

Merchant Specific Information


vendorID property
softwareID property
Location property

Properties

vendorID
Refer to the certification team for details on the vendor Id.

@property (nonatomic, copy) NSString *vendorID;

Length Mandatory / Optional Default Acceptable Example


Value characters
4 vendorID and softwareID in combination are nil Numeric 1234
characters optional. Otherwise, if vendorID is provided then characters
softwareID is expected and vice-versa.

Error Values Description


CPSAuditErrorVendorIdOutOfRange This error is returned if vendorID is not
the expected length.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 28 of 43
Chase Mobile Payments SDK Developers Guide

softwareID
Refer to the certification team for details on software Id.

@property (nonatomic, copy) NSString *softwareID;

Length Mandatory / Optional Default Acceptable Example


Value characters
4 characters vendorID and softwareID in nil Numeric 1234
combination are optional. characters
Otherwise, if vendorID is
provided then softwareID is
expected and vice-versa.

Error Values Description


CPSAuditErrorSoftwareIdOutOfRange This error is returned if softwareID is not the
expected length.

Location
Optionally send the geo-coordinates to have the services validate the location.

@property (nonatomic, copy) CLLocation *location;

Min/Max Mandatory / Optional Default Acceptable Example


Value characters
Min: Location is optional. 1,1 Numeric -79.12345,
-180.00000 characters +65.12345
Max:
+180.00000

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 29 of 43
Chase Mobile Payments SDK Developers Guide

2.2.3 CPSReceiptRequest Class

Inherits from NSObject


Conforms to NSCopying
Availability Available for iOS 8.0 and later.
Declared in CPSGateway.h

Overview

Adopted Protocol
NSCopying
copyWithZone:

Tasks

Merchant Specific Information


customerReceiptEmail property
customerReceiptPhone property

Properties

customerReceiptEmail
Destination email address for an email customer transaction receipt.

@property (nonatomic, copy) NSString *customerReceiptEmail;

Length Mandatory / Optional Default Acceptable Example


Value characters
50 Optional destination email nil Alphanumeric CustomerEmail@Address.com
characters address for a customer email characters
receipt.

Error Values Description


CPSReceiptRequestErrorDescriptionEmailFormatInvalid This error is returned if the
customerReceiptEmail is invalid or not
the expected length.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 30 of 43
Chase Mobile Payments SDK Developers Guide

customerReceiptPhone
Destination phone number for an SMS customer transaction notification.

@property (nonatomic, copy) NSString *customerReceiptPhone;

Length Mandatory / Optional Default Acceptable Example


Value characters
10 Optional destination phone number for a customer nil Alphanumeric 888-
characters SMS transaction notification. characters 555-
1212

Error Values Description


CPSReceiptRequestErrorDescriptionInvalidPhoneNumber This error is returned if the
customerReceiptPhone is invalid or not
the expected length.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 31 of 43
Chase Mobile Payments SDK Developers Guide

2.3 CPSAuthorizationResponse Class

Inherits from NSObject


Availability Available for iOS 8.0 and later.
Declared in CPSAuthorizationRequest.h

Overview
The CPSAuthorizationResponse class holds all response parameters that are received from the
Gateway using the CPSGateway object.

Tasks

Publically Available Properties


txRefNum property

Response Codes and Messages


authorizationCode property
visaVBVRespCode property

procStatus property
procStatusMessage property

approvalStatus property

respCode property
respCodeMessage property

hostResponseCode property
hostResponseCodeMessage property

avsRespCode property
hostAvsRespCode property

remainingBalance property
requestedAmount property
redeemedAmount property
partialAuthOccurred property
approvalStatus property
genericRespCode property
genericRespMessage property
genericRespCode property
tknAssuranceLevel property
enhancedAuth property

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 32 of 43
Chase Mobile Payments SDK Developers Guide

txRefNum
A unique reference number assigned by the Gateway to identify the transaction.

@property (nonatomic, copy) NSString *txRefNum;

remainingBalance
Remaining balance available on the card optionally returned by the card issuer.

@property (nonatomic, copy) NSString *remainingBalance;

requestedAmount
The amount requested from the paymentData for authorization or capture of the transaction.

@property (nonatomic, copy) NSString *requestedAmount;

redeemedAmount
This is the amount taken away from the cards open-to-buy. This should match the requested
amount unless a partial authorization has occurred.

@property (nonatomic, copy) NSString *redeemedAmount;

partialAuthOccurred
This indicates whether or not a partial authorization has occurred.

@property (nonatomic, copy) NSString *partialAuthOccurred;

authorizationCode
This returns the issuer approval code for an authorization request.

@property (nonatomic, copy) NSString *authorizationCode;

visaVBVRespCode
This returns Visas verified by Visa response code.

@property (nonatomic, copy) NSString *visaVbVRespCode;

procStatus
This returns the Gateway processing status code. A value of zero means there were no gateway
errors on the transaction.

@property (nonatomic, copy) NSString *procStatus;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 33 of 43
Chase Mobile Payments SDK Developers Guide

procStatusMessage
This returns the verbose processing status message.

@property (nonatomic, copy) NSString *procStatusMessage;

approvalStatus
This returns the issuer approval status.

@property (nonatomic, copy) NSString *approvalStatus;

respCode
This returns the Gateway response code.

@property (nonatomic, copy) NSString *respCode;

respCodeMessage
This is the verbose Gateway response message.

@property (nonatomic, copy) NSString *respCodeMessage;

hostResonseCode
This returns the host (PNS or Stratus) response code.

@property (nonatomic, copy) NSString *hostResponseCode;

hostResponseCodeMessage
This returns the verbose host (PNS or Stratus) response message.

@property (nonatomic, copy) NSString *hostResponseCodeMessage;

avsRespCode
This returns the gateway address verification response code.

@property (nonatomic, copy) NSString *avsRespCode;

hostAvsRespCode
This returns the host address verification response code.

@property (nonatomic, copy) NSString *hostAvsRespCode;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 34 of 43
Chase Mobile Payments SDK Developers Guide

tknAssuranceLevel

@property (nonatomic, copy) NSString *tknAssuranceLevel;

enhancedAuth

@property (nonatomic, copy) CPSEnhancedAuth *enhancedAuth;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 35 of 43
Chase Mobile Payments SDK Developers Guide

2.3.1 CPSResponseCode Class

Inherits from NSObject


Availability Available for iOS 8.0 and later.
Declared in CPSGateway.h

Overview

Tasks

Publically Available Properties


authorizationCode property
visaVbVRespCode property
procStatus property
procStatusMessage property
approvalStatus property
respCode property
respCodeMessage property
hostRespCode property
avsRespCode property
hostAVSRespCode property
genericRespCode property
genericRespMessage property
tknAssuranceLevel property

Properties

authorizationCode

@property(nonatomic,copy) NSString *authorizationCode;

visaVbVRespCode

@property(nonatomic,copy) NSString *visaVbVRespCode;

procStatus

@property(nonatomic,copy) NSString *procStatus;

procStatusMessage

@property(nonatomic,copy) NSString *procStatusMessage;

approvalStatus

@property(nonatomic,copy) NSString *approvalStatus;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 36 of 43
Chase Mobile Payments SDK Developers Guide

respCode

@property(nonatomic,copy) NSString *respCode;

respCodeMessage

@property(nonatomic,copy) NSString *respCodeMessage;

hostRespCode

@property(nonatomic,copy) NSString *hostRespCode;

avsRespCode

@property(nonatomic,copy) NSString *avsRespCode;

hostAVSRespCode

@property(nonatomic,copy) NSString *hostAVSRespCode;

genericRespCode

@property(nonatomic,copy) NSString *genericRespCode;

genericRespMessage

@property(nonatomic,copy) NSString *genericRespMessage;

tknAssuranceLevel

@property(nonatomic,copy) NSString *tknAssuranceLevel;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 37 of 43
Chase Mobile Payments SDK Developers Guide

2.3.2 CPSEnhancedAuth Class

Inherits from NSObject


Conforms to NSCopying
Availability Available for iOS 8.0 and later.
Declared in CPSGateway.h

Adopted Protocol
NSCopying
copyWithZone:

Tasks

Publically Available Properties


ctiAffluentCard property
ctiCommercialCard property
ctiDurbinExemption property
ctiHealthcareCard property
ctiLevel3Eligible property
ctiPayrollCard property
ctiPrepaidCard property
ctiPINlessDebitCard property
ctiSignatureDebitCard property
ctiIssuingCountry property
ctiDurbinExcemption property

Properties

ctiAffluentCard

Card Indicator: Affluent Category


Affluent cards may have very high pre-set spending limits, if any.
This is returned only for Stratus merchants on applicable transactions.

@property(nonatomic,copy) NSString *ctiAffluentCard;

ctiCommercialCard

@property(nonatomic,copy) NSString *ctiCommercialCard;

ctiDurbinExemption

Card Indicator: Durbin


Returned only for Stratus merchants on applicable transactions.

@property(nonatomic,copy) NSString *ctiDurbinExemption;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 38 of 43
Chase Mobile Payments SDK Developers Guide

ctiHealthcareCard

Card Indicator: Healthcare Card


Returned only for Stratus merchants on applicable transactions.

@property(nonatomic,copy) NSString *ctiHealthcareCard;

ctiLevel3Eligible

@property(nonatomic,copy) NSString *ctiLevel3Eligible;

ctiPayrollCard

Card Indicator: Payroll Card


Returned only for Stratus merchants on applicable transactions.

@property(nonatomic,copy) NSString *ctiPayrollCard;

ctiPrepaidCard

Card Indicator: Prepaid Card


Returned only for Stratus merchants on applicable transactions.
@property(nonatomic,copy) NSString *ctiPrepaidCard;

ctiPINlessDebitCard

Card Indicator: PINless Debit Eligibility


See PINless Debit for more information.
Returned only for Stratus merchants on applicable transactions.

@property(nonatomic,copy) NSString *ctiPINlessDebitCard;

ctiSignatureDebitCard

Card Indicator: Signature Debit Eligibility


Signature Debit refers to processing a debit card as a credit card.
Returned only for Stratus merchants on applicable transactions.

@property(nonatomic,copy) NSString *ctiSignatureDebitCard;

ctiIssuingCountry

Card Indicator: Issuing Country


Used to distinguish a domestic or international customer.
Format: 3 alphanumeric character ISO country code.
Returned only for Stratus merchants on applicable transactions.

@property(nonatomic,copy) NSString *ctiIssuingCountry;

ctiDurbinExcemption

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 39 of 43
Chase Mobile Payments SDK Developers Guide

@property(nonatomic,copy) NSString *ctiDurbinExcemption;

2.4 CPSDecryptionRequest Class

Inherits from NSObject


Availability Available for iOS 8.0 and later.
Declared in CPSDecryptionRequest.h

Overview
The CPSDecryptionRequest class defines the object returned by the CPSGateways
formatDecryptionReq uestWithRequest method. The object contains NSString properties that can
be passed to the merchants server side application tier for passage to the Gateways decryption
service on the XML interface.

Properties

encryptedData property
encryptedKey property
format property
latitudeLongitude property

Properties

encryptedData
This property contains base64 encoded encrypted data.

@property (nonatomic, copy) NSString *encryptedData;

encryptedKey
This is an optional encrypted key and is currently not implemented. However for future
compatibility this value should be passed to the Gateways XML interface as-is.

@property (nonatomic, copy) NSString *encryptedKey;

format

This is the data and encryption type specifier. Pass to the Gateways XML interface as-is.

@property (nonatomic, copy) NSString *format;

latitudeLongitude

The latitudeLongitude property is a pass-through from the CPSAuthorizationRequest and should be


passed to the Gateways XML interface as-is.

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 40 of 43
Chase Mobile Payments SDK Developers Guide

@property (nonatomic, copy) NSString *latitudeLongitude;

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 41 of 43
Chase Mobile Payments SDK Developers Guide

Appendix A Error Code List

A.1 Error Codes

typedefNS_ENUM(NSUInteger, CPSAuthorizationError) {
CPSAuthorizationErrorAuditMandatory,
};

typedefNS_ENUM(NSUInteger, CPSAuditError) {
CPSAuditErrorLatitudeLongitudeMandatory=5014,
CPSAuditErrorLatitudeLongitudeOutOfRange,
CPSAuditErrorInvalidObject
};

typedefNS_ENUM(NSUInteger, CPSReceiptError) {
CPSReceiptErrorNullEmailId=5020,
CPSReceiptErrorEmailFormatInvalid,
CPSReceiptErrorEmailEmailIdOutOfRange,
CPSReceiptErrorNullPhoneNumber,
CPSReceiptErrorInvalidPhoneNumber,
CPSReceiptErrorPhoneNumberOutOfRange,
CPSReceiptErrorInvalidObject
};

typedefNS_ENUM(NSUInteger, CPSShippingAddressError) {
CPSShippingAddressNameOutOfRange=5055,
CPSShippingAddressOneOutOfRange,
CPSShippingAddressTwoOutOfRange,
CPSShippingAddressCityOutOfRange,
CPSShippingAddressStateOutOfRange,
CPSShippingAddressPostalCodeNull,
CPSShippingAddressPostalCodeOutOfRange,
CPSShippingAddressCountryCodeOutOfRange,
CPSShippingAddressInvalidPhoneNumberFormat,
CPSShippingAddressPhoneNumberOutOfRange,
CPSShippingAddressPhoneTypeOutOfRange,
CPSShippingAddressShippingMethodOutOfRange,
CPSShippingAddressErrorInvalidObject
};

typedefNS_ENUM(NSUInteger, CPSBillingAddressError) {
CPSBillingAddressNameOutOfRange=5068,
CPSBillingAddressOneOutOfRange,
CPSBillingAddressTwoOutOfRange,
CPSBillingAddressCityOutOfRange,
CPSBillingAddressStateOutOfRange,
CPSBillingAddressPostalCodeNull,

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 42 of 43
Chase Mobile Payments SDK Developers Guide

CPSBillingAddressPostalCodeOutOfRange,
CPSBillingAddressCountryCodeOutOfRange,
CPSBillingAddressInvalidPhoneNumberFormat,
CPSBillingAddressPhoneNumberOutOfRange,
CPSBillingAddressPhoneTypeOutOfRange,
CPSBillingAddressErrorInvalidObject
};

typedefNS_ENUM(NSUInteger, CPSError) {
CPSErrorValidationFailed,
CPSErrorParserFailed,
CPSErrorSSLFailed,
CPSErrorConnectivityNotAvailable
};

Chase Paymentech Solutions, LLC.


All rights reserved.
Release Date: March 2015 Page 43 of 43

Das könnte Ihnen auch gefallen