Trustly/Api/signed.php
public function deposit($notificationurl, $enduserid, $messageid,
		$locale=NULL, $amount=NULL, $currency=NULL, $country=NULL,
		$mobilephone=NULL, $firstname=NULL, $lastname=NULL,
		$nationalidentificationnumber=NULL, $shopperstatement=NULL,
		$ip=NULL, $successurl=NULL, $failurl=NULL, $templateurl=NULL,
		$urltarget=NULL, $suggestedminamount=NULL, $suggestedmaxamount=NULL,
		$integrationmodule=NULL, $holdnotifications=NULL,
		$email=NULL, $shippingaddresscountry=NULL,
		$shippingaddresspostalcode=NULL, $shippingaddresscity=NULL,
		$shippingaddressline1=NULL, $shippingaddressline2=NULL,
		$shippingaddress=NULL, $unchangeablenationalidentificationnumber=NULL) {

			$data = array(
				'NotificationURL' => $notificationurl,
				'EndUserID' => $enduserid,
				'MessageID' => $messageid,
			);

			$attributes = array(
				'Locale' => $locale,
				'Amount' => $amount,
				'Currency' => $currency,
				'Country' => $country,
				'MobilePhone' => $mobilephone,
				'Firstname' => $firstname,
				'Lastname' => $lastname,
				'NationalIdentificationNumber' => $nationalidentificationnumber,
				'ShopperStatement' => $shopperstatement,
				'IP' => $ip,
				'SuccessURL' => $successurl,
				'FailURL' => $failurl,
				'TemplateURL' => $templateurl,
				'URLTarget' => $urltarget,
				'SuggestedMinAmount' => $suggestedminamount,
				'SuggestedMaxAmount' => $suggestedmaxamount,
				'IntegrationModule' => $integrationmodule,
				'Email' => $email,
				'ShippingAddressCountry' => $shippingaddresscountry,
				'ShippingAddressPostalcode' => $shippingaddresspostalcode,
				'ShippingAddressCity' => $shippingaddresscity,
				'ShippingAddressLine1' => $shippingaddressline1,
				'ShippingAddressLine2' => $shippingaddressline2,
				'ShippingAddress' => $shippingaddress,
			);

			if($holdnotifications) {
				$attributes['HoldNotifications'] = 1;
			}
			if($unchangeablenationalidentificationnumber) {
				$attributes['UnchangeableNationalIdentificationNumber'] = 1;
			}

			$request = new Trustly_Data_JSONRPCRequest('Deposit', $data, $attributes);
			return $this->call($request);
	}
public function deposit($notificationurl, $enduserid, $messageid,
		$locale=NULL, $amount=NULL, $currency=NULL, $country=NULL,
		$mobilephone=NULL, $firstname=NULL, $lastname=NULL,
		$nationalidentificationnumber=NULL, $shopperstatement=NULL,
		$ip=NULL, $successurl=NULL, $failurl=NULL, $templateurl=NULL,
		$urltarget=NULL, $suggestedminamount=NULL, $suggestedmaxamount=NULL,
		$integrationmodule=NULL, $holdnotifications=NULL,
		$email=NULL, $shippingaddresscountry=NULL,
		$shippingaddresspostalcode=NULL, $shippingaddresscity=NULL,
		$shippingaddressline1=NULL, $shippingaddressline2=NULL,
		$shippingaddress=NULL, $unchangeablenationalidentificationnumber=NULL) {

			$data = array(
				'NotificationURL' => $notificationurl,
				'EndUserID' => $enduserid,
				'MessageID' => $messageid,
			);

			$attributes = array(
				'Locale' => $locale,
				'Amount' => $amount,
				'Currency' => $currency,
				'Country' => $country,
				'MobilePhone' => $mobilephone,
				'Firstname' => $firstname,
				'Lastname' => $lastname,
				'NationalIdentificationNumber' => $nationalidentificationnumber,
				'ShopperStatement' => $shopperstatement,
				'IP' => $ip,
				'SuccessURL' => $successurl,
				'FailURL' => $failurl,
				'TemplateURL' => $templateurl,
				'URLTarget' => $urltarget,
				'SuggestedMinAmount' => $suggestedminamount,
				'SuggestedMaxAmount' => $suggestedmaxamount,
				'IntegrationModule' => $integrationmodule,
				'Email' => $email,
				'ShippingAddressCountry' => $shippingaddresscountry,
				'ShippingAddressPostalcode' => $shippingaddresspostalcode,
				'ShippingAddressCity' => $shippingaddresscity,
				'ShippingAddressLine1' => $shippingaddressline1,
				'ShippingAddressLine2' => $shippingaddressline2,
				'ShippingAddress' => $shippingaddress,
			);

			if($holdnotifications) {
				$attributes['HoldNotifications'] = 1;
			}
			if($unchangeablenationalidentificationnumber) {
				$attributes['UnchangeableNationalIdentificationNumber'] = 1;
			}

			$request = new Trustly_Data_JSONRPCRequest('Deposit', $data, $attributes);
			return $this->call($request);
	}
