Skip to content

Instantly share code, notes, and snippets.

@bradwright
Created April 28, 2009 10:03
Show Gist options
  • Save bradwright/103060 to your computer and use it in GitHub Desktop.
Save bradwright/103060 to your computer and use it in GitHub Desktop.
<?
session_start();
define('HPSURL',"https://psp.transactium.com/hpservices/ws/hpws.v1100.asmx");
include('utils.php');
/* AMEND FOLLOWING SECTION WITH PAYMENT DETAILS */
$hp=new CTransactiumHPP("--USERNAME--","--PASSWORD--");
$params=array(
'Amount'=>0, ///payment amount
'Curr'=>"EUR"; ///payment currency
'PaymentType'=>"Sale", ///payment type
'HPSProfileTag'=>"", ///payment profile
'MaxTimeLimit'=>0, ///max session time limit
'OrderReference'=>"", ///order reference
'ClientReference'=>"", ///client reference
'ClientIPRestriction'=>getenv('REMOTE_ADDR'), ///customer IP
'ClientBillingCountry'=>"MT", ///customer billing country code
'ClientEmail'=>"") ///customer email address
'SuccessURL'=>"") ///URL to redirect in case of success
'FailURL'=>"") ///URL to redirect in case of error
'LanguageCode'=>"") ///hosted payment frame language code
$payment = $hp->CreateHostedPayment($params);
$_SESSION["HPSID"]=$payment->CreateHostedPaymentResult->HPSID;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment