The abstract MPay24Shop class provides abstract functions, which are used from the other functions in order to make a payment or a request to mPAY24
TYPE: PARAMETER - VALUE(s), description
author | mPAY24 GmbH <support@mpay24.com> |
---|---|
version | $Id: MPay24Shop.php 5522 2013-06-24 13:08:35Z anna $ |
filesource | MPay24Shop.php |
license | http://ec.europa.eu/idabc/eupl.html EUPL, Version 1.1 |
MPay24Shop(int $merchantID, string $soapPassword, bool $test, string $proxyHost = null, int $proxyPort = null, bool $debug = false)
int
5-digit account number, supported by mPAY24: TEST accounts - starting with 9 LIVE account - starting with 7
string
The webservice's password, supported by mPAY24
bool
TRUE - when you want to use the TEST system, FALSE - when you want to use the LIVE system
string
The host name in case you are behind a proxy server ("" when not)
int
4-digit port number in case you are behind a proxy server ("" when not)
bool
TRUE - when you want to write log files, FALSE - when you don't want write log files
createTransaction()
updateTransaction(string $tid, array $args, bool $shippingConfirmed)
string
The transaction ID you want to update with the confirmation
array
Arrguments with them the transaction is to be updated
bool
TRUE if the shipping address is confirmed, FALSE - otherwise (in case of PayPal Express Checkout)
getTransaction(string $tid)
string
The transaction ID of the transaction you want get
createMDXI(\Transaction $transaction)
\Transaction
The transaction you want to make a MDXI XML file for
createProfileOrder(string $tid)
string
The transaction ID of the transaction you want to make an order transaction XML file for
createExpressCheckoutOrder(string $tid)
string
The transaction ID of the transaction you want to make an order transaction XML file for
createFinishExpressCheckoutOrder(string $tid, string $shippingCosts, string $amount, bool $cancel)
string
The transaction ID of the transaction you want to make an order transaction XML file for
string
The shipping costs amount for the transaction, provided by PayPal, after changing the shipping address
string
The new amount for the transaction, provided by PayPal, after changing the shipping address
bool
TRUE if the a cancelation is wanted after renewing the amounts and FALSE otherwise
write_log(string $operation, string $info_to_log)
string
The operation, which is to log: GetPaymentMethods, Pay, PayWithProfile, Confirmation, UpdateTransactionStatus, ClearAmount, CreditAmount, CancelTransaction, etc.
string
The information, which is to log: request, response, etc.
createSecret(string $tid, string $amount, string $currency, string $timeStamp)
It should build a hash from the transaction ID of your shop, the amount of the transaction, the currency and the timeStamp of the transaction. The mPAY24 confirmation interface will be called with this hash (parameter name 'token'), so you would be able to check whether the confirmation is really coming from mPAY24 or not. The hash should be then saved in the transaction object, so that every transaction has an unique secret token.
string
The transaction ID you want to make a secret key for
string
The amount, reserved for this transaction
string
The timeStamp at the moment the transaction is created
string
The timeStamp at the moment the transaction is created
getSecret(string $tid)
string
The transaction ID you want to get the secret key for
getPaymentMethods()
pay()
payWithProfile()
payWithExpressCheckout()
finishExpressCheckoutPayment(string $tid, int $shippingCosts, int $amount, string $cancel)
string
The transaction ID in the shop
int
The shippingcosts for the transaction multiply by 100
int
The amount you want to reserve/bill multiply by 100
string
ALLOWED: "true" or "false" - in case of 'true' the transaction will be canceled, otherwise reserved/billed
confirm(string $tid, array $args)
string
The transaction ID in the shop
array
A list with the arguments, provided with the confirmation
updateTransactionStatus(string $tid)
An array with all the data (by mPAY24) for this transaction (STATUS, CURRENCY, PRICE, APPR_CODE, etc) will be returned. Possible values for the STATUS attribute:
string
The transaction ID (in your shop), for the transaction you are asking for
clearAmount(string $tid, int $amount)
string
The transaction ID, for the transaction you want to clear
int
The amount you want to clear multiply by 100
creditAmount(string $tid, int $amount)
string
The transaction ID, for the transaction you want to credit
int
The amount you want to credit multiply by 100
cancelTransaction(string $tid)
string
The transaction ID, for the transaction you want to cancel
checkTransaction($transaction)
mPay24Api