我正在使用 magento soap api v2,并使用支付网关服务。创建订单时,即使在处理付款之前也会发送确认电子邮件。付款成功后如何发送邮件?我检查了本地 magento 安装的源代码,发现了这个
在 /app/code/core/Mage/Checkout/Controllers/OnepageController.php
$this->getOnepage()->saveOrder();
$redirectUrl = $this->getOnepage()->getCheckout()->getRedirectUrl();
/*** a flag to set that there will be redirect to third party after confirmation
* eg: paypal standard ipn
*/
$redirectUrl = this->getQuote()->getPayment()->getOrderPlaceRedirectUrl();
/**
* we only want to send to customer about new order when there is no redirect to third party
*/
if (!$redirectUrl && $order->getCanSendNewEmailFlag()) {
try {
$order->sendNewOrderEmail();
} catch (Exception $e) {
Mage::logException($e);
}
}
但是我怎么能从外部 api 做到这一点。我也不能使用自定义 api。这可以使用soap api实现吗?我使用此链接设置付款方式 http://www.magentocommerce.com/api/soap/checkout/cartPayment/cart_payment.method.html
任何有类似情况的人