Testing a method to have an app authorize itself when a user purchases it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The app has a built in web browser, and can read the contents of the web pages that the PayPal Buy Now button process causes to be loaded.
When a user completes a purchase, and PayPal goes to the success page, the app sees some of the wording on the page. It looks for words that get displayed only on the "Success" page, and when they are present the app can switch from a demo version to a paid version.
Is there a reliable set of words that can be depended on during this process, or a URL that can be accessed at that time that would report a successful purchase?
Thanks.
- Labels:
-
PayPal HTML Buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This will not work well with PayPal Standard Buy Now (HTML) buttons. Even with Auto-Return enabled, there is no guarantee the user will make it back to your thank you page. If they close the browser before the redirect happens (which will happen often) then they would never make it there and that code would never run.
If you want to try this sort of a solution you will need to use the PayPal APIs to integrate your payments. This way your application will always make it back within your flow before the payment is finalized, ensuring that you can run any code you want at that time.
Keep in mind, though, that you may also need to deal with pending payments like e-checks or payment holds that could sometimes happen. In these cases you wouldn't want to deliver the item(s) until the payment clears, which would happen a few days later.
As such, it's really best to use something IPN or Webhooks to automate post-transaction processing like this. However, that will not allow you to do it based on words on a page like you're wanting.
If you're using IPN / Webhooks, though, you can build logic so that you activate the user only when their payment is indeed completed, so that should work for you I would think..??
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- REST API issues in sandbox in REST APIs
- Payment confirmation comes to a customer in Hebrew in PayPal Payments Standard
- Unable to login with sandbox credentials to Test "Login with Paypal" button. in Sandbox Environment
- Emails after purchase of a Subscription Product in PayPal Payments Standard