Trustly/Api/signed.php
public function withdraw($notificationurl, $enduserid, $messageid,
		$locale=NULL, $currency=NULL, $country=NULL,
		$mobilephone=NULL, $firstname=NULL, $lastname=NULL,
		$nationalidentificationnumber=NULL, $clearinghouse=NULL,
		$banknumber=NULL, $accountnumber=NULL, $holdnotifications=NULL,
		$email=NULL, $dateofbirth=NULL,
		$addresscountry=NULL, $addresspostalcode=NULL,
		$addresscity=NULL, $addressline1=NULL,
		$addressline2=NULL, $address=NULL) {

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

			$attributes = array(
				'Locale' => $locale,
				'Country' => $country,
				'MobilePhone' => $mobilephone,
				'Firstname' => $firstname,
				'Lastname' => $lastname,
				'NationalIdentificationNumber' => $nationalidentificationnumber,
				'ClearingHouse' => $clearinghouse,
				'BankNumber' => $banknumber,
				'AccountNumber' => $accountnumber,
				'Email' => $email,
				'DateOfBirth' => $dateofbirth,
				'AddressCountry' => $addresscountry,
				'AddressPostalcode' => $addresspostalcode,
				'AddressCity' => $addresscity,
				'AddressLine1' => $addressline1,
				'AddressLine2' => $addressline2,
				'Address' => $address,
			);

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

			$request = new Trustly_Data_JSONRPCRequest('Withdraw', $data, $attributes);
			return $this->call($request);
	}
public function withdraw($notificationurl, $enduserid, $messageid,
		$locale=NULL, $currency=NULL, $country=NULL,
		$mobilephone=NULL, $firstname=NULL, $lastname=NULL,
		$nationalidentificationnumber=NULL, $clearinghouse=NULL,
		$banknumber=NULL, $accountnumber=NULL, $holdnotifications=NULL,
		$email=NULL, $dateofbirth=NULL,
		$addresscountry=NULL, $addresspostalcode=NULL,
		$addresscity=NULL, $addressline1=NULL,
		$addressline2=NULL, $address=NULL) {

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

			$attributes = array(
				'Locale' => $locale,
				'Country' => $country,
				'MobilePhone' => $mobilephone,
				'Firstname' => $firstname,
				'Lastname' => $lastname,
				'NationalIdentificationNumber' => $nationalidentificationnumber,
				'ClearingHouse' => $clearinghouse,
				'BankNumber' => $banknumber,
				'AccountNumber' => $accountnumber,
				'Email' => $email,
				'DateOfBirth' => $dateofbirth,
				'AddressCountry' => $addresscountry,
				'AddressPostalcode' => $addresspostalcode,
				'AddressCity' => $addresscity,
				'AddressLine1' => $addressline1,
				'AddressLine2' => $addressline2,
				'Address' => $address,
			);

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

			$request = new Trustly_Data_JSONRPCRequest('Withdraw', $data, $attributes);
			return $this->call($request);
	}
public function withdraw ( $ notificationurl , $ enduserid , $ messageid , $ locale = NULL , $ currency = NULL , $ country = NULL , $ mobilephone = NULL , $ firstname = NULL , $ lastname = NULL , $ nationalidentificationnumber = NULL , $ clearinghouse = NULL , $ banknumber = NULL , $ accountnumber = NULL , $ holdnotifications = NULL , $ email = NULL , $ dateofbirth = NULL , $ addresscountry = NULL , $ addresspostalcode = NULL , $ addresscity = NULL , $ addressline1 = NULL , $ addressline2 = NULL , $ address = NULL ) { $ data = array ( 'NotificationURL' => $ notificationurl , 'EndUserID' => $ enduserid , 'MessageID' => $ messageid , 'Currency' => $ currency , 'Amount' => null ) ; $ attributes = array ( 'Locale' => $ locale , 'Country' => $ country , 'MobilePhone' => $ mobilephone , 'Firstname' => $ firstname , 'Lastname' => $ lastname , 'NationalIdentificationNumber' => $ nationalidentificationnumber , 'ClearingHouse' => $ clearinghouse , 'BankNumber' => $ banknumber , 'AccountNumber' => $ accountnumber , 'Email' => $ email , 'DateOfBirth' => $ dateofbirth , 'AddressCountry' => $ addresscountry , 'AddressPostalcode' => $ addresspostalcode , 'AddressCity' => $ addresscity , 'AddressLine1' => $ addressline1 , 'AddressLine2' => $ addressline2 , 'Address' => $ address , ) ; if ( $ holdnotifications ) { $ attributes [ 'HoldNotifications' ] = 1 ; } $ request = new Trustly_Data_JSONRPCRequest ( 'Withdraw' , $ data , $ attributes ) ; return $ this -> call ( $ request ) ; }
Call the Withdraw API Method.

Initiates a new withdrawal returning the url where the end-user can
complete the process.

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

@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 withdrawal.

@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 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. Some banks require
the recipients name.

@param string $lastname The end-user's lastname. Some banks require the
recipients name.

@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 $clearinghouse The clearing house of the end-user's bank
account. Typically the name of a country in uppercase but might
also be IBAN. This will be used to automatically fill-in the
withdrawal form for the end-user.

@param string $banknumber The bank number identifying the end-user's
bank in the given clearing house. This will be used to
automatically fill-in the withdrawal form for the end-user.

@param string $accountnumber The account number, identifying the
end-user's account in the bank. This will be used to automatically
fill-in the withdrawal form for the end-user. If using Spanish
Banks, send full IBAN number in this attribute.

@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

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

@param string $dateofbirth The ISO 8601 date of birth of the end user.

@param string $addresscountry The ISO 3166-1-alpha-2 code of the
account holders country.
Use either these separated fields or use the $address field below
if you do not keep separated address fields.

@param string $addresspostalcode The postal code of the account holder
address.

@param string $addresscity The city of the account holder address.

@param string $addressline1 The first line of the account holder
address field.

@param string $addressline2 The second line of the account holder
address information.

@param string $address The account holders address

@return Trustly_Data_JSONRPCSignedResponse
Call the Withdraw API Method .