How can we process a transaction in Braintree using the credit card details (multiple card details are stored) in the Braintree? Will Braintree create a cardId for each credit card info?
I work at Braintree. If you have any further questions, feel free to contact support.
Each payment method added to the Braintree vault must have a unique token value, that can either be provided as a parameter to the relevant API call that creates the payment method, or automatically generated if such a value is not provided:
https://developers.braintreepayments.com/reference/request/payment-method/create/#token
Related
For our use case, we have an existing form that captures the customer's credit card information. To smooth out the transition from one payment processor to the next since we're not sure when that will happen, we would like to vault the payment method in Braintree without charging the card but keep our existing form.
I see how to vault the nonce that we receive from the Drop-In UI, and I was able to find an answer on SO that described how to pass the payment information directly to Braintree and charging it, however, I have had no luck in finding a way to just pass the card information to braintree for the purposes of vaulting the payment method (with or without the intermediate step of receiving a nonce).
EDIT:
I've discovered the $gateway->customer()->create() and $gateway->creditCard()->create() functions, however, of the various 'unique identifiers' returned from the credit card create call, none of them appear to be vaultable.
It was buried a bit in the documentation, but I was able to do this with an intermediate step:
create customer $gateway->customer()->create(...)
create credit card $gateway->creditCard()->create(...)
take the token from the previous call and pass it to $gateway->paymentMethodNonce()->create(..)
then take the customer id and the newly created nonce and passed them to $gateway->paymentMethod()->create(...)
the necessary vault token was stored in the results object $result->paymentMethod->graphQLId
My client uses the PayPal NVP API for processing both PayPal and credit cards payments. That appears to be deprecated or PayPal is encouraging upgrading to REST. I convinced my client to do the upgrade and while implementing it I noticed the following:
Important: The use of the PayPal REST /payments APIs to accept credit
card payments is restricted. Instead, you can accept credit card
payments with Braintree Direct.
That puts a serious wrench in my work.
A little more searching around and I find this option for accepting credit card payments with the REST API:
Guest payments with a credit card that is stored in the PayPal vault
This would imply to me that the Vault must be used on conjunction with guest payments. Can anyone confirm if that is the case?
It looks like to enable guest checkout payments "PayPal Account Optional" must be turned on which I have confirmed is on in my sandbox account.
The presumption I am now going on is credit card payments with the REST API will work as long as this option is on in the merchant's account, however, I don't find this clearly stated anywhere and I don't want to continue on swapping out APIs for my client if credit card payments via REST won't work now or at some point in the future. I also find it odd I don't find any example API calls in the Payments API using a credit card. I had to figure that one out on my own with a little help from Google.
I appreciate anyone's experience using the REST Payments API to process credit card payments given it's stated that it's "restricted".
Hi i have been using stripe for the first time in my project where i ask user to provide their Credit card details for payment & i generate stripe token and charge the customer. I have provided a checkbox where customer can save the card details for future transactions & the requirement by the client is that if checkbox is checked, the details have to be saved once the payment successfully done. I am only getting the stripeToken in the processing via POST method and not the card details. Is it possible to get the card details back from the stripeToken in programming way or what can be an equivalent & convenient option to do it?
I tried adding the name attribute to the fields required by stripe for the token generation but in the form POST it is coming empty.
Stripe Only provides the Last 4 Digits of the card .
You can save the CustomerId provided by the Stripe API that can be used later for payments,
When the checkbox is checked you can use the token to create a new customer (or update if it already exist ).
Into the link of #vher2 you can find an example to follow.
EDIT:
Inside the token generated from Stripe.js do you have all the information you need. See the Example Response into Api Stripe of token creation.
I wish to implement paypal adaptive chain payment in my website .
Here the buyer uses credit card details for the transaction.
Then the cash is transferred to primary receiver.
then the primary receiver will transfer it to secondary receivers.
The paypal fee must only taken for the primary receiver transaction.
Is this possible with php.?
Yes, it is possible. Basically, you will have to create a new app at apps.paypal.com.
Submit the app for review and get it approved. While applying for the app, you could specify, who is going to pay the PayPal fee. One the APP is approved, you can use the APP-ID provided by them and use the below SDK as sample.
Sample SDK
I want to check that the credit card number provided by customer to my site is valid or not for further transaction. for that i wand to only verify taht the CC no is valid or not by Paypal.
A method for that can be with paypal api
step 1: DoDirectPayment with PAYMENTACTION=Authorization for amt of $1, then
step 2: DoVoid that request
Does any one can tell me
is any amount is charged by paypal for doing tis stuff?
or any other better way you know?
My site is in PHP..
PayPal charges when a transaction is made, not an authorization. If PayPal charged for authorizations then you would have to pay for people who entered their credit card, authorized, but then abandoned the purchase.
This question should be asked at https://www.x.com/docs/DOC-1613
If you are concerned about whether or not the credit card is valid, you can always check it before posting the transaction to PayPal. I have written a CakePHP component for doing just that. This component could very easily be switched to a class and used for credit card validation:
http://github.com/cdburgess/components/blob/master/billing_validation.php
It is very thorough in checking:
what type of card it is (visa, master
card, etc.)
if the card is in fact valid (using
the luhn algorithm)
The advantage of validating the card in your system prior to posting to PayPal is there is no round trip cost. Meaning, you do not have to send a request to the PayPal API to do the validation. Chances are they will do the same validation my billing validation does anyway. It can be done faster right on your server.
Keep in mind, the one thing this class will not catch is credit card fraud. That will require a service. However, typically if there is something funny about the card, paypal will catch it when you are trying to process the funds on purchase.
Happy Coding!
I made it with the help of PAYPAL API's DoVoid Function. I'm making a payment of $1 in Authentication Mode, and if it return success i'm using DoVoid with returned transaction-id.