Paypal adaptive payment method for Paypal account verification - paypal

Any one can help for Paypal adaptive payment method for Paypal account verification. When we go to live mode and generate Live APP Id it is showing error:
{
"responseEnvelope": {
"timestamp": "2015-09-18T02:23:23.202-07:00",
"ack": "Failure",
"correlationId": "4321940d358d5",
"build": "18018453"
},
"error": [
{
"errorId": "560022",
"domain": "PLATFORM",
"subdomain": "Application",
"severity": "Error",
"category": "Application",
"message": "The X-PAYPAL-APPLICATION-ID header contains an invalid value",
"parameter": [
"X-PAYPAL-APPLICATION-ID"
]
}
]
}

I have found answer of Paypal adaptive payment and check paypal valid email or not.
When create an App, need to fill complete information of APP and if you want to check only Paypal email exist or not. Deselect 'Chained Payments' within your App Submission.
Paypal can allow you to use GrtVerifiedStatus. However, please ensure to set the 'matchCriteria' parameter to 'NAME' as the permission to use 'NONE' is highly restricted.

Related

How to place an order as guest in eBay Sandbox

Hi I'm trying to place an order on the Sandbox environment as a guest assuming that no Paypal account would be needed to be added for the guest. I'm using the below REST APIs in that order to get this done.
I have a Listing (published offer) with the id 1xxxxxxxxxx4 in sandbox
I called the Order API -> initiateGuestCheckoutSession (Item ID : v1|1xxxxxxxxxx4|0)
I called the Order API -> initiateGuestPayment with below request body
{
"paymentMethodType": "WALLET",
"paymentMethodBrandType": "PAYPAL_CHECKOUT"
}
Got this as part of the response
"providedPaymentInstrument": {
"paymentMethodType": "WALLET",
"paymentInstrumentReference": {
"externalReferenceId": "2QG41254DS871200X"
}
I called Order API -> placeGuestOrder (Session Id : v1|1xxxxxxxxxx4|123365312 )
{ "marketingTerms": [
{"marketingTermsAccepted": false,
"marketingTypes": [ "OFFER", "SURVEY", "PROMOTION" ],
"marketingChannels": [ "EMAIL" ] } ]
}
I'm getting below for response 400 Bad request
{
"errors": [
{
"errorId": 15004,
"domain": "API_ORDER",
"category": "REQUEST",
"message": "If this is a eBay member checkout, this error indicates that the buyer does not have a PayPal account linked to their eBay account. If this is a guest checkout, this indicates that the buyer's credit card information is missing. In both cases, submit the buyer's credit card information."
}
]
}
So I have these questions in mind.
Am I calling the right APIs, in the correct order? or am I missing
something?
How do I add credit card information to this guest buyer?
If I'm to add credit card information to this guest buyer, are there
any TEST Credit cards that could be used for this purpose?
If linking a TEST Paypal to this scenario how should it be done?
To avoid all this can't we set "Cash On Delivery" option for orders?
if so how do you set that?
Thanks in advance, appreciate any help I could get on this matter guys.

Uber API to create Payment method

I have 2 questions:
a. The Uber create payment API says I can only create payment methods of type alipay, baidu_wallet,or braintree_grant. I want to use this API (or any other) to upload a card.... is this possible or will the user need to load the card manually into uber and then use the Payment Method API to choose the correct payment Id?
b. When the user makes a ride request from my app, I want associate the trip with a specific card. How can I do this programmatically? In other words, I am looking for some API in RideParameters which will allow me to choose a payment method upfront.
a) There is no API method available that will create new payment methods or upload cards. As you mentioned in your question "user need to load the card manually into uber and then use the Payment Method API to choose the correct payment Id".
b) You can list all available payment methods by using: "GET /payment-methods" endpoint. In the response, you will get a list of available payment methods. Please use only known types - so if user account has some payment methods that are not recognized by Uber - they will be with type="unknown". Sample response looks like:
`Status-Code: 200 OK`
{
"payment_methods": [
{
"payment_method_id": "5f384f7d-8323-4207-a297-51c571234a8c",
"type": "baidu_wallet",
"description": "***53",
},
{
"payment_method_id": "f33847de-8113-4587-c307-51c2d13a823c",
"type": "alipay",
"description": "ga***#uber.com",
},
{
"payment_method_id": "f43847de-8113-4587-c307-51c2d13a823c",
"type": "visa",
"description": "***23"
},
{
"payment_method_id": "517a6c29-3a2b-45cb-94a3-35d679909a71",
"type": "american_express",
"description": "***05"
},
{
"payment_method_id": "f53847de-8113-4587-c307-51c2d13a823c",
"type": "business_account",
"description": "Late Night Ride"
}
],
"last_used": "f53847de-8113-4587-c307-51c2d13a823c"
}

INVALID_ENCRYPTED_ID when trying to get invoice details

