kgasman Posted May 10, 2010 Posted May 10, 2010 I bought the 360works plastic plugin. In the documentation it doesn't state if you can put if calculations in it's function. Will the following work... CCProcessPayment( ClientBilling::MerchantAccount;ClientBilling::TransactionKey;ClientBilling::CreditCardCharge;ClientBilling::CreditCardNumber;ClientBilling::ExpirationMonth & Right ( ClientBilling::ExpirationYear ; 2 );"chargeDescription="&ClientBilling::DescriptionofCharge;"cardType="&ClientBilling::typeofCreditCard;"verificationCode="&ClientBilling::VerificationCode;"firstName="&ClientBilling::FirstNameOnCard;"lastName="&ClientBilling::LastNameonCard;(If ( IsEmpty ( ClientBilling::BillingAddress ) or IsEmpty ( ClientBilling::BillingCity ) or IsEmpty ( ClientBilling::BillingState ) or IsEmpty ( ClientBilling::BillingZip ); "" ; ""address=""& ClientBilling::BillingAddress&";"city=""&ClientBilling::BillingCity&";"state=""&ClientBilling::BillingState&";"zip=""&ClientBilling::BillingZip)) ) I used the If calculation to see if the user put in a billing address. If they did it should pass that on to the function. I don't see a way to test this myself. I would appreciate any help Kevin
Smef Posted May 11, 2010 Posted May 11, 2010 I can't say if your fields are valid, but yes, you can use any sort of calculation or variable in your function parameters, or use the function itself as part of a calculation. You can test this yourself by putting your calculation in a field or script step in your filemaker database (such as a set variable script step).
kgasman Posted May 11, 2010 Author Posted May 11, 2010 Thanks for the reply... I did put it into a set variable step and it works fine. I didn't know if your functions accept calculations within the function. Would putting the plugin into test mode and calling the process function tell me if the calculation is valid? thanks again for your help
Smef Posted May 11, 2010 Posted May 11, 2010 If your charge is successful you will receive a transaction ID as a result of the processpayment function. If it is not, you will receive "ERROR" and should use the cclasterror function to see what went wrong.
Recommended Posts
This topic is 5308 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now