You need to sign in to do that
Don't have an account?
Erin Kuhn
PayPal IPN messages via FormAssembly are not updating the Salesforce Opportunity record
I have a form on FormAssembly which includes making a payment using PayPal. When PayPal sends the IPN that payment has completed, FormAssembly sends the IPN to a custom URL which is https://atsu.secure.force.com/apply.
In Salesforce, I have an APEX class called IPNHandlerController and it has this in the body:
FormAssembly creates an Opportunity record and populates the FormAssembly_ID when the record is created.
I also have a VisualForce page called IPNHandler. It has the following:
I have created a site and the URL is https://atsu.secure.force.com/apply. The Active Site Home Page is IPNHandler.
To summarize, it should work as follows:
1. FormAssembly creates the Opportunity record with the FormAssembly_ID
2. FormAssembly sends user to PayPal.
3. User pays on PayPal. PayPal sends IPN to FormAssembly.
4. FormAssembly sends IPN to Salesforce "site" at URL of https://atsu.secure.force.com/apply
4. IPNHandler calls IPNHandlerController which updates the "Paid" field to true
All of this works EXCEPT the PayPal information is not coming through and the Paid field on Opportunity is not being set to true. So basically, FormAssembly is creating the Opportunity record with the FormAssembly_ID, but after they pay, the PayPal IPN message is not updating the Opportunity record to make the Paid field true. Is there something wrong in my APEX code, or something I may be missing? I have checked the permission settings for the guest user and they seem correct.
In Salesforce, I have an APEX class called IPNHandlerController and it has this in the body:
FormAssembly creates an Opportunity record and populates the FormAssembly_ID when the record is created.
I also have a VisualForce page called IPNHandler. It has the following:
I have created a site and the URL is https://atsu.secure.force.com/apply. The Active Site Home Page is IPNHandler.
To summarize, it should work as follows:
1. FormAssembly creates the Opportunity record with the FormAssembly_ID
2. FormAssembly sends user to PayPal.
3. User pays on PayPal. PayPal sends IPN to FormAssembly.
4. FormAssembly sends IPN to Salesforce "site" at URL of https://atsu.secure.force.com/apply
4. IPNHandler calls IPNHandlerController which updates the "Paid" field to true
All of this works EXCEPT the PayPal information is not coming through and the Paid field on Opportunity is not being set to true. So basically, FormAssembly is creating the Opportunity record with the FormAssembly_ID, but after they pay, the PayPal IPN message is not updating the Opportunity record to make the Paid field true. Is there something wrong in my APEX code, or something I may be missing? I have checked the permission settings for the guest user and they seem correct.
Line 51: Shows the query it tries to run to find that form id
Line 62: Shows there were no results found from the query ran.