I've managed to figure out how everthing peices together to create an order and am putting together a PayPal PaymentMethodService. From what I can gather, what I should be doing is creating a RequestPayment which redirects to PayPal for them to process payment. Now, there are just a couple of things I nee to clarify.
PayPal offers an Instant Payment Notification service, which can call a webpage on your site to notify it of payment, so I was thinking that as suggested in the docs, to create a HTTPHandler to handle this and to update the order. My question is, how far should this handler go? Would you be calling the SubmitBasket method on the CheckoutService at this point? Or just update status and any transaction ID? And if the later, when would you call SubmitBasket? as the user may not actualy come back to the site, which would mean, the order would effectivley be lost on the system.
I often go with the option of creating the order before requesting payment and then just setting a status on it afterwards as it makes the easier to support multi payment scenarios.
When you say "creating the order before requesting payment", do you mean you call CheckoutService().SubmitBasket? Or do you manualy create the order? And call SubmitBasket later on?
You have to do CreatePayment before running CheckoutService().SubmitBasket as this call promote your basket to an order, which means the basket will no longer be available for adding new payments.
I'm working on refining this to enable splitting creating and requesting payments where they are just one call today.
Integrating PayPal
Hi Guys (More specificaly Soren ;)
I've managed to figure out how everthing peices together to create an order and am putting together a PayPal PaymentMethodService. From what I can gather, what I should be doing is creating a RequestPayment which redirects to PayPal for them to process payment. Now, there are just a couple of things I nee to clarify.
PayPal offers an Instant Payment Notification service, which can call a webpage on your site to notify it of payment, so I was thinking that as suggested in the docs, to create a HTTPHandler to handle this and to update the order. My question is, how far should this handler go? Would you be calling the SubmitBasket method on the CheckoutService at this point? Or just update status and any transaction ID? And if the later, when would you call SubmitBasket? as the user may not actualy come back to the site, which would mean, the order would effectivley be lost on the system.
What do you recommend?
Matt
I often go with the option of creating the order before requesting payment and then just setting a status on it afterwards as it makes the easier to support multi payment scenarios.
Ahhhh, ok, so you don't have to do them in the order laod out in the demo.
So, I should just be able to have the user to confirm the order, then redirect to paypal.
Cool
Cheers
Matt
Hi Soren,
When you say "creating the order before requesting payment", do you mean you call CheckoutService().SubmitBasket? Or do you manualy create the order? And call SubmitBasket later on?
Cheers
Matt
You have to do CreatePayment before running CheckoutService().SubmitBasket as this call promote your basket to an order, which means the basket will no longer be available for adding new payments.
I'm working on refining this to enable splitting creating and requesting payments where they are just one call today.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.