

function MONEYBOOKERS_doPay(oPayForm, bShowWaitForPay){
	var sFormTarget = 'PaymentTerminal';

	
		var oWin = new SMPopup();
		with(oWin){
			targetName = sFormTarget;
			targetUrl = "https://www.moneybookers.com/app/payment.pl";
			locationReplace = true;
			showScroll = true;
			showModal = false;
			pWidth = 800;
			pHeight = 560;
			openPage();
		};
		

	with(oPayForm){
		action = 'https://www.moneybookers.com/app/payment.pl';
		target = sFormTarget;
		submit();
	};

	return(bShowWaitForPay);
};

function MONEYBOOKERS_setFieldValue(fieldName, fieldValue){
	switch(fieldName){
		case 'pay_to_email':
			fieldValue = 'mhaut@level421.com'; break;
		case 'detail1_text':
		case 'transaction_id':
			fieldValue =  SMShop.getAttribute("sid"); break;

		case 'return_url':
			fieldValue = SM_PAGEURL_POPPAY_SUCCESS; break;
		case 'cancel_url':
			fieldValue = SM_PAGEURL_DATA_ENTRY_VERIFY; break;
	
		case 'status_url':
			fieldValue = 'order@level421.com'; break;
		case 'pay_from_email':
			fieldValue = SMShop.getFormValue("BILLTO", "BILLTO_EMAIL"); break;
		case 'amount':
			var oAmount = new cSMPrice();
			oAmount.decode(SMShop.basket.getAttribute(_SMAFinalSum));
			fieldValue = cprimary.format(oAmount.gross, SM_CNOFORMAT);
			break;
		case 'currency':
			fieldValue = 'EUR'; break;
		case 'address':
			fieldValue = SMShop.getFormValue("BILLTO", "BILLTO_STREET_1"); break;
		case 'firstname':
			fieldValue = SMShop.getFormValue("BILLTO", "BILLTO_FIRSTNAME"); break;
		case 'lastname':
			fieldValue = SMShop.getFormValue("BILLTO", "BILLTO_LASTNAME"); break;
		case 'postal_code':
			fieldValue = SMShop.getFormValue("BILLTO", "BILLTO_POSTCODE"); break;
		case 'city':
			fieldValue = SMShop.getFormValue("BILLTO", "BILLTO_CITY"); break;
		case 'country':
			fieldValue = SMShop.getFormValue("BILLTO", "BILLTO_COUNTRY"); break;
	};
	return(fieldValue);
};

function MONEYBOOKERS_beforeSendOrder(params, cancel){
	return(cancel);
};

function MONEYBOOKERS_removePayFormFields(){
	return(true);
};

function MONEYBOOKERS_setForwardPayformFieldNames(){
	var sFields = ''; 
	return(sFields);
};

function MONEYBOOKERS_setResponseQueryCaptions(param){
	var sCaption = '';
	switch(param.toLowerCase()){
		case 'transid': sCaption = 'Transaktionsnr.'; break;
		default: sCaption = param;
	};
	return(sCaption);
};
