Add email to PayPal's DoDirectPayment request - paypal

I'm using the PayPal PHP SDK to do a DoDirectPayment request and the example code and the class documentation doesn't explain how to add an email address to the request. Is that possible somehow?
Thanks!

The email address can be supplied using the Payer property on PayerInfoType as explained here.

Related

Prefill customer email via Stripe Payment Link URL

I'm testing out Stripe's new Payment Links in a project, and I'm trying to prefill a user's email address in the email field of the checkout form. I tried appending the payment link URL with the "email" data attribute, which doesn't work, the data isn't passed on:
https://buy.stripe.com/14k...fYZ?email=johnsmith#gmail.com
I know Stripe's client-side checkout solution does allow for this, but I'm trying to just use the Payment Link, since it's so much simpler. Any help would be greatly appreciated, thanks!
Update: it looks like this is now possible using URL parameters including ?prefilled_email. See documentation
Stripe Payment Links do not support pre-filling the customer's email.
However, if you're comfortable writing some code, you can use the Stripe API to create a Checkout Session with a pre-filled email. Once you create the session you can send your customer to the url provided in the Checkout Session object.
You can't pass query string params to Stripe payment links but there is a workaround using PriceBlocs payment links which are built on top of Stripe Checkout.
You can pass params for the following Stripe Checkout params:
customer
customer_email
email (alias for customer_email)
client_reference_id
Heres a working demo link with an email param appended. When checkout starts, you'll see the Stripe checkout email field is pre-filled.
https://priceblocs.com/test/links/1owa3UYo-2hKvRIXJEu79?email=someone#email.com
And then they'll get forwarded into the Stripe checkout session call.
That way you'll get the result you want without having to write any backend code.
Docs for payment links are here.
API docs are here.
And there's a link builder playground here.

Validate PayPal Client id

I have been trying to validate Paypal client id but I didn't landed to any solution from Paypal documentation and also from other sources.
Anyone please help me if there is any API to validate Paypal's Client id.
You may want to look at PayPal Adaptive Accounts API. You can use GetVerifiedStatus API Operation to determine whether the specified PayPal account's status is verified or unverified.

PayPal IPN Adding your own data onto IPN message

I have integrated PayPal into my website and have the IPN system working successfully. The problem I have now is that unless the PayPal email is the same as the one they used to register on my site, I have no idea who the person is.
I would like to add on my own data to the IPN message such as AccountID=10 or AccountName="SomeName" so that I can identify who the person is for my own user base since it is selling of virtual goods and privileges and not shipping to some address. Can this be done?
You certainly can send many parameters such as invoice parameter with your Paypal IPN request and get it returned with IPN response.
Full parameters list is available here:
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/
You could also make this a non-issue by setting it up so your customers use their PayPal login credentials to log into your site. Have a look at the following documentation:
https://developer.paypal.com/webapps/developer/docs/integration/direct/identity/log-in-with-paypal/

Paypal REST api and configuring direct payment page

With the paypal NVP api, we were able to set some options for the generated paypal checkout page using SetExpressCheckout. Is there a way to do the following with the new REST api?
NOSHIPPING to tell paypal that I don't need a shipping address.
LOCALECODE to set the gateway in the user's language.
HDRIMG to change the title of the page to a logo.
EMAIL to pre-populate the email in the gateway. NOTE: I've tried using $payerInfo->setEmail() but apparently this method is only for credit_card and not paypal requests.
SOLUTIONTYPE to set the billing info by default.
LANDINGPAGE to set the landing page.
I cannot find it in the paypal developer REST api docs.
Unfortunately not at this time. We are trying to implement a better mechanism to configure the payment experience than overloading the API calls. Until then please use the classic ExpressCheckout API if these are something that you really need.

obtain verified paypal email Id of merchant

I have integrated paypal with my ios application and wants my transaction to complete only if merchant has a verified paypal email id. Please help me to solve this problem . Thanks in advance.
A Get Verified Status API provided by Paypal Adaptive Accounts.
On PHP you should have to integrate SDK "adaptiveaccounts-sdk-php-namespace-php" then using API call you can verified Paypal ID.
I suugest you use this parameter: payer_status=verified for IPN or PayerStatus= Verified for Express Checkout. According to PayPal this means the following:
The payer’s PayPal account status. A value of Verified means that the
customer has confirmed ownership of a bank account or has verified his
account status through other means.
After lot of search,I found my answer ,there is "GetVerifiedStatus" api provided by paypal which is used to check whether user is having correct paypal email address .I have solved it using the link below:
https://www.x.com/developers/paypal/documentation-tools/api/getverifiedstatus-api-operation