Paypal buy now button places payment on review - paypal

I am using paypal buy now button to accept payments. But after the payment is made by someone it is held under review. I want to be able to accept payment automatically. I have already tried using paymentaction variable and getting error
"Unknown pmtaction value"
Please help.

paymentaction can be of three
paymentaction = sale
paymentaction = authorization
paymentaction = order
Make sure you are using the correct parameter. For instance if you use "paymentaction=authorisation" you will get this error. Use "paymentaction =authorization".

Related

We get paypal error 10423 with no clue what is wrong

We are a big webshop provider, and we have thousands of webshops in our system.
We have a case where we get an error in DoExpressCheckout with PaymentAction of Authorization here is the error
Ack: FAILURE
Build: 000000
Version: 117.0
Timestamp: 2017-04-06T08:54:36Z
CorrelationID: 4d6d16d1d30fa
ErrorCode: 10423
SeverityCode: ERROR
ShortMessage: Transaction refused because of an invalid argument. See additional error messages for details.
LongMessage: This transaction cannot be completed with PaymentAction of Authorization.
We have no clue what is wrong. Because it happens for specific paypal account of a specific customer.
We have two shops / one of a customer of us. Where we get the error. We made another shop in our system where we connected a paypal verified business account and then with another real personal account we bought an item from that shop and it all works. No errors.
We tried to the the same for this problematic customer and we get the error. We are sure that the code we use is the same in both cases and there is no difference in our handling. So the question is what could be wrong on the other paypal business account?
Could it be an SDK problem?
Did you even try to google it? I googled 'paypal 10423' and found:
Issue PayPal returned API error code 10423 - This transaction cannot be completed with PaymentAction of Authorization. Cause You set PaymentAction to "Sale" with SetExpressCheckout at the first API call.
Not sure if this article may help you:
https://www.paypal-knowledge.com/infocenter/index?page=content&expand=true&locale=en_US&id=FAQ1015
Apparently its because your setting the payment action to sale on a SetExpressCheckout then switching to Authorization. Paypal doesn't allow this and advises to set the PaymentAction to Authorization with the SetExpressCheckout then swap to Sale when setting the DoExpressCheckout call.
This is how we post the request to SetExpressCheckout:
SetExpressCheckoutRequestDetailsType req = new SetExpressCheckoutRequestDetailsType();
.....
PaymentDetailsType paymentDetails = new PaymentDetailsType();
paymentDetails.PaymentAction = PaymentActionCodeType.AUTHORIZATION;
paymentDetails.ShipToAddress = ....
req.PaymentDetails.Add(paymentDetails);
So we are 100% sure we use Authorize, and we do the same for DoCheckout, so it seems like PayPal is thinking we did Sale as PaymentAction why is that?

Am I allowed to fire DoExpressCheckoutPayment automatically for PayPal Express Checkout?

My client wants us to automatically return the user to PayPal during the Express Checkout process, effectively clicking the "confirm and pay" button at the review stage if the transaction price has not changed during the process.
I can do this, but I am wondering if it is against the PayPal terms of service as it seems to me that this could be used to trick the user into paying more than they are expecting.
I have searched on the PayPal site and had a Google, but found nothing saying it is against their terms. Does anyone else do this or know whether it's acceptable practise?
You mean that you want to change the amount in the DO Express API call against the amount that you specified in SET EXPRESS API call . Yes you can change the amount in the Do Express API call because most of the time Merchant needs the shipping address information from the buyer's PayPal account. And once they get the shipping address via the Get Express Checkout API call ,shipping fee is added to the authorized amount and then DO Express API is called .
That is just fine yes, and for those instances you should set useraction=commit in your redirect URL to PayPal. This will make the button on the PayPal review page say "Pay" instead of "Continue" so the user knows that is the final review. Then back on your site you can make the call to DECP and simply display the final receipt / thank you page when that's done.

Paypal Chained Payment - Pay Key & IPN

I recently converted from basic Paypal payments to Chained Payments...and I have a few questions if you guys would be so kind to help out.
First, when I setup a PayRequest, I also create an order record in the database. Previously with my basic Paypal implementation, I passed that OrderId in the custom field as part of the form post to Paypal. I would then get that OrderId back in the IPN handler and use it to mark the order as paid or whatever based on the response from Paypal IPN.
Now I am wondering what is a good unique value for my locally created order? Should I use the paykey to look up the order on the IPN callback? Or should I just set the trackingId property of the PayRequest to be the order id and pick up in the IPN callback Request object?
Secondly, there is a returnUrl and ipnNotificationUrl for the PayRequest. Should the returnUrl process the IPN callback or does the ipnNotificationUrl only should do that?
The reason why I ask is because the return url must be able to show the buyer the status of their payment and the transaction info, the same data that I get in the IPN callback.
Thanks for the input guys, once I get these two minor details ironed out, I'll be good to go!
I would add your record ID into the tracking ID parameter of the Pay request like you mentioned. That way you'll get it back in your IPN similar to what you're doing with the custom parameter now.
The IPN notification URL is what you want to set in order to trigger IPNs for the Pay request. You do not want to use the same URL for return because then the script would actually run twice.

Check if paypal email address is a verified user

I would like to check if a paypal user who tries to buy something from my site has a verified account before he makes purchase.
Once the user isn't verified, any payment he/she makes would fail. Funds will be returned back to user automatically.
Is there any code I can add or edit to make this work due to fraud issues.
Well I found this
https://www.paypal.com/us/verified/pal=emailhere
where if i replace emailhere with any email i get verified or unverified.
I would like to add this to the code.
Thanks
If you're not already, I would recommend using the Express Checkout API. This will allow you to check the payer status prior to finalizing the payment.
The SetExpressCheckout API would generate your token that you use to redirect the user to PayPal with. They would then sign in, review the order, and click continue which would send them back to your site.
At that point, you can call GetExpressCheckoutDetails to obtain all the buyer details including their verified status.
To finalize the whole thing you would call DoExpressCheckoutPayment. In cases where the payer is not verified, though, you could simply stop the flow and leave this call out. No payment will have taken place so no refund would be necessary. You can simply display a message that they need to verify their account prior to making purchases from you.
If you happen to be working with PHP I would recommend taking a look at my class library for PayPal. It makes all of this very simple for you.

How can I ensure a PayPal payment bounces back to my website to immediately credit a user?

Well I am working on a site that basically accepts PayPal payments to give their accounts a premium status, don't need to get into exact details of what it does but what I am trying to accomplish is to have a "Pay Now with PayPal" button that will accept the payment then bounce them back to my site with some kind of verification code so I can say "Okay, paid let me run this code to set your account to premium"
Any idea how I can do this? I can specify a success URL but it requires a user to click a button saying "Return to *" after they pay and even that gives them a scary warning message.
https://www.paypal.com/ipn