Ok, I don't have curl compiled into php or ssl for that matter. I do have curl accesible through the command line so I do something like this:
$postparams="creditcard=2345232623452&amount=34&...etc....";
$targeturl = '%path to curl%/curl -u %myusername%:%mypassword% -d "'.$postparams.'" [url]https://%my[/url] page page here%';
$output = $targeturl;
Basically I ask the user for all the cc info and generate a string called postparams. Postparams holds all the info that would have otherwise been posted by the user on our infamous paypage. Targeturl is then built. Targeturl is actually a command line instruction to run curl with a login which our account requires for payment processes, the parameters to be sent to the paypage via post method (the previously mentioned $postparams) and finally the url (aka, our infamous pay page).
$output then equals the return values of executing the command $targeturl by use of back tics. $output is parsed for the return values which would have otherwise been sent to the thankyou page.
This is kind of makeshift since most of it was done around two years ago and all the fancy ssl things in php and file() where not there yet. It was easier and less impacting to our operation to use the command line that recompile php to include new modules. Obviously if you can do it all through php so much the better.
Hope it helps.
BTW this method is great for locking the user from multiple posts.
1)Their data is sent to you through a form. And you can write it to a session or dbase.
2)You confirm their intention to accept the charges through another page and an accept button (this step can actually be skipped depending on your policies).
3)Once your user accepts 1 or 2 you set a flag indicating that the user accepted the charge and then init the curl process. With that flag set the user can reload the page and resubmit as many times as he wants. You just ignore it until you get a response from the bank.
4)Most important the user submits the payment form to you and not the bank so you know if they actually accepted the charge. Besides altering the page the user could claim that he pressed the button, but you can't be sure yourself. Did the bank time out on the process, is it down, is their DNS out... etc. With this curl process you know exactly what is going on.
Saludos
Gerardo