public function deposit ( $ notificationurl , $ enduserid , $ messageid , $ locale = NULL , $ amount = NULL , $ currency = NULL , $ country = NULL , $ mobilephone = NULL , $ firstname = NULL , $ lastname = NULL , $ nationalidentificationnumber = NULL , $ shopperstatement = NULL , $ ip = NULL , $ successurl = NULL , $ failurl = NULL , $ templateurl = NULL , $ urltarget = NULL , $ suggestedminamount = NULL , $ suggestedmaxamount = NULL , $ integrationmodule = NULL , $ holdnotifications = NULL , $ email = NULL , $ shippingaddresscountry = NULL , $ shippingaddresspostalcode = NULL , $ shippingaddresscity = NULL , $ shippingaddressline1 = NULL , $ shippingaddressline2 = NULL , $ shippingaddress = NULL , $ unchangeablenationalidentificationnumber = NULL ) { $ data = array ( 'NotificationURL' => $ notificationurl , 'EndUserID' => $ enduserid , 'MessageID' => $ messageid , ) ; $ attributes = array ( 'Locale' => $ locale , 'Amount' => $ amount , 'Currency' => $ currency , 'Country' => $ country , 'MobilePhone' => $ mobilephone , 'Firstname' => $ firstname , 'Lastname' => $ lastname , 'NationalIdentificationNumber' => $ nationalidentificationnumber , 'ShopperStatement' => $ shopperstatement , 'IP' => $ ip , 'SuccessURL' => $ successurl , 'FailURL' => $ failurl , 'TemplateURL' => $ templateurl , 'URLTarget' => $ urltarget , 'SuggestedMinAmount' => $ suggestedminamount , 'SuggestedMaxAmount' => $ suggestedmaxamount , 'IntegrationModule' => $ integrationmodule , 'Email' => $ email , 'ShippingAddressCountry' => $ shippingaddresscountry , 'ShippingAddressPostalcode' => $ shippingaddresspostalcode , 'ShippingAddressCity' => $ shippingaddresscity , 'ShippingAddressLine1' => $ shippingaddressline1 , 'ShippingAddressLine2' => $ shippingaddressline2 , 'ShippingAddress' => $ shippingaddress , ) ; if ( $ holdnotifications ) { $ attributes [ 'HoldNotifications' ] = 1 ; } if ( $ unchangeablenationalidentificationnumber ) { $ attributes [ 'UnchangeableNationalIdentificationNumber' ] = 1 ; } $ request = new Trustly_Data_JSONRPCRequest ( 'Deposit' , $ data , $ attributes ) ; return $ this -> call ( $ request ) ; }
Call the Deposit API Method.

Initiates a new deposit by generating a new OrderID and returning the
url where the end-user can complete the deposit.

@see https://trustly.com/en/developer/api#/deposit

@param string $notificationurl The URL to which notifications for this
payment should be sent to. This URL should be hard to guess and not
contain a ? ("question mark").

@param string $enduserid ID, username, hash or anything uniquely
identifying the end-user requesting the withdrawal. Preferably the
same ID/username as used in the merchant's own backoffice in order
to simplify for the merchant's support department.

@param string $messageid Your unique ID for the deposit.

@param string $locale The end-users localization preference in the
format [language[_territory]]. Language is the ISO 639-1 code and
territory the ISO 3166-1-alpha-2 code.

@param float $amount with exactly two decimals in the currency specified
by Currency. Do not use this attribute in combination with
SuggestedMinAmount or SuggestedMaxAmount. Only digits. Use dot (.)
as decimal separator.

@param string $currency The currency of the end-user's account in the
merchant's system.

@param string $country The ISO 3166-1-alpha-2 code of the end-user's
country. This will be used for preselecting the correct country for
the end-user in the iframe.

@param string $mobilephone The mobile phonenumber to the end-user in
international format. This is used for KYC and AML routines.

@param string $firstname The end-user's firstname. Useful for some banks
for identifying transactions.

@param string $lastname The end-user's lastname. Useful for some banks
for identifying transactions.

@param string $nationalidentificationnumber The end-user's social
security number / personal number / birth number / etc. Useful for
some banks for identifying transactions and KYC/AML.

@param string $shopperstatement The text to show on the end-user's bank
statement.

@param string $ip The IP-address of the end-user.

@param string $successurl The URL to which the end-user should be
redirected after a successful deposit. Do not put any logic on that
page since it's not guaranteed that the end-user will in fact visit
it.

@param string $failurl The URL to which the end-user should be
redirected after a failed deposit. Do not put any logic on that
page since it's not guaranteed that the end-user will in fact visit
it.

@param string $templateurl The URL to your template page for the
checkout process.

@param string $urltarget The html target/framename of the SuccessURL.
Only _top, _self and _parent are suported.

@param float $suggestedminamount The minimum amount the end-user is
allowed to deposit in the currency specified by Currency. Only
digits. Use dot (.) as decimal separator.

@param float $suggestedmaxamount The maximum amount the end-user is
allowed to deposit in the currency specified by Currency. Only
digits. Use dot (.) as decimal separator.

@param string $integrationmodule Version information for your
integration module. This is for informational purposes only and can
be useful when troubleshooting problems. Should contain enough
version information to be useful.

@param boolean $holdnotifications Do not deliver notifications for this
order. This is a parameter available when using test.trustly.com
and can be used for manually delivering notifications to your local
system during development. Intead you can get you notifications on
https://test.trustly.com/notifications.html . Never set this in the
live environment.

@param string $email The email address of the end user.

@param string $shippingaddresscountry The ISO 3166-1-alpha-2 code of the
shipping address country.
Shipping address should be provided for merchants sending
physical goods to customers. Use either these separated fields or
use the $shippingaddress field below if you do not keep separated
address fields.

@param string $shippingaddresspostalcode The postal code of the shipping
address.

@param string $shippingaddresscity The city of the shipping address.

@param string $shippingaddressline1 The first line of the shipping
address field.

@param string $shippingaddressline2 The second line of the shipping
address information.

@param string $shippingaddress The full shipping address. Use either the
separated fields or use this combined field if you do not keep
separated address fields.

@param string $unchangeablenationalidentificationnumber The supplied
$nationalidentificationnumber should be considered read only information
and will not be changable by end the enduser. Only valid in Sweden,
the $nationalidentification number needs to be well formed.

@return Trustly_Data_JSONRPCSignedResponse
Call the Deposit API Method .