Using the /v1/invoicing/invoices/invoice_id API in the PayPal Sandbox to retrieve invoice information, I am getting the following error no matter which invoice I use:
{
"name": "INVALID_ENCRYPTED_ID",
"message": "Invalid encrypted id",
"information_link": "https://developer.paypal.com/docs/api/invoicing/#errors",
"debug_id": "c64c84ba18ede",
"details": [{
"error_code": "27"
}
]
}
I have tried other APIs such as creating an invoice, sending an invoice, etc and they all work fine with the same credentials.
I can't find any mention of this error anywhere on PayPal or using Google.
Any ideas? Thanks!
The issue was I was using the invoice number, not the invoice ID.

Using PayPal Core SDK with .Net not receiving payments

We are setup to use the REST APIs using the PayPal Core SDK in .Net.
Moving from the SANDBOX to the LIVE environment, we're using the clientID and clientSecret provided in the LIVE tab.
It correctly shows the PayPal account that we expect to receive funds and we also get LIVE transactions shown in the developer console clicking on a transaction we get the transaction details the following is a snippet of a response showing LIVE PayPal URLs.
{
"status": 201,
"duration_time": 403,
"body": {
"links": [
{
"href": "[url]api.paypal.com/v1/payments/payment/PAY-2UM007466X5580429KYMULWY",
"method": "GET",
"rel": "self"
},
{
"href": "[url]www.paypal.com/cgi-bin/webscr?cmd\\u003d_express-checkout\\u0026token\\u003dEC-13U694454H027590M",
"method": "REDIRECT",
"rel": "approval_url"
},
{
"href": "https://api.paypal.com/v1/payments/payment/PAY-2UM007466X5580429KYMULWY/execute",
"method": "POST",
"rel": "execute"
}
],
"payer": {
"payment_method": "paypal"
}
The issue is that funds aren't hitting the LIVE PayPal account and no notifications are being sent to either the payer or payee. How do we determine if funds are being received and if they are, where they are being directed to.
Please note I've put [url] as a placeholder for https:// so that this question can be posted.
The issue has been resolved. The resolution was that the LIVE transactions only represented payment approvals and not payment executions and therefore funds would not have been transferred and no notifications sent.

Does PayPal Rest API have the classic useraction equivalent

Is there a way to skip the 2 step confirmation process using the PayPal REST Api?
I've successfully implemented the standard process using the PayPal REST api, which takes the user to the PayPal site where they enter their credentials and then get presented with the order summary with the option to "continue" With the text - "youre almost done. You will confirm your payment on xxxx store".
Is there a way we can skip this step - so not returning the user to my site where they then again have to review the order and select "make payment", but rather display the "pay now" button at PayPal, which will execute payment?
I've searched, and the classic API seems to handle this by adding the url parameter, useraction commit. If only I could find an equivalent for the REST api.
I had the same problem and I got an answer from the PayPal support.
TL;DR: Just append &useraction=commit to the approval_url.
They told me the REST API redirection URL is a regular Express Checkout redirection URL and therefore you can use the same parameter.
If you do a payment API call like:
curl -v https://api.sandbox.paypal.com/v1/payments/payment
-H "Content-Type:application/json"
-H "Authorization:Bearer ACCESS_TOKEN_HERE"
-d '{
"transactions": [{
"amount": {
"currency":"USD",
"total":"12"
},
"description":"creating a payment"
}],
"payer": {
"payment_method":"paypal"
},
"intent":"sale",
"redirect_urls": {
"cancel_url":"https://devtools-paypal.com/guide/pay_paypal/curl?cancel=true",
"return_url":"https://devtools-paypal.com/guide/pay_paypal/curl?success=true"
}
}'
You will get the following response:
{
"id":"PAY-XYZ",
"create_time":"2015-02-26T15:14:27Z",
"update_time":"2015-02-26T15:14:28Z",
"state":"created",
"intent":"sale",
"payer":{
"payment_method":"paypal",
"payer_info":{
"shipping_address":{
}
}
},
"transactions":[
{
"amount":{
"total":"12.00",
"currency":"USD",
"details":{
"subtotal":"12.00"
}
},
"description":"creating a payment",
"related_resources":[
]
}
],
"links":[
{
"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-XYZ",
"rel":"self",
"method":"GET"
},
{
"href":"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-FOOBAR",
"rel":"approval_url",
"method":"REDIRECT"
},
{
"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-XYZ/execute",
"rel":"execute",
"method":"POST"
}
]
}
In this response you get the approval url
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-FOOBAR
and you just have to programmatically extend it with the parameter &useraction=commit.
So you redirect your user to
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-FOOBAR&useraction=commit
Examples are from the PayPal Developer Tools.
This use case does exist on the REST side of things, but currently only available via the Mobile SDKs. For more details look into https://developer.paypal.com/docs/integration/mobile/make-future-payment/
When users are paying with PayPal in web, redirection to PayPal is still necessary in the REST ecosystem.