PayPal Sandbox transactions are not showing for seller - testing

I've used my live PayPal account to login to developer.paypal.com where I created 2 new accounts buyer# (personal) and seller# (business). I've implemented a PayPal plugin for a shop (CubeCart + PayPal Standard Payment Gateway plugin https://www.cubecart.com/extensions/payment-gateways/paypal-standard). When I complete an order (sandbox testing) I sign using buyer# email and password and complete the order. I can then click to view account and it shows "payment to", "unclaimed" and the amount I've paid. When I logout of this account and login as my buyer#, I see no transactions. If I log back into developer.paypal.com and go to transactions under "Sandbox" section and select any of the email addresses I see the same statement for all of them "You don't have any transactions".
If I login to sandbox.paypal.com using james-facilitator# account (business) there are no transactions here either.
If I login to sanbox.paypal.com using james-buyer# account (personal) there is only the one initial transaction here for the initial 9,999 funds
I've obviously missed something but I can't think what, I'm not sure how a sandbox account knows who it's seller should be but I've checked both sandbox seller accounts. I find it strange that the buyer account I used has registered the transaction but it seems like it's orphaned as there isn't any other record of it any where else including the developer.paypal.com sandbox transaction. I've tried this several times to see if I could get it working and I've also allowed for 24 hours just in case there was a delay somewhere.
I just want to be able to test transactions before going live.
Any help/advice?
Much appreciated :)
Cheers
James

Solved - silly really now I know but it was simply the email address I used to test the API. I used my main live account and I should have used the fake email address in my API call. Since my live controls the test accounts I assumed that this should have been used.

Related

Handling payments in react-native

So I am building an app with react-native (expo) where a user fixes appointment with some other person and to do so, he has pay the other person.
Now how can I handle payments here. What i want is the user makes the payment and the receiver should be the other person but how much i understood the payment gateways, the payment is received by the app owner or in simple words, receiver is a single person.
I also tried deep linking to directly take the user to some UPI app like google pay or paytm but it seems that those apps require some special type of account (merchant account) to make the transaction if we access them using deep links (which is a problem as it is not necessary that every user will have a merchant account).
As I said, it is always better that you have your own payment gateway account, and all the transaction goes through your gateway, meaning you get the money and you build a system which will forward the payment to the receiver. I have worked on 2 such apps:
1: Where we have our own razorpay account, and we get the payment first, and then we forward it.
2: Where in we were directly having transaction between 2 users, but not through app, instead we display them the account details of the receiver and give them 48hrs time to pay that account. But we had to manually handle this scenario since one cannot know if the user has paid to the said account, since it's not your account.
3: There is one more method where in payment gateway has a webhook which consists of a virtual account number, and every user that lands on your app, you can create a virtual account number for him/her and store the user-virtual account number relationship in your db, whenever there is a payment, you can find out about the user through this virtual account number. Read about this.
The deep link is a good idea, but again, as you mentioned, it will require the end user to be a merchant user(have a merchant account), you can find more details here
Maybe you can ask your users to create a merchant account, which again I am not sure if it's possible, and if it's possible, if it's feasible?
The best way according to me is, you handle this through your payment gateway, and instantly forward it to the user who should have received it. Again there are some rules and clause to it(some commission is taken by those payment gateway,etc), check those things out.
I think the most close answer to my question is to use razorpay routes where we can link multiple accounts with our account and transfer money accordingly.
More details here

PayPal guest checkout not available in certain countries

I'm integrating a react native app with PayPal's REST API and all has gone quite smoothly. However, when I click through, the buyer does not get the option to complete the purchase as a guest. I'm using a v1/payments integration; The transaction works if I login or create an account, but is it possible to let buyers pay without having to login?
I have researched and done most things people say you should do, like having a business account, enable guest payments, etc.
I tried using this github as an approach to using REST API, it works fine but if it helps: https://github.com/tonynguyenit18/paypal-RN-intergration
This isn't a REST API issue. You are getting the expected behavior of the PayPal Checkout in general. Guest checkout is available on a case-by-case basis. Very many factors -- such as the country of the buyer, IP address, repeated payment attempts, and testing payments to one's own account in the live environment -- are used to determine guest eligibility.
When a checkout is not guest-eligible, the buyer can still enter their card details but will also need to choose a password to create an account in the process.
Again, this is just how the PayPal Checkout works in general.
By the way, the v1/payments API is deprecated. You should use 'Create Order' and 'Capture Order', documented here.

