So, it works sometimes. Any chance you’re using a single-channel gateway?
(And please review your posts before/after submitting. The formatting errors just cause too much confusion. Your comment below the code was hardly visible until I edited your post just now. And as it works sometimes, I can only assume that you used fake keys when posting, like in *appKey = "01020304050607080910111213141516"
. Using something like *appKey = "redacted"
is much clearer. See also How do I format my forum post? [HowTo])