• TheFrisco
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

I cannot install the Force.com Eclipse plugin, any version because the download of http://www.adnsandbox.com/tools/ide/install/plugins/com.salesforce.ide.ui_27.0.0.201302151147.jar

is failing. Tried it in Exclipse, in browser and in a Download Manager ... all failing.

 

Btw I do know that this is one version outdated, but I tried v28 as well, same error. This has been a REAL p... in the a.. because I keep running into deploy bugs trying to move my custom app from my sandbox to prod ...

  1. CHANGESET BUG - ChangeSets failed because of master/detail relationship errors ... http://digicomet.blogspot.com/2011/08/salesforcecom-change-set-unable-to.html
  2. IDE v28 BUG - Force.com IDE v28 standalonefails with InstalledPackages bug ... http://boards.developerforce.com/t5/General-Development/Force-com-IDE-Error-Cannot-deploy-InstalledPackage-in-Package/td-p/650091
  3. ECLIPSE PLUGIN FAILURE - Now the Force.com Eclipse plugin v27 cannot be downloaded ... YUCK

Ok, done whining, thanks for any suggestions on this.

 

Happy Weekend,

 

TheFrisco aka Robert

 

 

OK, gonna keep this short ... I am new to Apex and especially writing test classes is giving me a headache ... HELP PLEASE!!!

 

Here is the class ... (took out some code and replaced with ... for easier reading)

public class DoPaymentHandler{

    public DoPaymentHandler(){       
    }

    public DoPaymentHandler(ApexPages.StandardController controller) {
        this.reg = (Registration__c)controller.getRecord();
    }
    
   ...        
    
    //Handling payment processing submitting by VF page button
    public void process(){
        isSuccess = false;

        amount =         String.valueOf(reg.Open_Amount__c);
        ponumber =       reg.Event__r.PO_Number__c;
        description =    reg.Event__r.Name;
        firstname =      reg.Participant__r.First_Name__c;
        lastname =       reg.Participant__r.Last_Name__c;
        email =          reg.Participant__r.Email__c;
        state =          reg.Participant__r.Billing_State__c;
        zip =            reg.Participant__r.Billing_ZIP__c;
        cardnumber =     reg.Participant__r.Credit_Card__c;
        expiration =     reg.Participant__r.Expiration_Date__c;
    
        if(!validate()){
            isSuccess = false;
            return;
        }
        
        AuthorizeDotNet ath = new AuthorizeDotNet(isTest);
        ath.transaction(cardnumber, expiration, amount, '','','');  
        ath.setParameter('x_device_type','1');  
        ath.setParameter('x_first_name',firstname);  
        ath.setParameter('x_last_name',lastname);  
        // ath.setParameter('x_address',address);  
        ath.setParameter('x_state',state);  
        ath.setParameter('x_response_format','1');  
        ath.setParameter('x_zip',zip);
        ath.setParameter('x_po_num',ponumber);  
        ath.setParameter('x_description',description);  
        try{
            ath.process(3);
        }catch(Exception ex){
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, ex.getMessage())); 
            isSuccess = false;
        }
        ...        
    }
    
    private boolean validate(){

        ...              
    }
}

 

Here is the test class ...

public class TestAuthorizeDotNetLib{
   @isTest
   private static void testclasses(){
        DoPaymentHandler doPayment = new DoPaymentHandler();
        doPayment.process();
        doPayment.amount='test';
        doPayment.ponumber='test';
        doPayment.description='test';
        doPayment.firstname='test';
        doPayment.lastname='test';
        doPayment.email='test';
        doPayment.state='test';
        doPayment.zip='test';
        doPayment.cardnumber='test';
        doPayment.expiration='test';
        doPayment.process();
   }
}

 

When running the test I get the error message "Problems with System.NullPointerException: Attempt to de-reference a null" on the line with "doPayment.process();"

 

Help is much appreciated.

 

Robert aka TheFrisco

