

The Braintree documentation is really complete and helpful, please take a look. (The entitlements is generated when you toggle capabilities).

Static NSString *const MerchantID = NSString *const MerchantID = then when you init the Apple Pay sheet, you just pass the MerchantID constant and it will grab the right one.Īs well have having two entitlements files, on for each configuration pointing to the right Apple Pay Certificate. You'll probably create a MechantID constant like that: #if CONFIG_RELEASE In your app, you'll need to have (at least) 2 builds configuration, one for Sandbox/Debug, one for Production/Release. In Braintree, you'll link to the Sandbox MechantID in the Braintree Sandbox Dashboard, and to the Prod MerchantID in the Braintree Production Dashboard. Apple Pay will match this behavior, you'll have to generate two MechantID, one for the Sandbox, and then one for Prod. You're probably aware that when you use Braintree, you got a Sandbox environment, and a Production environment. I did implement Pay in a shopping app using Braintree.
