Paypal V.zero get shipping info - paypal

I'm trying to obtain the users shipping info from a v.zero check out in php. I have a successful result object returned $result->success = true;
I can get the id like:
$result->transaction->id
But I can't figure out how to get the users shipping info? How is this done with v.zero? thanks

Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
You can use the shippingDetails property of transaction to access the shipping information that was used to process that transaction. For example: $result->transaction->shippingDetails.
From the Braintree documentation:
The shipping address details used to process this transaction. If shipping address was stored in the Vault, then the shippingDetails is a snapshot of the address in the Vault at the time the transaction was created.

Related

Update Paypal subscription to require default shipping address?

Using the Paypal API endpoint as described in the documentation here: Paypal Documentation I want to retroactively require a shipping address for an active subscription. Is there a way to have the API use the default address data of the customer as it would have been used during the checkout? I don't have any address data collected but maybe Paypal provides a solution like shipping_address.default
No. Patch the subcription with the data obtained yourself, or have the customer re-subscribe again. PayPal won't manufacture data for you without a checkout.

paypal reference transactions billing agreement

We require reference transactions via PayPal to bill customers monthly with varying amounts.
e.g. first month is $30, second month may be $35, third month may be $25 etc
So far this seems to be the best approach: https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/
I am using the PayPal recommended SDK from this page: https://developer.paypal.com/docs/classic/api/nvpsoap-sdks/
and using the ExpressCheckout Method. (paypal/merchant-sdk-php installed via composer)
We have a free PayPal business account.
Testing via Sandbox I am able to:
Get a token (SetExpressCheckout) - category->Digital, billingAgreement, Type=Sale
forward customer to sandbox paypal login
Confirm the payment
redirect back to our system (returnUrl)
Process the payment (GetExpressTocket + doExpressCheckout)
Questions:
Does the PayPal business account require any switch/status/upgrade to enable Reference transactions on the live environment?
How do you setup a $0 billing agreement to invoice an amount later in the month? When passing a 0 amount in step 1 above and error is displayed
Item name, amount and quantity are required if item category is
provided, ErrorCode 10003
This contradicts to documentation https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/#setting-up-a-billing-agreement-before-payment which states to set the amount to 0...?
UPDATE: Removing the setting $itemDetails->ItemCategory = 'Digital'; solved the $0 amount issue.
Billing ID is not returned even though I've passed the BillingAgreement data
// Billing agreement details
$billingAgreementDetails = new BillingAgreementDetailsType('MerchantInitiatedBillingSingleAgreement');
$billingAgreementDetails->BillingAgreementDescription = $billingAgreementTxt;
$setECReqDetails->BillingAgreementDetails = array($billingAgreementDetails);
I know there are a few questions within the post but I believe they are all related to the scope of 'Reference Transactions' within PayPal.
I'm looking for recommendations on approach and explanations to the contradictions in documentation. (or if I'm doing something wrong then happy to hear it)
To answer your question:
1) Does the PayPal business account require any switch/status/upgrade to enable Reference transactions on the live environment?
If you are receive an error when calling for Reference Transaction, probably that the setting is turned off in your account. You will need to contact PayPal Business Support team to enable it.
2) Billing ID is not returned.
To setup billing agreement, you will need to pass paymentaction=authorization in SetExpressCheckout request. You will not be able to setup billing agreement if you set the paymentaction as sale.

Store credit card details in Paypal payment

I wanna store card details while using Paypal payment, there is any why in Paypal SDKs which store details of card.
PayPal's REST API calls this a "Vault" and allows you to save the credit card details on PayPal's server so you don't have to save it on your own server. This way you can still process saved cards without any risk of saving it on your own server.
The Classic API (which is what I still prefer) has the same thing except that it's called Reference Transactions. You can run a card verification / $0 authorization, and then in the future you make a call to DoReferenceTransaction to process any amount you need using the card details PayPal has saved on their server.
Either way it's just a matter of building the API requests per the documentation. There are SDKs available to help you with this.
Paypal does not share its users' account details, especially card details to anyone. You have to use the unique account email address to define a user.
It is highly recommended to not save any payment information of users. Only transaction IDs, and perhaps a unique user ID or hash.

Is PayPal REST API still lacking an equivalent of GetExpressCheckoutDetails?

We are doing a new PayPal Express integration for an ecommerce store that needs to retrieve the Billing and Shipping Address information after the user logs into PayPal to authorize the payment, but BEFORE we capture the payment.
We need that information so we can create a user account in our store for them, if one does not already exist for them, and so we can properly calculate the shipping charges for the customer.
The following post over a year ago implied that had not been implemented into the REST API yet. Is that still the case?
PayPal REST API equivalent of GetExpressCheckoutDetails
If it has been implemented, would somebody please point out to me how to access that information? If so, I would greatly appreciate it.
If it has not been implemented, does anyone know when it will be implemented?

Paypal Get Subscription Details

My website is using subscriptions payments and the old programmer did not used ipn, to activate the account he used a custom return url (ya, very stupid).
The issue here, is that old subscription does not have any custom information attached to the ipn (new subscriptions are ok).
Is there a way to find out the return url used in the initial payment?
Thanks
There isn't a way to view this information from the PayPal account. However, the account holder can contact PayPal and have them check the transaction details of one of these old transactions, and they can tell him what the redirect/return URL was for that transaction. If you have any trouble getting this information from customer support, the account hold can also open up a ticket with PayPal MTS at www.paypal.com/mts requesting the information. He would need to use the email address registered on his PayPal account and he would need to provide a transaction id for one of the transactions that the client wants the return URL for. If you have any trouble after that just let me know, send me a PM with the ticket number.