我在auth.net上捕获事务的功能是
public function capture(Varien_Object $payment, $amount){
if(!$this->isEnabled()){
return parent::capture($payment, $amount);
}else{
$captureCase = $_POST['invoice']['capture_case'];
if(isset($captureCase) && $captureCase == "online"){
if($capOrderid = $payment->getOrder()->getIncrementId()){
$capOrder = $payment->getOrder();
$capPayment = $payment;
$capAmount = $amount;
$capTransID = $capPayment->getLastTransId();
$ccProfile = $this->getProfileForOrder($capOrderid);
if(isset($ccProfile['used_this_profile']) && $ccProfile['used_this_profile'] == 1){
$pID = $ccProfile['cust_profile_id'];
$ppID = $ccProfile['cust_paymentprofile_id'];
$nick = $ccProfile['nickname'];
$lastOrderId = $capOrder->getIncrementId();
$cvv = $payment->getCcCid();
$directResponseFields = $this->createTransaction($pID,$ppID,$capAmount,$lastOrderId,"profileTransPriorAuthCapture",$cvv,$capTransID);
$responseCode = $directResponseFields[0]; // 1 = Approved 2 = Declined 3 = Error
$responseReasonCode = $directResponseFields[2]; // See http://www.authorize.net/support/AIM_guide.pdf
$responseReasonText …Run Code Online (Sandbox Code Playgroud)