Downloading existing paypal payments with rest api - ruby

I need to download all existing payment information from a paypal account to do some analysis on it, so I set up paypal's ruby rest sdk, which involved creating a new application with its own API keys and whatnot. I can make a successful request with the following:
payment_history = Payment.all( :count => 10 )
However,
payment_history.payments
Is empty.
I'm not sure if this application can only access payments created with it? Can I not get pre-existing payments with the rest api? I would prefer to use ruby, if that's possible, as I would like to keep this all within the simple script I have to analyze similar stripe payments.
Some guidance would be extremely appreciated, as paypal's labrinth of documentation and overlapping APIs have me pretty confused.

You will be able to query only those payments that are made or created with Rest API not the Classic APIs. You can use the Classic Ruby SDKs for the appropriate product to get the Transaction details of the classic APIs

Related

How to get the get API path and parameters of Google play developer API?

I have added a non-renewable subscription for one of my projects. We also started implementing the Google play developer API to get the subscription latest status from the Play Store. For that we have done the below steps as per this blog:
Linked the developer account to a new Google Cloud Project.
Enabled the Google Play Developer API for the Google Cloud Project.
Created a service account and created a key for the service account.
I have below clarifications related to this implementation:
I tried to Grant Access for the following permissions: But the corresponding checkmark is not clickable.
View financial data, orders, and cancellation survey responses
Manage orders and subscriptions
The 3rd step as per the blog is to Authorize an API key, but I didn't get a clear idea of that.
We are going to implement this API on the back end side as a corn job, do we need to generate a JWT token for accessing this API? Is this possible to call without a Token? I found 2 types of implementations from this blog, which one is easy and secure?
"Your application can complete these tasks either by using the Google APIs client library for your language or by directly interacting with the OAuth 2.0 system using HTTP."
From where we get the get API path and other details. I found a similar get API from AppStore like this. Is the play store providing a similar kind of get API?
We need the latest purchase status API and for that what parameters do we need to pass?

Paypal rest api get order details for an order palced with nvp api

I have a Magento2 shop with default checkout module that is placing orders using nvp api. I need to later get the order from paypal and do some action based on its status but from the rest api (
/v2/checkout/orders/{id}) i only get results for orders created with the same rest api, not the ones that are placed during checkout (with nvp api).
I have configured a sandbox account on paypal and the business account that is used for nvp api calls have access to the app created in paypal for rest.
Is this mix of api calls allowed at paypal? Or it might be a problem with the paypal sandbox configuration?
Thanks
You wouldn't use the v2/orders API for this, as orders are only used for creating transactions, not referencing them after the fact.
For later referencing completed transactions you would use the v2/payments API, particularly a 'get' for a completed capture. Here is the documentation.
Whether this works for transactions made with the NVP API is not something I've tested; if not, you would need the NVP GetTransactionDetails.

PayPal integration in Laravel site

I need to implement PayPal payment in my Laravel site. I was going for the server side integration, in order to save all the data, transactions and know what they actually bought. But turns out that [the older] server-side integration method [that I was looking at] is archived, and not really the preferred method anymore. Instead, they suggest using the smart buttons, with front end integration only.
Questions:
Is front end only safe? what prevents the user from messing with the JavaScript and editing the sum with whatever they want?
How do I know what they ordered if it is all front end?
What would I have to do if the payed sum does not correspond to the articles in the cart?
What should I be aware of with this system?
Smart Payment Buttons can be used with or without a server-side component.
Here is the front-end pattern that communicates with a server-side integration: https://developer.paypal.com/demo/checkout/#/pattern/server
Notice the fetches to two '/demo/...' placeholder endpoints, which need to be replaced with actual routes of yours. The first should create a v2/order via API and return the orderID. The second should capture that order after the payer approves it via Smart Payment Buttons.
The answers to your questions re: a serverless (client-side only) pattern are:
Nothing
Only what you program the JavaScript to tell you and which it actually successfully tells you, or what you read via email or in your PayPal account or app notifications
Refund the transaction
It's for people who don't want to do the work of implementing server-side routes and API calls.

Braintree and credit card payment from mobile app

I am working on an app that requires payment to be collected from customers. I have few questions related to braintree integration with my app. I am actually struggling a bit with the workings of the braintree so thought of checking here.
The PCI compliance is critical so i do not want to store anything in my app or the backend server. Can I achieve this with braintree? I also don’t want customer to retype the credit card information when they come back to the app. As I understand there is a Vault functionality which can do this but I was not sure.
Do I invoke the braintree API from iOS app directly or do I need to first send the credit card information to my backend layer and then invoke the Braintree APIs from backend. I don’t want to transmit anything to my server due to the PCI compliance so I am hoping that I can just invoke the braintree API directly from the iOS APP and when user comes back, again invoke the braintree Vault API from the APP and pull the previously used credit card.
appreciate if anyone can pls. direct me to some kind of architecture / white paper/best practice on this. I went thru the APIs document on braintree site which provides and good API documents but i could not find the high level architecture document on this.
Thanks in advance..
Yes. https://articles.braintreepayments.com/control-panel/vault/overview
Yes use from iOS. https://developers.braintreepayments.com/ios+ruby/start/hello-client
for number three... I'm not sure where to find that. Definitely ask support

Is Parse the right choice if your app does not need Facebook integration?

I want to build something similar to a poll service for mobile but it doesn't need Facebook.
After Facebook's acqusition, is Parse.com still a viable option if your web app does not need Facebook integration? Could app developers (customers) log in to my backend without a Facebook account?
Is it possible to build premium features with Parse and then charge for them?
Do you own your data when using Parse.com? I.e., can you export it in case you decide to move to another service in the future?
I am hoping someone with experience can shed some light on this. Thank you!
After Facebook's acqusition, is Parse.com still a viable option if
your web app does not need Facebook integration? Could app developers
(customers) log in to my backend without a Facebook account?
yes,for now.
Is it possible to build premium features with Parse and then charge
for them?
yes
Do you own your data when using Parse.com? I.e., can you export it in
case you decide to move to another service in the future?
yes
I'd suggest you always have a backup plan,when using a BAAS.I pity Stackmob users that didnt.You dont know if parse will still be there in 3 years or their features and pricing will change.Never rely on a BAAS on the long run.
Yes parse has standalone login features with username, and password, in addition to twitter, and facebook. They even handle lost password reset's via email as long as the user has the email field entered. You can check if the user's email has been verified via the emailVerified field.
I'm using stripe.com's payment system via parse's cloud code. I will admit this is not a complete drop in feature for parse yet, but maybe in the future. stripe is made for developers, and I find it to be a very powerful payment system. I can answer some basic stripe/parse questions as I have written myself basically a semi-complete API for handling customers, card, and charges.

Resources