How to display transactions in ‘developer.paypal.com’ - paypal

I wrote my PayPal payments app using REST API SDK for PHP from GitHub.
In ‘developer.paypal.com’ there is a button labeled "Create App", I gave an application name which was immediately approved, and from the created App I’m using in my code the “Client ID” and “Secret”.
The code seems to work correctly, and from ‘developer.paypal.com’ I can ‘Enter Sandbox site’ to view transactions of my ‘Sandbox test accounts’.
My problem is that in ‘developer.paypal.com’ the link ‘Transactions’ doesn't display transactions.
Sandbox => Transactions, direct me to (page title): Test REST API transactions
Live => Transactions, direct me to (page title): Live REST API transactions and responses
In both cases above, instead of getting transactions, I get a page with a link to “Create your first PayPal app and receive API credentials.”
How to display and get detail transactions on ‘developer.paypal.com’?

Probably a good idea to try logging out and logging back in. Sometimes, the cache might be causing this to happen. Let me know if that resolves the issue.

Related

How to move PayPal Checkout to live production?

I've set up a PayPal Checkout button with my sandbox account, which works, and now I want to change it to use my live business account. There seems to be conflicting information out there on what to do next:
The docs say that I need to submit my app for approval (but it doesn't say how)
This stack question says that with PayPal Checkout you don't need to submit your app for approval
In paypal.php (I'm using laravel) there is a parameter called PAYPAL_LIVE_APP_ID, which I didn't need with the sandbox and I've been trying to find. This stack question from 2016 tries to find the app id but all links provided there are broken. Do I need the app id for PayPal Checkout?
I don't know what I'm doing wrong but when I set the PAYPAL_MODE in .env from sandbox to live, the PayPal button in my app stops working and shows:
Uncaught Error: INVALID_RESOURCE_ID
at https://www.sandbox.paypal.com/smart/buttons?style.layout=vertical&style.color=gold&style.shape=rect&style.tagline=false&style.height=45&style.menuPlacement=below&sdkVersion=5.0.332&components.0=buttons&locale.country=GB&locale.lang=en&sdkMeta=eyJ1cmwiOiJodHRwczovL3d3dy5wYXlwYWwuY29tL3Nkay9qcz9jbGllbnQtaWQ9QVNWTnlaeTZ0TkdYTnJ4aFhzSXdGLUhKckN4U1NZb1VHVlozd3NqNXVRN3FmMGp4RFAtLXBmTHlUcjUxUnNGVzh0bXFtcnNtYlB4N0VBUWYmZGlzYWJsZS1mdW5kaW5nPWNhcmQsZ2lyb3BheSxzZXBhLHNvZm9ydCZjdXJyZW5jeT1FVVIiLCJhdHRycyI6eyJkYXRhLXVpZCI6InVpZF93cXN2eHlzd3lwcmp6YWdpc21haWduaGlxZXdyZmkifX0&clientID=ASVNyZy6tNGXNrxhXsIwF-HJrCxSSYoUGVZ3wsj5uQ7qf0jxDP--pfLyTr51RsFW8tmqmrsmbPx7EAQf&sdkCorrelationID=f374804ab30b1&storageID=uid_9a4b452c76_mdc6mdi6mjm&sessionID=uid_7aec7bdf11_mdk6nda6nde&buttonSessionID=uid_79a5ce6aa1_mdk6nda6nde&env=sandbox&buttonSize=medium&fundingEligibility=eyJwYXlwYWwiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sInBheWxhdGVyIjp7ImVsaWdpYmxlIjpmYWxzZSwicHJvZHVjdHMiOnsicGF5SW4zIjp7ImVsaWdpYmxlIjpmYWxzZSwidmFyaWFudCI6bnVsbH0sInBheUluNCI6eyJlbGlnaWJsZSI6ZmFsc2UsInZhcmlhbnQiOm51bGx9LCJwYXlsYXRlciI6eyJlbGlnaWJsZSI6ZmFsc2UsInZhcmlhbnQiOm51bGx9fX0sImNhcmQiOnsiZWxpZ2libGUiOmZhbHNlLCJicmFuZGVkIjp0cnVlLCJpbnN0YWxsbWVudHMiOmZhbHNlLCJ2ZW5kb3JzIjp7InZpc2EiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sIm1hc3RlcmNhcmQiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sImFtZXgiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sImRpc2NvdmVyIjp7ImVsaWdpYmxlIjpmYWxzZSwidmF1bHRhYmxlIjp0cnVlfSwiaGlwZXIiOnsiZWxpZ2libGUiOmZhbHNlLCJ2YXVsdGFibGUiOmZhbHNlfSwiZWxvIjp7ImVsaWdpYmxlIjpmYW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UR&intent=capture&commit=true&vault=false&disableFunding.0=card&disableFunding.1=giropay&disableFunding.2=sepa&disableFunding.3=sofort&renderedButtons.0=paypal&debug=false&applePaySupport=false&supportsPopups=true&supportedNativeBrowser=true&experience=&allowBillingPayments=true:1320:46529
at n.dispatch (https://www.sandbox.paypal.com/smart/buttons?style.layout=vertical&style.color=gold&style.shape=rect&style.tagline=false&style.height=45&style.menuPlacement=below&sdkVersion=5.0.332&components.0=buttons&locale.country=GB&locale.lang=en&sdkMeta=eyJ1cmwiOiJodHRwczovL3d3dy5wYXlwYWwuY29tL3Nkay9qcz9jbGllbnQtaWQ9QVNWTnlaeTZ0TkdYTnJ4aFhzSXdGLUhKckN4U1NZb1VHVlozd3NqNXVRN3FmMGp4RFAtLXBmTHlUcjUxUnNGVzh0bXFtcnNtYlB4N0VBUWYmZGlzYWJsZS1mdW5kaW5nPWNhcmQsZ2lyb3BheSxzZXBhLHNvZm9ydCZjdXJyZW5jeT1FVVIiLCJhdHRycyI6eyJkYXRhLXVpZCI6InVpZF93cXN2eHlzd3lwcmp6YWdpc21haWduaGlxZXdyZmkifX0&clientID=ASVNyZy6tNGXNrxhXsIwF-HJrCxSSYoUGVZ3wsj5uQ7qf0jxDP--pfLyTr51RsFW8tmqmrsmbPx7EAQf&sdkCorrelationID=f374804ab30b1&storageID=uid_9a4b452c76_mdc6mdi6mjm&sessionID=uid_7aec7bdf11_mdk6nda6nde&buttonSessionID=uid_79a5ce6aa1_mdk6nda6nde&env=sandbox&buttonSize=medium&fundingEligibility=eyJwYXlwYWwiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sInBheWxhdGVyIjp7ImVsaWdpYmxlIjpmYWxzZSwicHJvZHVjdHMiOnsicGF5SW4zIjp7ImVsaWdpYmxlIjpmYWxzZSwidmFyaWFudCI6bnVsbH0sInBheUluNCI6eyJlbGlnaWJsZSI6ZmFsc2UsInZhcmlhbnQiOm51bGx9LCJwYXlsYXRlciI6eyJlbGlnaWJsZSI6ZmFsc2UsInZhcmlhbnQiOm51bGx9fX0sImNhcmQiOnsiZWxpZ2libGUiOmZhbHNlLCJicmFuZGVkIjp0cnVlLCJpbnN0YWxsbWVudHMiOmZhbHNlLCJ2ZW5kb3JzIjp7InZpc2EiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sIm1hc3RlcmNhcmQiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sImFtZXgiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sImRpc2NvdmVyIjp7ImVsaWdpYmxlIjpmYWxzZSwidmF1bHRhYmxlIjp0cnVlfSwiaGlwZXIiOnsiZWxpZ2libGUiOmZhbHNlLCJ2YXVsdGFibGUiOmZhbHNlfSwiZWxvIjp7ImVsaWdpYmxlIjpmYWxzZSwidmF1bHRhYmxlIjp0cnVlfSwiamNiIjp7ImVsaWdpYmxlIjpmYWxzZSwidmF1bHRhYmxlIjp0cnVlfX0sImd1ZXN0RW5hYmxlZCI6ZmFsc2V9LCJ2ZW5tbyI6eyJlbGlnaWJsZSI6ZmFsc2V9LCJpdGF1Ijp7ImVsaWdpYmxlIjpmYWxzZX0sImNyZWRpdCI6eyJlbGlnaWJsZSI6ZmFsc2V9LCJhcHBsZXBheSI6eyJlbGlnaWJsZSI6ZmFsc2V9LCJzZXBhIjp7ImVsaWdpYmxlIjpmYWxzZX0sImlkZWFsIjp7ImVsaWdpYmxlIjpmYWxzZX0sImJhbmNvbnRhY3QiOnsiZWxpZ2libGUiOmZhbHNlfSwiZ2lyb3BheSI6eyJlbGlnaWJsZSI6ZmFsc2V9LCJlcHMi
and:
GET https://b.sbox.stats.paypal.com/v2/counter.cgi?p=uid_7aec7bdf11_mdk6nda6nde&s=SMART_PAYMENT_BUTTONS net::ERR_ADDRESS_UNREACHABLE
The information on that doc page is out of date. An "app id" is only used by Adaptive Payments integrations, which are obsolete and cannot be used for new integrations anyway.
For REST applications, a live "client id" and "secret" can be created in the dashboard My Apps & Credentials. They do not require any additional approval/registration unless you are using partner (multi-party) or log in with PayPal features.
The error "INVALID_RESOURCE_ID" is usually caused by mixing things from sandbox and live. Ensure that:
The <script> element with src https://www.paypal.com/sdk/js?client-id= specifies a live client ID, not a sandbox/test one.
Any fetch calls the button code might make (if using a server integration pattern) retrieve a newly-created and valid live order ID or classic API EC token, not a sandbox one. The browser dev tools "Network" tab is useful for debugging and verifying such an XHR is working.
Any plan_id (if using a Subscription button) was created with the corresponding live client ID .. not a different client ID nor a sandbox one.

Why are my PayPal Checkout buttons not opening a link to the PayPal Sandbox?

I am trying for the first time to implement a PayPal Checkout solution (aka PayPal Commerce Platform for Business) in an ASP.NET Web Application, using Web Forms. I've set up a new REST API for the Sandbox and followed PayPal's Set up server-side SDK guidance to install the SDK in my .NET project. PayPal's button demo now lets me log into the Sandbox with a newly created Sandbox user name and make a test payment, which is confirmed as being successful. So far, so good.
My next step was to create a PayPalButton.aspx page containing exactly the same code as used on Paypal's button demo page. All my updated code was then uploaded to my live site. That's when I hit a problem, as the PayPal buttons don't work on my live site (the PayPal log in window just briefly flashes and then disappears). Being a total newbie to the Paypal Checkout process, it's highly likely that I have made some very basic error.
The only thing I can think of is that my problem might have something to do with the section in Set up server-side SDK that refers to modifying HTTP request headers? I didn't understand what that section was asking me to do.
What routes/paths did you implement the create order and capture order functions at? What data do they return? Update your question with this information. For the create order route, is the data a valid JSON object with a PayPal order ID in the id key?
Have you set the paths in your "PayPalButton.aspx" HTML/JS code to call the aforementioned routes? Your question does not include any specific information about what is going on, i.e. your button code and the result (Response body) of the fetch calls from the browser's developer tools 'Network' tab.
This morning, I managed to resolve the problem with my PayPalButton.aspx page just briefly flashing the PayPal login page. As previously mentioned, it contains a script copied from PayPal's button demo. I then realised that it was different from the sample script provided on the Integrate Checkout page.
I created a new PayPalButton2.aspx page containing this alternative script and, unlike PayPalButton.aspx, it worked fine. In both cases, I had substituted my own Sandbox ClientID.

Payments in our game stopped working, "object does not exist"

Our in-game transactions suddenly stopped working properly in one of our games. When a player tries to buy something, they are charged, but then an unknown error occurs and the player is not provided the items they tried to purchase.
Here is the screenshot: https://i.gyazo.com/e7beb162e9e94c9dd50008f1e0b6b78c.png
According to our investigation, the object ID coming to our payment callback cannot be found, even through the Graph API explorer.
Here's an example:
Our server receives the following data from payment callback:
{"object":"payments","entry":[{"id":"1005703272873733","time":1479471429,"changed_fields":["actions"]}]}
We then send a request:
https://graph.facebook.com/PAYMENT_ID?access_token=APP_ACCESS_TOKEN
and receive an error message. The same error occurs in Graph API Explorer
The app name is Butterfly Miracle
App ID is 1186246188099014
This is a critical issue that cripples the game.
EDIT: The problem is still unresolved. We keep getting failed payments from the players. This is clearly a problem with Facebook servers that handle payment information. We need an answer from Facebook staff.
There are not any hidden ways for payment validating.
Facebook works with two alternative ways of validation:
when you user clicks on "Buy" button - FB.ui({"method": "pay" ... should be fired and your callback will receive data about current payment
in same time the Backend will receive request with payment data from Facebook Payment Service.
That error lies in how your Facebook app and server are configured.
You should check this:
If you are using Dynamic Pricing - check URL in Canvas Payments chapter and be sure your backend is sending correct response.
Check what Facebook knows about your product URL here: https://developers.facebook.com/tools/debug/ Sometimes facebook cache OLD product response - you can try to force cache clean by clicking Scrape again button. BTW: resolve all warnings here.
Canvas Payments chapter in FB app settings page should be configured correctly - try to click Test Callback Url - response should be OK
Try to make test payments and analyze client and backend logs. First of all catch client (js) response from FB.ui({"method": "pay"... and check it. Then analyze access_logs of the Backend (I don't know what are you using: it can be php-fpm, apache, nodejs, etc) - be sure the Backend correctly receives Payment Request from Facebook Payment Service and correctly process it - response status codes should be 200.
Just review again FB app_id and FB secret you typed in the Backend configuration. They should be equal to FB app settings.
If nothing helps - try to debug step-by-step requests that you are receiving from Facebook on test payments.

PayPal REST API - Redirect Error Handling

My question is simple yet I can't find any SO posts or PayPal documentation to answer it.
In the event of a PayPal user having some error being redirected after completing their checkout (internet goes out, browser crashes, they close their browser before the redirect goes through, random networking issues, etc.) How are we suppose to handle that?
I thought using the following REST API
GET /v1/payments/payment/<Payment-Id>
Would solve my problem but since the state returned from this request does not change from created to approved until the funds have been executed it is useless. In the case of having some redirect error you will not have been able to execute the funds and thus it will simply be in the created state still which does not help you.
Additionally I thought maybe PayPals IPN system used for CLASSIC API would be the answer to my problem but again it fails. The IPN system does not contain relevant information such as transaction ID which is needed to link the two systems together.
Is there no way to do automated error handling using the REST API?

Paypal review page customization with rest api in php

How can i do this:
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECCustomizing/
In rest api, especially when dealing with recurring payments,when my summary is empty?
Unfortunately, there is no way to display the details of the plan on the order summary page at this time. We have raised the issue internally in Paypal, and got an issue created here https://github.com/paypal/PayPal-PHP-SDK/issues/149. We will be updating the issue on github, for any changes.
However, you can still provide some description as shown here: https://github.com/paypal/PayPal-PHP-SDK/blob/master/sample/billing/CreateBillingAgreementWithCreditCard.php#L58