Search Overlay

Configurer les paiements Apple Pay

Remarque : En tant que partenaire ISV/Paysafe, vous devrez effectuer toutes les étapes « marchand » ci-dessous au nom de l’entité juridique mère des marchands (PMLE) sous laquelle vos marchands exerceront leurs activités.

Pour activer Apple Pay, vous devez mettre à jour les fichiers SDK. Vous trouverez ci-dessous des exemples pour Swift et Objective-C.

La SDK peut être configurée dans les deux sens pour chaque langue.

// Stockez tous les détails du marchand dans le fichier .plist et lisez toutes les informations pertinentes à partir de là
- (PaysafeSDKApplePayMerchantConfiguration *)getPaysafeSDKApplePayMerchantConfigurationFromPlist:(NSString *)plistName {
NSString *path = [[NSBundle mainBundle] pathForResource:plistName ofType:@"plist"];
NSDictionary *myDictionary = [[NSDictionary alloc] initWithContentsOfFile:path];

NSString *countryCode = [myDictionary objectForKey:@"countryCode"];
NSString *currencyCode = [myDictionary objectForKey:@"CurrencyCode"];
NSString *appleMerchantIdentifier = [myDictionary objectForKey:@"merchantIdentifier"];

PaysafeSDKApplePayMerchantConfiguration *result = [[PaysafeSDKApplePayMerchantConfiguration alloc]
initWithApplePayMerchantId:appleMerchantIdentifier
countryCode:countryCode
currencyCode:currencyCode];
return result;
}


PaysafeSDK.applePayMerchantConfiguration = [self getPaysafeSDKApplePayMerchantConfigurationFromPlist:@"PaysafeSDK_ApplePay-Info"];

// Avant/après avoir lu la configuration, vous devez configurer ApplePayService
self.applePayService = [[ApplePayService alloc] init];
PaysafeSDK.applePayMerchantConfiguration = PaysafeSDK.ApplePayMerchantConfiguration(applePayMerchantId: "<Your Generated Merchant Id>",

countryCode: "<Merchant country code>",

currencyCode: "<Merchant currency code>")


// Créez une instance ApplePayService une seule fois
private lazy var applePayService = {
return ApplePayService()
}()

La SDK Paysafe doit avoir applePayMerchantConfiguration et ApplePayService définis pour fonctionner correctement.

Sur cette page