私は 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
同じような境遇の方