Paypal Token Expired - paypal

How can i detect that Express Checkout token has expired, if a user simple closes the paypal page, also he is not redirected back to my return(cancel) page.
Are ther sending some sort of IPN message ?

No IPN message is sent if the user does not complete che purchase.
Why check if the token is expired? Paypal already does it.
If you want to check if the transaction occurs rely on the IPN messages and/or on the result of the doExpressCheckout.

Related

PayPal Billing Agreement Token

Currently my flow is
User clicks PayPal Button
User gets redirected to PayPal approval URL
User gets redirected back to my website with a Token
I make a call to my server with the returned Token to execute the payment.
Now if user tries to refresh the page, token is passed again to my backend and subscription is processed again with same token.
Is there anyway to avoid this? Is the flow correct?

Instant notification for Master Card Payment gateway MiGS

I'm currently integrating our system with MiGS, I received all documentation and example code from Bank,
My issue is that they don't seem to be implementing IPN the same way PayPal does, they only request for a return URL to which the user is redirected after payment, however this URL cannot be used as an IPN listener on our side, simply because if the user closes the browser before being redirected, then our system will Never be notified of the payment,
Any help of how IPN is handled in MiGS?
Ok I just got answer from the bank that MiGS don't support IPN,so if the user closes the browser before being redirected back to our return URL, we can alternatively run Query DR , which would Query the status of the payment

How can I revoke a token using PayPal API

I have a website with two payment processors:
The other processor have an API call to invalidate a token, so if the user still didn't submit his payment info and I revoked his pending payment token -> he'll get an error.
There's a scenario where a (crazy) user can pay using both payment gateways:
1. The user starts a request to paypal
2. The user starts a request to other processor
3. He completes the payment with other processor
4. He then completes the payment with paypal
As I can see it, only revoking the paypal token can solve this condition.
If so - does anyone know how to do it programmatically?
Note: Any situation where two transactions are completed successfully is unacceptable (so refund/cancel and similar is not a solution)
I'm assuming you're using the (popular) express checkout API, and that the situation you're describing is AFTER you've issued a SetExpressCheckout but BEFORE you issued the DoExpressCheckoutPayment.
In that case, as you already redirected the shopper to the PayPal site, it's out of your hands and there's no API to revoke the token. However, there's a simple solution to your case. Even if the shopper approved the transaction at PayPal, you can still ignore the redirect and NOT issue a DoExpressCheckoutPayment request. In this case, the captured funds from his account (which you never got), will be returned to him 3 hours after the initial SetExpressCheckout was issues.
Don't forget to issue a proper notification to the user.

Sandbox renewal of subscription

I am making subscription in the sandbox pay-pal and i just want to know how you guys do for the renew of subscription...example if the customers subscription is expired how can i let him renew his/her subscription do i need to create another button for the subscription just to renew his/her subscription?just what i did in his/her first subscription...and how do i reset the date so that his ending date of subscription will be lesser so that i can test to renew the subscription in the sandbox pay-pal.
Or how do i redirect my customers to my sandbox test(business) site if they're subscriptions are expired.what should i do?...please let me know how to do this.
just like in there first subscription they redirected to my sandbox test site and they can see how much they would pay...
I appreciated much more reply.
Thank you.
If you're using IPN, PayPal sends an IPN post when a subscription is created, a payment is made, and when it expires. You can use that IPN post to trigger a script to send your buyers an e-mail. That e-mail can include a link to your site where the button is located or a link the buyers can click to be redirected to PayPal and resubscribe from there.
There isn't a guaranteed way to have buyers return to your site after their subscription expires. Sending them an e-mail with their different options and an explanation that their subscription has expired is a fair way of handling the situation.

Capturing payment; express checkout

Hi
I have paypal express checkout working on my site, when user buys something the transaction goes through and the merchant is able to capture payment by clicking on the capture button on the sandbox site. Problem is that I need 'capture status' returned to the site as I need to store it in database for future use, is there a way that paypal sends some notification whenever the payment is captured by the merchant.
Thanks
PayPal IPN: https://www.paypal.com/ipn
In short, include NOTIFYURL in your SetExpressCheckout and DoExpresscheckoutPayment call and you'll receive a POST on that URL when the transaction has been captured. Look for 'PAYMENTSTATUS', as that should read 'Complete'.
Don't forget to validate the POST by sending it back to https://www.paypal.com/cgi-bin/webscr?cmd=_notify-validate and checking for a VERIFIED / INVALID response.