Braintree result doesnt contain paymentMethod member - ios

I've integrated Braintree in iOS, paypal and credit card work like a charm. I tried implementing apple pay ( added a merchant id , created an apple pay certificate etc) and can see the apple pay options.
When selecting Apple pay, the braintree result i get back as a response doesnt contain the paymentMethod member and subsequently i cant get a nonce as the nonce is a member of that in turn.
Anyone else stuck here as well? Cant find any documentation on this. The device seems to be able to perform payments.
PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: [PKPaymentNetwork.visa, PKPaymentNetwork.masterCard, PKPaymentNetwork.amex]); //returns true
P.S: Using BTDropInController though it shouldnt make any difference.
P.S.2: This happens both on a simulator and a device

Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
Per the developer docs, this is expected behavior. Selecting Apple Pay as the payment method in the Drop-in UI does not display the Apple Pay sheet or create a nonce – you will still need to do that at the appropriate time in your app. Use BTApplePayClient to tokenize the customer's Apple Pay information. For more information, check out Braintree's Apple Pay Guide.

Related

How to check if a card is default payment card in Apple Wallet?

The problem is on the Apple Wallet's APIs. There's a requirement to check if payment card issue from my application is default or not. If it's not then do something to encourage the user to make it a default one. Now, I can't seem to find such API from Apple Wallet's PassKit
I've tried checking Apple's API Reference, Googling and Asking in Apple's developer forums. No, real solutions so far.
From the API reference, I found this PKPaymentPass.PKPaymentPassActivationState but it only contains activation status, which does not seems to be status of being default payment card. Properties of PKPass seems to be offering no such values, APIs from PKPassLibrary also not.
Is there a way to do this? Or is just impossible?

Get latest Apple pay transactions in Xamarin app

After spending hours in reading documentation about Apple Pay and how to use it with Xamarin Forms I wonder if it is even possible to just simply get the latest transactions done with apple pay.
In the wallet app you have a list with the latest payments via apple pay. My goal is to get the latest payment and some information (amount, location) about this payment.
Is this possible in anyway? Probably someone can give me some hints or useful links. I DO NOT want to create a new transaction!

Linking Apple ID to an multiple account/user on my server

Background:
I am trying to implement In-app purchasing for my iOS app. The app allows the user to be able to log in to multiple accounts and register multiple accounts. Each registration will require the user to pay a subscription fee (unless a free plan is selected). When the registration is complete the account will be linked to the Apple ID that paid for the subscription.
Question:
If already have done a registration with my current Apple ID(Account A) with a $0.99 subscription every month and then do another registration with the same Apple ID(Account B) with a $1.99 subscription every month. Both accounts have purchased a subscription with the same Subscription Groups. In that case will that Apple ID just be paying for the subscription of Account B since it would be considered an upgrade from Account A.
I can make it so that when an account is created with an Apple ID that have been used, we link the new account with that Apple ID and disable the older one. This would however provides a bad user experience and only ever one account will work with one Apple ID and probably isn't the solution I want.
I did try to set the ApplicationUsername for SKPayment object in hopes that it will appear on the other side when the notification API is hit by Apple but it don't seem to use it for that and is used to detect fraudulent activity.
I am trying to find some documentation on handling this case but to no avail. I'm not too sure how to get around this issue and have a feeling that my app's implementation is not aligned with how Apple expects us to implement it. Maybe I have misunderstood some documentation but any insight to this would be greatly appreciated.

Braintree peer-to-peer iOS

I would like to include Paypal as a peer-to-peer options to pay back friends in my iPhone app.
However, when I search online for Paypal iOS, it says that I should use Braintree now.
It's pretty easy to use and include in the application.
But I don't know if and how Braintree handles peer-to-peer.
I suppose it should, since Paypal doesn't approve Adaptive Payments anymore.
Adaptive Payments is now a limited release product. It is restricted
to select partners for approved use cases and should not be used for
new integrations without guidance from PayPal.
So how to include peer-to-peer in my application now?
I came across your question, because I have the same issue. I was on the right track using Adaptive Payments, and then came back to work on it to see that lots of things had changed. Also, both the sender and the receiver have to sign up for PayPal to make peer-to-peer payments.
I switched to using Braintree - here's their iOS setup page.
From my understanding, you just have to manage payments between the two parties. The payer would pay you, and then you would in turn pay the payee.
For example, A --> Your App --> B.
I'm working on the same thing, so when I make some headway, I'll come back here. Otherwise, if this doesn't work, Stripe it is!
Good luck!
After some extensive googling, I managed to find the answer here : setting-payee
You need to add new "payee" object in "transactions" array along with "amount" and "description".

Can I use Apple Pay to create a Stripe Token without charging the user?

I'm making an app where I need to collect user credit card info at some point so I can charge them later. Right now I use stripe and their PTKView to collect credit card info and store it. Then later on when the user wants to pay I'm ready to go and they don't have to do anything else. I would like to add the option for a user to import a card from Apple Pay that I could then use later on. However, it seems to me that when using Apple Pay I have to charge the user right then. I am curious if anyone knows a solution for this problem or if I just have to create a "Pay with Apple Pay" option on the last screen before the user pays. This would not be preferable but currently it looks to be my only choice.
I saw this post, which is unfortunately unanswered. However, question #1 is exactly what I am asking. Any help would be greatly appreciated.
You need to create an Apple Pay payment option that is equivalent to your in-house payment option wherever the user decides how the transaction will be processed. Do note though that creating the token and processing the payment are separated operations, though it's unlikely you'll do one without the other in normal circumstances.
This is true not just for the code but for compliance with Apple's Apple Pay Identity Guidelines: https://developer.apple.com/apple-pay/Apple-Pay-Identity-Guidelines.pdf -- Read the whole thing, but see p11 particularly (in the Dec-2014 version anyway, the discussion of the Apple Pay Payment Mark).

Resources