<?
# cookbook script
# http://www.pmwiki.org/wiki/Cookbook/SagePayPayment
include_once("$FarmD/cookbook/sagepay.php");

# SagePay
# Default values to pass to SagePay
/**************************************************************************************************
* Values for you to update
**************************************************************************************************/

// name of the gateway to connect to
// three options available
// 1. SIMULATOR for the VSP Simulator expert system
// 2. TEST for the Test Server
// 3. LIVE in the live environment
$SagePayDefaults['strConnectTo']="SIMULATOR";

//Change if you have all your pages in a PmWiki group, this will be the group name
$SagePayDefaults['strVirtualDir']="SagePayDemo/"; 

/** IMPORTANT.  Set the strYourSiteFQDN value to the Fully Qualified Domain Name of your server. **
** This should start http:// or https:// and should be the name by which our servers can call back to yours **
** i.e. it MUST be resolvable externally, and have access granted to the Protx servers **
** examples would be https://www.mysite.com or http://212.111.32.22/ **
** NOTE: You should leave the final / in place. **/

// this needs the trailing slash
$SagePayDefaults['strYourSiteFQDN']=$ScriptUrl . "/";
// strVSPVendorName, set this value to the VSPVendorName assigned to you by protx or chosen when you applied
$SagePayDefaults['strVSPVendorName']="myvspvendorname"; 
// strEncryptionPassword, set this value to the XOR Encryption password assigned to you by Protx
$SagePayDefaults['strEncryptionPassword']="myvspcode";  
// strCurrency, set this to indicate the currency in which you wish to trade. You will need a merchant number in this currency
$SagePayDefaults['strCurrency']="GBP"; 
// strTransactionType, this can be DEFERRED or AUTHENTICATE if your Protx account supports those payment types
$SagePayDefaults['strTransactionType']="PAYMENT"; 
// Optional setting. If you are a Protx Partner and wish to flag the transactions with your unique partner id set it here.
$SagePayDefaults['strPartnerID']=""; 

/* Your deatils */
// strVendorDescription, description of shop, passed to SagePay and used in a couple fo other places.
$SagePayDefaults['strVendorDescription']="My demo business name"; 
// strVendorContactBlurb, Your contact blurb, you could have an email address, a phone number, support system info, just to explain how your clients get in touch with you
$SagePayDefaults['strVendorContactBlurb']="If you have questions or concerns about ordering online, please contact us at ag@ssofb.co.uk."; 
// strVendorEMail, the email address of the administrator of the shop, emails regarding sucessful or failed transactions will be sent to this address.
$SagePayDefaults['strVendorEMail']="John Doe <info@ssofb.co.uk>"; 

// Page Var Settings, these are the names of the pages in the order process
// stage one, CustomerDetailsPage, where the customer is sent after choosing an item, allows them to enter their details
$SagePayDefaults['CustomerDetailsPage'] = "CustomerDetails";
// stage two, CustomerDetailsPage, reviews and confirms their order
$SagePayDefaults['OrderConfirmationPage'] =  "OrderConfirmation";
// stage three A, where customers are sent if their transaction fails
$SagePayDefaults['OrderFailedPage'] =  "OrderFailed";
// stage three B, where customers are sent if their transaction is sucessful
$SagePayDefaults['OrderSuccessfulPage'] =  "OrderSuccessful";
// the welcome page, where home links go to
$SagePayDefaults['welcomePage'] = $ScriptUrl;

/* Buttons */
$SagePayDefaults['PayButtonFilename']  = $ScriptUrl ."/../../pub/skins/ssofb.co.uk_retreattravel/button_pay_securely.gif";
$SagePayDefaults['ConfirmOrderButtonFilename']  = $ScriptUrl ."/../../pub/skins/ssofb.co.uk_retreattravel/button_confirm_order.gif";
$SagePayDefaults['CompletePaymentButtonFilename']  = $ScriptUrl ."/../../pub/skins/ssofb.co.uk_retreattravel/button_complete_payment.gif";
$SagePayDefaults['BackHomeButtonFilename']  = $ScriptUrl ."/../../pub/skins/ssofb.co.uk_retreattravel/button_back_home.gif";
$SagePayDefaults['BackButtonFilename']  = $ScriptUrl ."/../../pub/skins/ssofb.co.uk_retreattravel/button_back.gif";
$SagePayDefaults['HomeButtonFilename']  = $ScriptUrl ."/../../pub/skins/ssofb.co.uk_retreattravel/button_home.gif";

/* 

/* Icons */
$SagePayDefaults['SuccessIconFilename']  = $ScriptUrl ."/../../pub/skins/ssofb.co.uk_retreattravel/success.gif";
$SagePayDefaults['WarningIconFilename']  = $ScriptUrl ."/../../pub/skins/ssofb.co.uk_retreattravel/warning.gif";
$SagePayDefaults['ErrorIconFilename']  = $ScriptUrl ."/../../pub/skins/ssofb.co.uk_retreattravel/error.gif";

/**************************************************************************************************
* Global Definitions for this site
**************************************************************************************************/

$SagePayDefaults['strProtocol']="2.23";

if ($SagePayDefaults['strConnectTo']=="LIVE")
  $SagePayDefaults['strPurchaseURL']="https://ukvps.protx.com/vspgateway/service/vspform-register.vsp";
elseif ($SagePayDefaults['$strConnectTo']=="TEST")
  $SagePayDefaults['strPurchaseURL']="https://ukvpstest.protx.com/vspgateway/service/vspform-register.vsp";
else
  $SagePayDefaults['strPurchaseURL']="https://ukvpstest.protx.com/VSPSimulator/VSPFormGateway.asp";

?>