Jeg skal bare have et textarea, allerede eksisterende der automatisk bliver udfyldt med flg:
<?php
/* ewirePayment class. Contains support functions for handling payments through ewire */
class ewirePayment {
public $companyId;
public $companyPrivateKey;
public $ewirePaymentBaseURL;
public $ewirePaymentChangeBaseURL;
function __construct() {
// Do not change theese
$this->ewirePaymentBaseURL = "
https://secure.ewire.dk/payment/transaction.ew"; $this->ewirePaymentChangeBaseURL = "
https://secure.ewire.dk/payment/transaction_change.ew"; }
}
// Create instance of ewire class
$EWIRE = new ewirePayment();
// Sets values for form no change needed all is done by Virtuemart<br />
// These values can be defined from admin
// Subject on the payment. Visible for the customer. Do not use "ÆØÅ" letters here.
$subject = subjecttxt.":".$db->f("order_id");
// Your unique order ID.
$customerOrderId = $db->f("order_id");
// Transaction currency. Currently "DKK" is only accepted.
$currency = $_SESSION['vendor_currency'];
// Link to your product. Visible for the customer.
$itemURL = "
http://127.0.0.1/jom/index.php?option=com_virtuemart"; // Transaction amount in danish "Øre". Ex. DKK 20,00 is written as "2000".
$amount = $db->f("order_total") *100;
$annonymousPayerAllowed = annonymousPayerAllowed;
$expireDays = expireDays;
$EWIRE_VERIFIED_STATUS = EWIRE_VERIFIED_STATUS;
$EWIRE_INVALID_STATUS = EWIRE_INVALID_STATUS;
$EWIRE_ACCEPT = EWIRE_ACCEPT;
$EWIRE_DECLINE = EWIRE_DECLINE;
$companyPrivateKey = companyPrivateKey;
$companyId = companyId;
$paymentAMD = md5(EWIRE_VERIFIED_STATUS . EWIRE_ACCEPT);
$paymentDMD = md5(EWIRE_INVALID_STATUS . EWIRE_DECLINE);
$acceptURL = $mosConfig_live_site."/index.php?option=com_virtuemart&page=checkout.ewire&statusMd=".$paymentAMD."&order_id=".$customerOrderId;
$declineURL = $mosConfig_live_site."/index.php?option=com_virtuemart&page=checkout.ewire&statusMd=".$paymentDMD."&order_id=".$customerOrderId;
//$declineURL = "netpayment.php";
// Calculates MD5 value of all values
$validateMD = md5($companyPrivateKey . $companyId . $subject . $customerOrderId . $amount . $currency . $expireDays . $annonymousPayerAllowed . $acceptURL . $declineURL);
?>
<h1>Ewire</h1>
<form action="<? echo $EWIRE->ewirePaymentBaseURL ?>" target="_blank" method="post">
<input type="hidden" name="companyId" value="<? echo companyId ?>" />
<input type="hidden" name="lang" value="<? echo lang ?>" />
<input type="hidden" name="subject" value="<? echo $subject ?>" />
<input type="hidden" name="customerOrderId" value="<? echo $customerOrderId ?>" />
<input type="hidden" name="amount" value="<? echo $amount ?>" />
<input type="hidden" name="currency" value="<? echo $currency ?>" />
<input type="hidden" name="itemURL" value="<? echo $itemURL ?>" />
<input type="hidden" name="expireDays" value="<? echo expireDays ?>" />
<input type="hidden" name="annonymousPayerAllowed" value="<? echo annonymousPayerAllowed ?>" />
<input type="hidden" name="acceptURL" value="<? echo $acceptURL ?>" />
<input type="hidden" name="declineURL" value="<? echo $declineURL ?>" />
<input type="hidden" name="validateMD" value="<? echo $validateMD ?>" />
<input type="image" title="Start betaling" src="<? echo $mosConfig_live_site ?>/components/com_virtuemart/shop_image/ps_image/ewire_images/ewire_btn.gif" value="Start betaling" />
</form>