VisaPurchaseInfo
@interface VisaPurchaseInfo : VInitInfo
The VisaPurchaseInfo
class is used for you to send the Visa Checkout SDK the
detailed information regarding your customers’ purchase.
-
The currency being used to make the purchase. This will be displayed to the user and the
total
amount is expected to be converted to the rate of this currency.Declaration
Objective-C
@property (assign, readwrite, nonatomic) VisaCurrency currency;
Swift
var currency: Currency { get set }
-
Add any custom key/value pairs if needed. Keys can be a maximum of 100 characters and values can be maximum of 500 characters.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSDictionary *_Nullable customData;
Swift
var customData: [AnyHashable : Any]? { get set }
-
A custom description you may use to describe this purchase. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nullable customDescription;
Swift
var customDescription: String? { get set }
-
The amount of a discount on this purchase. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) VisaCurrencyAmount *_Nullable discount;
Swift
var discount: CurrencyAmount? { get set }
-
The gift wrapping charges associated with this purchase. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) VisaCurrencyAmount *_Nullable giftWrapCharges;
Swift
var giftWrapCharges: CurrencyAmount? { get set }
-
Any amount associated with miscellaneous charges for this purchase. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) VisaCurrencyAmount *_Nullable miscellaneousCharges;
Swift
var miscellaneousCharges: CurrencyAmount? { get set }
-
Set the block that fetches the user’s prefill information. Create the prefill dictionary and pass it into the
VisaConfigResponse
block parameter.Declaration
Objective-C
@property (readwrite, strong, nonatomic) VisaConfigRequest _Nullable onPrefillRequest;
Swift
var onPrefillRequest: VisaConfigRequest? { get set }
-
A custom value you may use to identify the purchase. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nullable orderId;
Swift
var orderId: String? { get set }
-
A promotional code entered by the user to make this purchase. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nullable promoCode;
Swift
var promoCode: String? { get set }
-
This value should be set if a successful
VisaCheckoutResult
was received AND you need to modify the purchase by invoking the Visa Checkout SDK again for the same purchase.For instance, if the user successfully completes the Visa Checkout process,
VisaCheckoutResult.callId
will be populated with a string that represents this purchase. If, then, you need to make adjustments to the exact same purchase, you must be sure to set this value to the one obtained fromVisaCheckoutResult.callId
before the user attempts to checkout again.
An example of setting the
referenceCallId
with the value from aVisaCheckoutResult
instanceVisaCheckoutResult* result; result = resultFromCallback; PurchaseInfo* purchaseInfo = [[PurchaseInfo alloc] init...] purchaseInfo.referenceCallId = result.callId
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nullable referenceCallId;
Swift
var referenceCallId: String? { get set }
-
A custom value you may use to identify this Visa Checkout attempt. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nullable requestId;
Swift
var requestId: String? { get set }
-
Indicates to the user if there will be another ‘finalize purchase’ screen once returning to your application. Default is
continue
Declaration
Objective-C
@property (assign, readwrite, nonatomic) VisaReviewAction reviewAction;
Swift
var reviewAction: ReviewAction { get set }
-
Allows setting a custom review and continue message shown as a label below the Continue/Pay button
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nullable reviewMessage;
Swift
var reviewMessage: String? { get set }
-
The shipping and handling charges associated with this purchase. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) VisaCurrencyAmount *_Nullable shippingAndHandlingCharges;
Swift
var shippingAndHandlingCharges: CurrencyAmount? { get set }
-
Determines whether you require a shipping address from your customers. If
true
, the user will be required to provide a valid shipping address in addition to a valid billing address. This should be set totrue
if you intend to send physical items to the user. Default value isfalse
.Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL shippingRequired;
Swift
var shippingRequired: Bool { get set }
-
A custom value you may use to identify this user. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nullable sourceId;
Swift
var sourceId: String? { get set }
-
The subtotal of the purchase. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) VisaCurrencyAmount *_Nullable subtotal;
Swift
var subtotal: CurrencyAmount? { get set }
-
The taxes assessed on this purchase. Informational only.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) VisaCurrencyAmount *_Nullable tax;
Swift
var tax: CurrencyAmount? { get set }
-
Set this to true if 3DS should be active.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL threeDSActive;
Swift
var threeDSActive: Bool { get set }
-
Set this to true if 3DS should not challenge the user.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL threeDSSuppressChallenge;
Swift
var threeDSSuppressChallenge: Bool { get set }
-
The total amount of the purchase being deducted from the user’s credit card account, including any taxes, shipping fees, etc. This is required.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) VisaCurrencyAmount *_Nonnull total;
Swift
var total: CurrencyAmount { get set }
-
A string that specifies the display format for a currency amount associated with the Pay button. If not set here, the default format displays the amount as xxx 999,999,999.99, where xxx is the ISO 4217 standard alpha-3 currency code for the currency being used, suppressing leading zeros ( 0 ) and truncating additional precision in the display; for example, USD 1,000.00. The actual value being displayed remains unchanged.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nullable currencyFormat;
Swift
var currencyFormat: String? { get set }
-
Whether the user data prefill event handler is active for this transaction. You must be enabled by Visa Checkout to use the prefill feature; contact Visa Checkout for more information.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL enableUserDataPrefill;
Swift
var enableUserDataPrefill: Bool { get set }
-
Initialize with an amount and currency.
Declaration
Objective-C
- (instancetype _Nonnull)initWithTotal:(VisaCurrencyAmount *_Nonnull)amount currency:(VisaCurrency)currency;
Swift
init(total amount: CurrencyAmount, currency: Currency)
Parameters
amount
Required to notify the user of the total amount of this purchase.
currency
Required to identify which currency the total amount is being charged.