I cannot install the Force.com Eclipse plugin, any version because the download of http://www.adnsandbox.com/tools/ide/install/plugins/com.salesforce.ide.ui_27.0.0.201302151147.jar

is failing. Tried it in Exclipse, in browser and in a Download Manager ... all failing.

 

Btw I do know that this is one version outdated, but I tried v28 as well, same error. This has been a REAL p... in the a.. because I keep running into deploy bugs trying to move my custom app from my sandbox to prod ...

  1. CHANGESET BUG - ChangeSets failed because of master/detail relationship errors ... http://digicomet.blogspot.com/2011/08/salesforcecom-change-set-unable-to.html
  2. IDE v28 BUG - Force.com IDE v28 standalonefails with InstalledPackages bug ... http://boards.developerforce.com/t5/General-Development/Force-com-IDE-Error-Cannot-deploy-InstalledPackage-in-Package/td-p/650091
  3. ECLIPSE PLUGIN FAILURE - Now the Force.com Eclipse plugin v27 cannot be downloaded ... YUCK

Ok, done whining, thanks for any suggestions on this.

 

Happy Weekend,

 

TheFrisco aka Robert

 

 

OK, gonna keep this short ... I am new to Apex and especially writing test classes is giving me a headache ... HELP PLEASE!!!

 

Here is the class ... (took out some code and replaced with ... for easier reading)

public class DoPaymentHandler{

    public DoPaymentHandler(){       
    }

    public DoPaymentHandler(ApexPages.StandardController controller) {
        this.reg = (Registration__c)controller.getRecord();
    }
    
   ...        
    
    //Handling payment processing submitting by VF page button
    public void process(){
        isSuccess = false;

        amount =         String.valueOf(reg.Open_Amount__c);
        ponumber =       reg.Event__r.PO_Number__c;
        description =    reg.Event__r.Name;
        firstname =      reg.Participant__r.First_Name__c;
        lastname =       reg.Participant__r.Last_Name__c;
        email =          reg.Participant__r.Email__c;
        state =          reg.Participant__r.Billing_State__c;
        zip =            reg.Participant__r.Billing_ZIP__c;
        cardnumber =     reg.Participant__r.Credit_Card__c;
        expiration =     reg.Participant__r.Expiration_Date__c;
    
        if(!validate()){
            isSuccess = false;
            return;
        }
        
        AuthorizeDotNet ath = new AuthorizeDotNet(isTest);
        ath.transaction(cardnumber, expiration, amount, '','','');  
        ath.setParameter('x_device_type','1');  
        ath.setParameter('x_first_name',firstname);  
        ath.setParameter('x_last_name',lastname);  
        // ath.setParameter('x_address',address);  
        ath.setParameter('x_state',state);  
        ath.setParameter('x_response_format','1');  
        ath.setParameter('x_zip',zip);
        ath.setParameter('x_po_num',ponumber);  
        ath.setParameter('x_description',description);  
        try{
            ath.process(3);
        }catch(Exception ex){
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, ex.getMessage())); 
            isSuccess = false;
        }
        ...        
    }
    
    private boolean validate(){

        ...              
    }
}

 

Here is the test class ...

public class TestAuthorizeDotNetLib{
   @isTest
   private static void testclasses(){
        DoPaymentHandler doPayment = new DoPaymentHandler();
        doPayment.process();
        doPayment.amount='test';
        doPayment.ponumber='test';
        doPayment.description='test';
        doPayment.firstname='test';
        doPayment.lastname='test';
        doPayment.email='test';
        doPayment.state='test';
        doPayment.zip='test';
        doPayment.cardnumber='test';
        doPayment.expiration='test';
        doPayment.process();
   }
}

 

When running the test I get the error message "Problems with System.NullPointerException: Attempt to de-reference a null" on the line with "doPayment.process();"

 

Help is much appreciated.

 

Robert aka TheFrisco