PayPal and payment implementation

I am designing a website that accepts payment through simple PayPal or Stripe buttons, but also has a section that pays out users through PayPal. What is the best way to do this?
Current setup: The user builds up coins through an action (NDA won't allow me to discuss in detail) and when their coins reach a certain amount, they can cash out in real $. I have designed this flow: Pay Me Now Button -> Screen with PayPal email address input. Repeat email for typos, then Confirm Button -> Success screen
However, the client would prefer a direct link out to PayPal instead of manual input of email addresses. The reasoning is that they would prefer it being arranged through PP's service to reduce manual errors and typing out. As far as I am aware the only way to get paid is through writing down an email address/phone number. I have researched PayPal.me buttons but it still isn't making sense. Maybe there's another service altogether that I can suggest to the client for paying out users in a no-friction way?
I'm looking at how user testing sites pay people, but not getting very far.
If the money is in your client's PayPal account and they wish to send it to a user's email address (that may or may not have a PayPal account already), this can be automated with PayPal Payouts.
If the user does not have a PayPal account already they will receive an email notification and have 30 days to create an account or add the email to an existing account. If they don't, the payment will be refunded automatically.

Can the PayPal API track inbound payments in real time?

I'm planning to create a web application that allows a user to track donation amounts to their PayPal account that are posting in real time towards a goal.
I need to know...
A. If it's possible
B. If the path I'm using is the best path
c. What is the best path is b isn't.
The flow would work like this.
1) User visits site and enters their PayPal Email address / password / goal donation amount. I'd then be able to make api calls on behalf of this user.
2) I'd use the API call and make a webhook on this users account for when donations come in (The webhooks only say it can fire when sales come in, but maybe donations count as a sale?)
3) I'd have a function on my website ready to accept the post data and update the tracker.
So if the tracker starts out saying 0/300 (user entered 300 for goal amount at the start), then a 15 dollar donation comes in it will update to 15/300, and if another donation for 5 dollars comes in it will say 20/300 etc...
Thanks for any suggestions / help!
Instead of using the user's PayPal email address and password, PayPal has something called a client id and client secret. These work like passwords to make API calls and allot safer than asking for the real email address and password from your user. If you revise your #1, then it is certainly possible to make API calls and receive webhooks just like you described.
Link to PayPal Authentication & Headers: https://developer.paypal.com/docs/api/#authentication--headers
Link to PayPal Notifications for managing webhooks: https://developer.paypal.com/docs/api/#notifications

Paypal express checkout payed more (issue)

Hy guys.
I just implemented the paypal checkout express into my website.
All went good until i had test it live.(without sandbox becouse they didn't send me the confirmation email and i cannot get the api credentials)
- i used my own paypal account.
My question is:
Step 1) call "SetExpressCheckout" with required data.
Step 2) get the tocken and redirect the user to pay 0.01 USD. (all good, user saw $0.01)
Step 3) get the buyer details ..."GetExpressCheckoutDetails" and save them (all good )
here is the big problem:
Step 4) call api: "DoExpressCheckoutPayment" with TOKEN, PAYER_ID ...etc also PAYMENT TOTAL AMOUNT
In this step i added the TOTAL AMOUNT by mistake as $500 - hardcoded , after finalizing the order the $500 were transfered to my account from buyers account instead of $0.01.
How this is possible ??? Why paypal doesn't check the total amount from setExpressCheckout with the total amount from DoExpressCheckoutPayment, becouse the tocken is the same one.
In my opinion this is a major security issue.
That is by design. SetExpressCheckout sets up the payment, but your application won't know (in best practice scenarios) the shipping address of the buyer until after you've called GetExpressCheckoutDetails. At that point you could calculate shipping and sales tax accordingly and add it to the order, display a final review page, and then call DoExpressCheckoutPayment with the final order amount to be charged.
So, yeah, whatever you pass in DECP is what's going to get charged, so you want to make sure that's correct.
As for testing, you just need to create an account at http://developer.paypal.com and then create sandbox accounts within that. You can get the API credentials for sandbox accounts by clicking on the profile of each sandbox account. No need to wait on any confirmation emails or anything. Not sure what you're referring to there, but I definitely recommend testing on the sandbox.