• Kim Bryant
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies
I've setup an Apex Class and VF Page in my sandbox for setting up Salesforce to work with PayPal via Form Assembly as outlined on Form Assembly's documentation page http://help.formassembly.com/knowledgebase/articles/344389-make-salesforce-and-paypal-work-together

When I try to doa  changeset from the Sandbox where this is all setup into the production I receive the error: Average test coverage across all Apex Classes and Triggers is 0%, at least 75% test coverage is required.
Creating a Page to go along with an Apex Class for using PayPal and Salesforce with Form Assembly. I'm using the sample code given by Form Assembly of;
<apex:page>
<apex:page controller="IPNHandlerController" action="{!myIPNupdate}" />
</apex:page>

and continue to get the above mentioned error
Trying to write a apex class for making Salesforce and PayPal work via Form Assembly. I've created a custom object called Donation and am using a template coding provided by From Assembly support (http://www3.formassembly.com/blog/doc/connectors/salesforce/advanced-integration/making-salesforce-and-paypal-work-together/). I changed the code to replace where it referenced Opportunity to reference my custom object Donation__c. But I get the error ' Error: Compile Error: Variable does not exist: donation__c at line 8 column 9'. Below is the cod I'm using. Any Ideas?

public class IPNHandlerController {

    public PageReference myIPNupdate() {
     try{
        PageReference pageRef = ApexPages.currentPage();
        //Get the value of the 'custom' parameter from current page
        String paramCustom = pageRef.getParameters().get('custom');
        donation__c = [select Id,paid__c from Donation__c where FormAssemblyID__c = :paramCustom ];

        String content = '';
        for(String key : pageRef.getParameters().keySet()){
            //Note that there is no guarantee of order in the parameter key map.
            content += key + ' : ' + pageRef.getParameters().get(key) + '\n';
        }
        Donation__c.PayPalInfo__c = content;
        Donation__c.paid__c = True;
        update Donation__c;

        PageReference newPage = new ApexPages.StandardController(Donation__c).view();
        newPage.setRedirect(true);       

        return newPage;
     } catch (System.Exception e){
         //A failure occurred
         system.debug(e);
         return null;
     }
    }

    public Opportunity opportunity {get; set;}

    public IPNHandlerController() {
    }
}
I've setup an Apex Class and VF Page in my sandbox for setting up Salesforce to work with PayPal via Form Assembly as outlined on Form Assembly's documentation page http://help.formassembly.com/knowledgebase/articles/344389-make-salesforce-and-paypal-work-together

When I try to doa  changeset from the Sandbox where this is all setup into the production I receive the error: Average test coverage across all Apex Classes and Triggers is 0%, at least 75% test coverage is required.
Trying to write a apex class for making Salesforce and PayPal work via Form Assembly. I've created a custom object called Donation and am using a template coding provided by From Assembly support (http://www3.formassembly.com/blog/doc/connectors/salesforce/advanced-integration/making-salesforce-and-paypal-work-together/). I changed the code to replace where it referenced Opportunity to reference my custom object Donation__c. But I get the error ' Error: Compile Error: Variable does not exist: donation__c at line 8 column 9'. Below is the cod I'm using. Any Ideas?

public class IPNHandlerController {

    public PageReference myIPNupdate() {
     try{
        PageReference pageRef = ApexPages.currentPage();
        //Get the value of the 'custom' parameter from current page
        String paramCustom = pageRef.getParameters().get('custom');
        donation__c = [select Id,paid__c from Donation__c where FormAssemblyID__c = :paramCustom ];

        String content = '';
        for(String key : pageRef.getParameters().keySet()){
            //Note that there is no guarantee of order in the parameter key map.
            content += key + ' : ' + pageRef.getParameters().get(key) + '\n';
        }
        Donation__c.PayPalInfo__c = content;
        Donation__c.paid__c = True;
        update Donation__c;

        PageReference newPage = new ApexPages.StandardController(Donation__c).view();
        newPage.setRedirect(true);       

        return newPage;
     } catch (System.Exception e){
         //A failure occurred
         system.debug(e);
         return null;
     }
    }

    public Opportunity opportunity {get; set;}

    public IPNHandlerController() {
    }
}