Jump to content
Sign in to follow this  
Mark B.

Plastic works on 1 pc but not on others?

Recommended Posts

Greetings,

I have developed a POS system using 360Works Plastic (v 1.82) on Windows based systems (some Windows 7 Pro, some XP). The code works flawlessly on my pc (Windows 7). When I run the exact same code on other PCs (some Windows 7, some XP), they get an error message " java.lang.IllegalArgumentException: Missing Card-present transaction. Track 1 or Track 2 Data" I am using PayPal as the gateway in TEST MODE. Only the "card present" mode gives the error, the manual mode works fine. I am using the PayPal test card numbers for Visa, MC and Discover. Again, they all work fine on my pc. The PCs have the same version of Java (Version 6, Update 33). At this point, I don't think it is the Plastic plugin, the script or Filemaker. It must be something with the PCs. Any help would be appreciated. Thanks in advance.

Mark B.

Share this post


Link to post
Share on other sites

I am not quite sure why you are getting varying results on your Windows machines, but in order to ensure proper transactions when usin the Plastic plug-in, make sure that:

1. If you are setting the "CardPresent" parameter to true in the CCSetGateway() function, this assumes that you will be passing in the Track 1/Track 2 data -- which in your last bug report was null.

If you have a card present and are swiping it into some card reader, the value that is returned should look similar to:

"%B1234123412341234^Carduser/John^030510100000019301000000877000000?;1234123412341234=0305103393010877?"

What you would need to do at this point is parse this "raw card data" and extract either the "Track 1" or "Track 2" data and pass the data (without the sentinels) into the CCProccessPayment() function. For example:

// FileMaker Calc to parse Track 1 from the Raw Card data

Let([start = Position (tmp::swipe ; "%" ; 1 ; 1 ); end = Position (tmp::swipe ; "?" ; 1 ; 1)] ; Middle(tmp::swipe ; start; end))






//FileMaker calculation to parse Track 2 from the Raw Card data

Let([start = Position (tmp::swipe ; ";" ; 1 ; 1 ); end = Position (tmp::swipe ; "?" ; 1 ; 2)] ; Middle(tmp::swipe ; start; end))







// Plastic plug-in call using Track data

Set Variable[ $gateway; CCSetGateway( "PayPal" ; "cardPresent=true" ); ]

If [$gateway = "ERROR" ]

Show Custom Dialog[ "Error" ; "And error occurred: " & CCLastError" ]

End If







Set Variable[ $process; CCProcessPayment( merchant, tx, amt, "", "", "track1=%B1234123412341234^Carduser/John^030510100000019301000000877000000?") ]

If [$process = "ERROR" ]

Show Custom Dialog[ "Error" ; "And error occurred: " & CCLastError" ]

End If

Regards,

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.