Hi there I want to send a message to another web service when the payment captured.
Where do you think it is best to put my code and send a notification my web service when this trigger is fired? Where is the Payment Captured trigger? I cannot find it.
Thanks for your help
Modifying Triggers
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Modifying Triggers
Payment captured is based on your payement gateway settings- whether you have them set for authorize or authorize and capture. In most places, the best place I have found to do something special is on the receipt page because by then you know the payment status on the order. For example, I send special emails from there.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Modifying Triggers
Yes I agree with the receipt page but sometimes receipt page wont be called.
When a customer use paypal for payment method customer might not be able to go to the receipt page. There is a trigger in email templates called "Payment was fully captured" where can I find this trigger in the code?
Can't I modify it?
Thanks a lot
When a customer use paypal for payment method customer might not be able to go to the receipt page. There is a trigger in email templates called "Payment was fully captured" where can I find this trigger in the code?
Can't I modify it?
Thanks a lot
Re: Modifying Triggers
There can be two places. First either you do this in suitable payment form user control under Website/checkout/PaymentForms or you handle this in CheckedOut event handler of ConLib/OnePageCheckout.ascx.cs file. I think I will preffer CheckedOut event handler of OnePageCheckout.ascx.cs file becuase this event handler is already registered on all out of the box payment forms so I don't have to replicate the code in different payment forms but its up to you both locations can workout. So in CheckedOut event handler if checkout was a scuccess you may try doing something like
Code: Select all
if (response.Success)
{
..............................................
..............................................
// LOAD NEWLY CREATED ORDER
OrderDataSource order = OrderDataSource.Load(e.OrderId);
if(order != null)
{
// THE CODE TO NOTIFY YOUR CUSTOM SERVICE GOES HERE
}
}