PayPal workflow question

michael's Avatar

michael

02 Aug, 2012 02:02 PM

I've been trying to integrate Cheddargetter PayPal to my site and I just have a few questions regarding the processing after preapproval.
As I understand it, after the user preapproves on their PayPal account they are redirected back to our site. At this point in time the subscription status could be Paypal-Wait? What if the customer closes the browser before redirecting back to our site?

When / how can we know when the customer has actually gotten the PayPal preapproval so we can provision the resources for the customer on our backend? Can we use web hooks for this purpose? I notice that there is a hook for "New Subscription", but that seems to be hit on customer creation and not necessarily after preapproval. Perhaps we can I can use the "Transaction" hook?

  1. Support Staff 1 Posted by Marc Guyer on 02 Aug, 2012 04:36 PM

    Marc Guyer's Avatar

    At this point in time the subscription status could be Paypal-Wait?

    Yes. The subscription remains in this state until PayPal communicates a status change to CheddarGetter.

    What if the customer closes the browser before redirecting back to our site?

    This has no effect. If the user clicked to accept or deny the preapproval, the process is engaged and PayPal will send the status message. Browser interaction is unrelated after the accept button is clicked.

    When / how can we know when the customer has actually gotten the PayPal preapproval so we can provision the resources for the customer on our backend? Can we use web hooks for this purpose? I notice that there is a hook for "New Subscription", but that seems to be hit on customer creation and not necessarily after preapproval. Perhaps we can I can use the "Transaction" hook?

    The New Subscription email is sent immediately. The New Subscription hook is sent after the preapproval is confirmed to be accepted by the customer and the first transaction (if applicable) is successful.

  2. 2 Posted by michael on 02 Aug, 2012 11:52 PM

    michael's Avatar

    Ah ok, that's perfect. I'll use the new subscription hook for our purpose. Thanks!

  3. michael closed this discussion on 02 Aug, 2012 11:53 PM.

  4. michael re-opened this discussion on 03 Aug, 2012 11:06 AM

  5. 3 Posted by michael on 03 Aug, 2012 11:09 AM

    michael's Avatar

    Sorry, just one more question:

    After creating the customer I get a reply with the redirectUrl which I need to use to redirect the customer to PayPal. In this reply, the subscriptions element is an array of subscriptions.

    What condition would I need to apply to get the current subscription that they have just created? Is it sorted in any way, where I can just get the first element or the last element?

  6. Support Staff 4 Posted by Marc Guyer on 03 Aug, 2012 01:58 PM

    Marc Guyer's Avatar

    THe current subscription is the first one in the list. You can confirm by sorting by createdDatetime.

  7. Marc Guyer closed this discussion on 03 Aug, 2012 01:58 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM