コード例 #1
0
 function AuthorizeARBDeleteProfile($payment_serial_number, $refID, $user_id, $msc_id = 0)
 {
     require_once JPATH_ADMINISTRATOR . DS . "components" . DS . "com_osemsc" . DS . "libraries" . DS . "class.connection.php";
     require_once JPATH_ADMINISTRATOR . DS . "components" . DS . "com_osemsc" . DS . "libraries" . DS . "AuthnetARB.class.php";
     $arb = new AuthnetARB();
     $config = oseMscConfig::getConfig('payment', 'obj');
     $test_mode = $config->cc_testmode;
     $an_loginid = $config->an_loginid;
     $an_transkey = $config->an_transkey;
     $an_email_customer = $config->an_email_customer;
     $an_email_merchant = $config->an_email_merchant;
     $an_merchant_email = $config->an_merchant_email;
     $ProfileID = $payment_serial_number;
     //self:: GetProfileID($order_number);
     $arbsubdomain = $test_mode ? 'apitest' : 'api';
     $arb->url = $arbsubdomain . ".authorize.net";
     $arb->setParameter('login', $an_loginid);
     $arb->setParameter('transkey', $an_transkey);
     $arb->setParameter('refID', $refID);
     $arb->setParameter('subscrId', $ProfileID);
     $arb->deleteAccount();
     $result = array();
     //$result['resultCode'] = $arb->resultCode;
     $result['code'] = $arb->getResponseCode();
     $result['text'] = $arb->getResponse();
     $result['subscrId'] = $arb->getSubscriberID();
     $result['success'] = $arb->isSuccessful();
     return $result;
 }
コード例 #2
0
       	$subscription->setParameter('subscrId',$subscription_id_responce_cancel );

       	$subscription->deleteAccount();

       	if ($subscription->isSuccessful()){

           

          echo $subscription->isSuccessful();

       }

       else{

       	

     				 echo $subscription->getResponse();

     				

       }

       }*/
} catch (AuthnetARBException $e) {
    $subscription = new AuthnetARB('8FVwN499xm', '2Tc8f298B76jG9yX');
    if ($subscription_id_responce_cancel) {
        $subscription->setParameter('subscrId', $subscription_id_responce_cancel);
        $subscription->deleteAccount();
        if ($subscription->isSuccessful()) {
            $Subscription_cancel = "Subscription has been cancel";