Is it possible to use the Paypal In-Context Checkout feature in place without success or cancel redirection? - paypal

I was reading today the Paypal Express Checkout w/ In-Context Checkout Docs and the feature looks promising in the scenario that you need to perform a purchase in place without page reload or redirection to another page, but the truth is that you still have to declare a returnurl and cancelurl in order to make it work.
Unless I am missing something, this takes the user to the same problem it tries to solve, leave the current page. An undesired outcome for the real-time web-apps. Is there a way to get some sort of call back without redirecting to another page? or this is not possible yet?

Related

PayPal - Redirect to checkout page from server side instead of smart button

I'm relatively new to payment integrations.
I'm just wondering if, it is possible for me to redirect customers to PayPal's checkout page by returning a url for the checkout page from the backend, instead of using PayPal's Smart button?
Tbh, I am having a hard time looking at their documentations. So please bear with me.
It can be possible, but it is an old integration pattern. For current web checkouts, pairing the smart button with a server-side integration is a superior UX in every respect. Here's the code to use for the approval flow: https://developer.paypal.com/demo/checkout/#/pattern/server
This way you never have to redirect away to another (possibly unfamiliar) site and back; your site stays loaded contextually in the background at every moment. Also it has an incline "Debit or Credit Card" button you can include as desired.

What is PayPal API for when accepting payments in my website thru a button? Do I need to use API?

I'm in the process of developing a feature to accept payments in my website, and I already did it using a paypal button and IPN (a PHP listener to process data to a DB once the payment is completed, this one actually https://github.com/paypal/ipn-code-samples/blob/master/paypal_ipn.php, properly customized).
I never touched PayPal API and I wonder if I am missing something... I'm kind of new to this kind of development and I want to be sure I'm doing it right and not missing any obvious thing which might compromise the security of the payment or whatever... I already tested things in Sandbox and everything works as expected, but I am concerned about the API and I see many people using it...
So, am I missing anything?
Thanks!
What you've done is accurate and will work just fine so long as it's suiting your needs.
One potential security risk would be if you are not using a hosted button. Did you choose to "Save this button at PayPal" when you created the button? If so, you should see a hosted_button_id included in the HTML for the button. In this case it's protected.
If the button code includes individual parameters for things like item_name, amount, etc. then that code could be adjusted by people in their browser and then the button could be submitted with different pricing, for example.
You could check for this sort of thing in your IPN script and setup an automatic refund if the price doesn't match your database, but I generally try to avoid that sort of thing.
I prefer using the Express Checkout API instead. If you were comfortable getting IPN working with PHP then you should be plenty comfortable using this PayPal PHP SDK to integrate Express Checkout.
The three calls you'll need to work with are SetExpressCheckout, GetExpressCheckoutDetails, and DoExpressCheckoutPayment.
This documentation will cover the general steps and where those calls come into play, and that library will make each of those calls very simple for you.
Express Checkout will eliminate any potential adjustments users could make to code (because they won't be able get to the code at all unlike HTML) and it also has more advanced features and options that PayPal Standard does not have. Most importantly, the ability to force the "guest checkout" experience so that non-PayPal account holders can easily checkout using a credit card without any confusion.
They can do it with PayPal Standard, too, but depending on cookies set in their browser it may make the guest checkout option tough to find. Express Checkout makes it very prominent at all times, and generally results in increased checkout conversion rates.

How to remove “paypal/express/review” step

Can you please provide solution or any module to remove extra layer of review with paypal express checkout method
we are using Magento 1.7.0.0 Version.
Thanks
Chetan
I don't know the best way to accomplish this with Magento in particular, but it is an open source cart so you could conceivably implement the necessary modifications:
Append "&useraction=commit" when redirecting the customer to PayPal. This will change the button verbiage on PayPal.com from "Continue" to "Pay Now". It is a cosmetic-only change, it will not make any functional changes.
The corresponding functional change is to have your server immediately execute the API call DoExpressCheckoutPayment when the customer returns, skipping the review step and directly displaying the result.

How To Use The New PayPal Checkout Page?

I'm currently using PayPal Express Checkout.
Here's a screenshot of the checkout page I want people taken to:
http://i.stack.imgur.com/wz0UC.png
For some reason users are taken to the older looking checkout page. I can't seem to find any documentation anywhere that let's you choose to specific for this template to be used instead of the older one.
Does anyone know if there's a variable in their API or perhaps a URL parameter that can be set to force all users to this page?
There is no way to force to use the new layout of PayPal Checkout. It has been rolled out gradually and partially deployed, and it is random. Something like A/B Testing. You can refer to this similar question.

PayPal buy now button - force auto return (without setting via account)

I'm trying to setup a market place where users and buy and sell goods as quickly and simply as possible.
So far I've been able to just dynamically insert the seller's PayPal email into the button and it pays them. Unfortunately though I'm unable to redirect back to my site after this (even when setting the return value for the button) from what I understand this is because the Auto Return value needs to be set via each seller's PayPal backend, however I don't want to have to rely on them doing that.
Is there any way around this? If not, what's the next easiest way to set a system like this up? Extra points for linking to a good tutorial since PayPal's docs can be hard to navigate.
I am confirming payment in our system based on data getting redirect to my site (I know it's a bit risky without IPN but it'll work for now).
The return URL would work properly even without auto return on. However, the buyer has to first click Return to XXX to get directed to the auto return page. You can change the return text by setting the variable cbt
There are a few ways around this, but it will require you to either move away from Website Payments Standard and towards Express Checkout, or use IPN.
The only other option I can see is giving them a tutorial when setting their account up in your system that has them enable auto return.
Though, without IPN or EC someone could close the browser or tab and you would never have a confirmation.