How to instantly know if payment was successful using recurring payments? - paypal-subscriptions

I am implementing recurring payments on a website through SetExpressCheckout and CreateRecurringPaymentsProfile.
Since it's being used for giving a user access to the member's area, I would need to know right away if the initial purchase was successful. Right now, CreateRecurringPaymentsProfile always returns 'Success' and profile status of 'Active' or 'Pending', and only through the IPN will I be able to know if the first transaction was successful or not. So the mechanism seems to be asynchronous (as opposed to Paypal's single transaction system).
Is there any way to know right away (synchronously) if the first payment is successful so that the website can let the member know if he/she has access to the member's area or do we have to tell the user that his/her access is pending verification or something like that?

Related

How to set up per-seat subscription with Stripe?

Good day!
I am trying build a per-seat subscription model for my web site.
Before, I tried use Checkout session to provide "place", to write personal data, but the max what I reached - is creating default Subscription that you could cancel for instance.
What I wanna do?
• Figure out, if possible, how to create per-seat subscription through Checkout session and after, on event "User joined" automatically replace new price of the subscription.
• If through Checkout session that is not possible, how to implement it through code?
How to get a user's card and how to upgrade later the subscription.
I read the article on Stripe, but from that I can't figure how I get client data as card.
In addition, I use Stripe Extension on firebase with cloud functions.
Hope, this problem will be solved :)
You can create a per-seat type subscription with Stripe Checkout. For that, you need to have a recurring price, just as the article suggests. Then pass the price into line_items property when creating a subscription, along with the initial quantity. For example, a customer might want to purchase 5 seats/licenses right away. You can also enable adjustable_quantity setting to allow the user to change the quantity on the Checkout Session page.
When a new user joins, use the Update Subscription API to change the quantity of the item. For example, if the new total number of users you are serving is 11, set the quantity of the price to 11. More info here.
If you don’t want to use Stripe Checkout, you can create a subscription via API, by following this guide. The upgrade step looks the same as in the other solution.
Besides that, Stripe has a Billing Customer Portal that allows users to modify their subscriptions, it’s worth taking a look.

Is there any API for checking a Status of a given Order with Realex Payments?

I am wanting to integrate Realex for my upcoming E-Commerce website. Imagine a scenario as mentioned below:
Customer came to the site, added the products to the Cart and moved ahead to payments.
Now, Customer entered his details on the payment page, and clicked
on the “Pay Now” button.
Imagine below given possible issues (Bad transactions) which might
occur and I am trying to overcome the same:
A. The request was processed successfully by Realex, and while redirecting to my Server URL there was a Network glitch due to which the Redirection failed.
B. The request was processed successfully by Realex, and as it was redirecting there was an Issue with my Server side (let’s suppose some Code related issue).
Now, in the both above mentioned scenarios I need to understand, if there is any way wherein I can check the given Order’s status without manually doing so?
i.e. Is there any Status check API which can provide me the status of the Order, i.e. if it was processed successfully and I might go ahead with the Order or either go ahead for the Refund to the given Customer?

Check if payment received paypal?

I am making a website where people will buy things. What I am wondering is if there is a way to check if payment was received in paypal, and then execute some code. Or should I add a paypal widget where when payment is done then it executes some code? This is all being done in HTML and CSS being it is a website.
Take a look at Instant Payment Notification (IPN). Any time a transaction hits your PayPal account their server will POST the transaction data to a URL you specify. Your script receives the data, verifies it with PayPal to ensure it actually came from them, and then you can process that data however you need to.
This gives you the ability to update your own database, send out your own email notifications, hit 3rd party web services, or anything else you want to automate when transactions hit your account. This works for payments, refunds, disputes, etc. so you can automate lots of tasks. It happens in real-time, too.

User is not allowed to perform this action

Our platform is trying to create a feature so that a seller can refund a paypal transaction after 60 days. To do this our thought was that we would use the adaptive payment feature and simply ask paypal to send money from seller to buyer.
We created an application, and in the sandbox we have everything working. When we move to production we get this response below.
{"errorId":"550001","domain":"PLATFORM","subdomain":"Application","severity":"Error","category":"Application","message":"User is not allowed to perform this action"}]}
The question is, "How does the seller authorize our platform?" Do they need to check a box in their Paypal account?
What's a bit confusing to us, is that we are testing with our own 'seller' account which is of course a valid Paypal account.
Furthermore, we are doing a simple implicit approval. We did notice that in our application registration we are 'conditionally excepted'. We read that simple payments should work fine, it is only the chained payments that require specific approval from paypal.

Find the user's first time login in asp.net membership

I am trying to findout the user's first time login using asp.net membership (mysql) and depending on that I'm displaying some agreements page.
The procedure I follow is:
When a user registers a mail will be sent which is for confirming the email Id.
until this point the user is not authenticated.
After clicking the link provided in email Id, the user's authentication is done by user id present in query string.
Now the user needs to login by credentials. At this point user gets authenticated and I want to show him a legal agreements page with a check box in it.
Solution I tried:
I supposed the last login time will be 0/0/0000 00:00:00 AM but in vain.
It would be great if anyone could suggest me a solution for this.
I also encountered the same problem. the only solution that struck my mind was to check whether LastLoginDate = CreateDate or not. If this criteria is true it means that the user is trying to log in for the first time.
But be careful that you must check it before log-in procedure. (but I should say the I use Ms Sql)
You can also check the number of users haven't logged-in yet.
select LastLoginDate from aspnet_Membership where LastLoginDate = CreateDate order by LastLoginDate ASC