PayPal sandbox accounts don't show transactions - php

I'm trying to test my PayPal-Express checkout and it looks like it works fine, but after the redirects there are no transactions in both of the accounts.
I know there is a similar question, but my config has the right credentials.
What I have:
Lumen app
Omnipay extension
sandbox buyer account - status: complete
sandbox shop account - status: complete
The Omnipay lib is configured with the credentials (username, password, signature) of the sandbox shop account
The purchase script looks like this:
$gateway = Omnipay::gateway('paypal');
$response = Omnipay::purchase([
'currency' => 'EUR',
'amount' => '100.00',
'returnUrl' => 'http://localhost:8000/return',
'cancelUrl' => 'http://localhost:8000/cancel',
])->send();
$response->redirect();
It's doing the redirect to PayPal, PayPal accepts then the payment with the buyers sandbox account and redirects me back to the returnUrl but both of the accounts have no balance changes and no transactions visible on their dashboard.

You're using PayPal express checkout to accept payment from your buyers. PayPal express checkout completes the payment in the 2 below steps:
SetExpressCheckout API: It initiates the payment & redirects the buyer to PayPal for approval. To know more, click here
DoExpressCheckoutPayment API: It completes the express Checkout transaction and transfers the amount from the buyer to the Merchant PayPal business account. To know more, click here
To resolve your issue, please check your code & call DoExpressCheckoutPayment API to complete the transaction and deduct the amount from the buyer's account.
If the issue still persists, contact PayPal MTS for better assistance.

Related

Paypal merchant paying facilitator

I have set up a sandbox test case whereby I allow merchants to link and grant express checkout permission to my facilitator account, coupled with a second page where end users can purchase items from the merchants accounts. The problem I am having is that on completion of an express checkout, the facilitator is receiving all the money instead of the merchant. The merchant receives the credit card payment but immediately pays the facilitator the full amount.
Using this guide: https://devtools-paypal.com/guide/expresscheckout/php?interactive=OFF&env=sandbox
I have then created an express checkout on behalf of the merchant account.
Auth details:
'mode' => 'sandbox',
'acct1.UserName' => 'dev-facilitator...',
'acct1.Password' => 'dev-facilitator_pw...',
'acct1.Signature' => 'dev-facilitator...',
'acct1.AppId' => 'APP-80W284485P519543T',
'acct1.accessToken' => $merchant_token,
'acct1.tokenSecret' => $merchant_secret
My code looks very similar to the example, with the assumption that the PaymentDetailsType passed through to DoExpressCheckoutPayment is that same as received from GetExpressCheckoutDetails
Everything appears to be working correctly except that when the users completes the payment the merchants paypal ends up looking like:
Purchase From, dev-facilitator, Completed, Details, -$250 NZD
Transfer From, Credit Card , Completed, Details, $250 NZD
With the final result being:
Dev-facilitator balance: $250 NZD
Dev-merchant balance: $0 NZD
I'm not sure where in the express checkout setup I should be specifying the kind of invoice the merchant should file against the facilitator in relation to the express checkout.
I can provide further code snippets if required.
It appears the core of my problem is the fact that accessToken and tokenSecret are ignored if acct1.Subject is not also supplied (The email associated with the accessToken).
The second thing that caused confusion is that I was not paying attention to what account my buyer action was being performed against... Logging into my merchant account changed the cookies that I was using in the other tab for doing the express checkout. Thus the merchant account ended up being the buyer, and the facilitator the merchant... The Purchase From, Transfer From, was just the way credit card transactions are shown: IE first the credit card gets converted into paypal money and then that is used in the paypal purchase transaction.
Thus,
'mode' => 'sandbox',
'acct1.UserName' => 'dev-facilitator...',
'acct1.Password' => 'dev-facilitator_pw...',
'acct1.Signature' => 'dev-facilitator...',
'acct1.AppId' => 'APP-80W284485P519543T',
'acct1.Subject' => $merchant_email,
'acct1.accessToken' => $merchant_token,
'acct1.tokenSecret' => $merchant_secret
Is what I should have supplied.

How to controll 'Choose a way to pay' in paypal using REST API

I have integrated Paypal transaction for my shopping cart using REST API. When i go to the checkout, in sandbox, for some items it will display two payment methods as
Pay with my PayPal account.
Create a PayPal account.
And for some items it will display two payment methods as
Pay with my PayPal account.
Don't have a PayPal account?.
The currency is EUR.
always I want to display,
Pay with my PayPal account.
Don't have a PayPal account?.
this two options.
how can I do this?
Paypal not only using paypal account for transaction. We can use both debit and credit card transaction. So the customer don't need to create a paypal account. Please visit a transaction page of paypal https://www.paypal.com/in/cgi-bin/webscr?cmd=_flow&SESSION=Wjp0bvX7uO1uPsTRlAuXaIP7uup1VQsTi_CoeDIqrFcDhXsYfGA8V4INxJa&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b08198acc59b45c1b5383c3fbf91319c9514c0

trouble integrating paypal credit card payment

I have setup express checkout on a php custom site for payments. Basically it shows me the classic screen of paypal with the order summary and the "choose a way to pay" options.
How do I detect which one the user has clicked on? Paypal option or "pay with a credit card" option, so that I would either do a DoExpressCheckout or a DoDirectPayment NVP API call?
I've been using the code from here (Saraan's site) to use the token for paypal.
If you are using Express Checkout, regardless if the buyer selects to log in with their PayPal account and make the payment, or select the guest checkout and pay with a credit card on PayPal pages you would still use the DoExpressCheckoutPayment API to complete the payment. You would not need to do the DoDirectPayment API call. This call would be used if you were setting up a payment page directly on your site, and did not want the buyer to leave your site to enter in their credit card information.

Payment without having paypal account from a site where the payment gateway is the paypal

I want to integrate paypal in my site. Visitors will buy products from my site. But my customers may not have paypal a/c.
I want my customers to buy products from my site .
through master card,credit card etc.. who doesn't have paypal account
through paypal a/c who does have paypal a/c
I created paypal "Pay Now" button and used my seller merchant a/c as the value of "business" hidden field. But it redirects to the page where it asks to login into paypal a/c, which means that my customer must have a paypal a/c. But what about those customers who doesn't have paypal a/c?
Please help.
Yes, it redirects to the PayPal page. But there is a section which you can pay using your debit or credit card.
Please go to below link and there you can see that.
Paypal login page
Hope this helps.
Customers without paypal account can easily do a payment that too without going to paypal. YOu have use DoDirectPayment NVP of API.
Check out this link. It is the method which will help you make a payment using dodirectpayment method. Though you will need a seller account on paypal which will receive funds.
https://www.x.com/paypal-apis-dodirectpayment-php-5.3/nvp
Understanding the Method
https://www.x.com/developers/paypal/documentation-tools/api/dodirectpayment-api-operation-nvp
Explaination with code
http://vikku.info/programming/payment-gateway/paypal-pro-direct-payment-NVP-sale-explained.htm
so basically, Just search for DoDirectPayment Method and its related help and you will get the answer as this method does everything.

How or when the amount get deducted or transferred from the buyers paypal account

How or when the amount get deducted or transferred from the buyers paypal account to the shop owner's account via Virtuemart in Joomla 1.5? I created the paypal sandbox test account but doesn't seems to deduct the amount of item(s) I bought?
If there's anything unclear please let me so I can explain further.
Thanking you in advance.
Perhaps VirtueMart changes inventory only when it receives an IPN (instant payment notification) from PayPal about a successful transaction? PayPal has an IPN simulator - try using that. Also, you can login to your test business account and approve the transaction from there - this also sends an IPN back to store.

Categories