diff --git a/README.md b/README.md index d13d7fc..50d4870 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ PHP. It implements the standard Payments API as well as gives stubs for executing calls against the API used by the backoffice. For full documentation on the Trustly API internals visit our developer -website: http://trustly.com/developer . All information about software flows and +website: https://eu.developers.trustly.com/. All information about software flows and call patters can be found on that site. The documentation within this code will only cover the code itself, not how you use the Trustly API. @@ -25,7 +25,7 @@ Overview The code provided wrappers for calling the trustly API. Create an instance of the API call with you merchant criterias and use the stubs in that class for calling the API. The API will default to communicate with https://trustly.com, -override the `host` parameter for the constructor to comminicate with +override the `host` parameter for the constructor to communicate with test.trustly.com instead. When processing an incoming notification the `handleNotification()` method of the @@ -86,13 +86,13 @@ Example deposit call NULL, /* URLTarget */ NULL, /* SuggestedMinAmount */ NULL, /* SuggestedMaxAmount */ - 'trustly-client-php example/1.0' /* IntegrationModule */ + 'trustly-client-php example/1.0', /* IntegrationModule */ FALSE, /* HoldNotifications */ 'john.doe@example.com', /* Email */ 'SE', /* ShippingAddressCountry */ '12345', /* ShippingAddressPostalCode */ 'ExampleCity', /* ShippingAddressCity */ - '123 Main St' /* ShippingAddressLine1 */ + '123 Main St', /* ShippingAddressLine1 */ 'C/O Careholder', /* ShippingAddressLine2 */ NULL /* ShippingAddress */ ); diff --git a/Trustly/Api/api.php b/Trustly/Api/api.php index dc19354..c9fee7d 100644 --- a/Trustly/Api/api.php +++ b/Trustly/Api/api.php @@ -109,7 +109,7 @@ public function __construct($host='trustly.com', $port=443, $is_https=TRUE) { * hostname. When integrating with our public API this is typically * either 'test.trustly.com' or 'trustly.com'. * - * @param integer $port Port on API host used for communicaiton. Normally + * @param integer $port Port on API host used for communication. Normally * 443 for https, or 80 for http. * * @return boolean Indicating success or failure of loading the key for the current host. @@ -137,7 +137,7 @@ public function loadTrustlyPublicKey($host, $port) { /** * Serializes the given data in a form suitable for creating a signature. * - * @link https://trustly.com/en/developer/api#/signature + * @link https://eu.developers.trustly.com/doc/reference/authentication * * @param array $data Input data to serialize * @@ -165,7 +165,7 @@ public function serializeData($data) { * verify if the $signature is indeed valid for the $method, $uuid and * $data. * - * @link https://trustly.com/en/developer/api#/signature + * @link https://eu.developers.trustly.com/doc/reference/authentication * * @param string $method Method in the API call * diff --git a/Trustly/Api/keys/trustly.com.public.pem b/Trustly/Api/keys/api.trustly.com.public.pem similarity index 100% rename from Trustly/Api/keys/trustly.com.public.pem rename to Trustly/Api/keys/api.trustly.com.public.pem diff --git a/Trustly/Api/signed.php b/Trustly/Api/signed.php index 0bd2681..69d0b5b 100644 --- a/Trustly/Api/signed.php +++ b/Trustly/Api/signed.php @@ -105,7 +105,7 @@ public function loadMerchantPrivateKey($filename) { /** * Use this RSA private key for signing outgoing requests. * - * @see https://trustly.com/en/developer/api#/signature + * @see https://eu.developers.trustly.com/doc/reference/authentication * * @param string $cert Loaded private RSA key as a string */ @@ -320,7 +320,7 @@ public function call($request) { * 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 + * @see https://eu.developers.trustly.com/doc/reference/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 @@ -450,8 +450,8 @@ public function deposit($notificationurl, $enduserid, $messageid, $shippingaddresspostalcode=NULL, $shippingaddresscity=NULL, $shippingaddressline1=NULL, $shippingaddressline2=NULL, $shippingaddress=NULL, $unchangeablenationalidentificationnumber=NULL, - $accountid=NULL, $requestKYC=NULL - ) { + $accountid=NULL, $requestKYC=NULL + ) { $data = array( 'NotificationURL' => $notificationurl, @@ -508,7 +508,7 @@ public function deposit($notificationurl, $enduserid, $messageid, * * Refunds the customer on a previous deposit. * - * @see https://trustly.com/en/developer/api#/refund + * @see https://eu.developers.trustly.com/doc/reference/refund * * @param integer $orderid The OrderID of the initial deposit. * @@ -538,7 +538,7 @@ public function refund($orderid, $amount, $currency) { * Initiates a new withdrawal returning the url where the end-user can * complete the process. * - * @see https://trustly.com/en/developer/api#/withdraw + * @see https://eu.developers.trustly.com/doc/reference/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 @@ -672,7 +672,7 @@ public function withdraw($notificationurl, $enduserid, $messageid, * integration manager at Trustly if you want to enable automatic approval * of the withdrawals. * - * @see https://trustly.com/en/developer/api#/approvwwithdrawal + * @see https://eu.developers.trustly.com/doc/reference/approvewithdrawal * * @param integer $orderid The OrderID of the withdrawal to approve. * @@ -695,7 +695,7 @@ public function approveWithdrawal($orderid) { * integration manager at Trustly if you want to enable automatic approval * of the withdrawals * - * @see https://trustly.com/en/developer/api#/denywithdrawal + * @see https://eu.developers.trustly.com/doc/reference/denywithdrawal * * @param integer $orderid The OrderID of the withdrawal to deny. * @@ -717,7 +717,7 @@ public function denyWithdrawal($orderid) { * Initiates a new order where the end-user can select and verify one of * his/her bank accounts. * - * @see https://trustly.com/en/developer/api#/selectaccount + * @see https://eu.developers.trustly.com/doc/reference/selectaccount * * @param string $notificationurl The URL to which notifications for this * order should be sent to. This URL should be hard to guess and not @@ -810,7 +810,7 @@ public function selectAccount($notificationurl, $enduserid, $messageid, * Registers and verifies the format of an account to be used in * AccountPayout. * - * @see https://trustly.com/en/developer/api#/registeraccount + * @see https://eu.developers.trustly.com/doc/reference/registeraccount * * @param string $enduserid ID, username, hash or anything uniquely * identifying the end-user holding this account. Preferably the same @@ -903,7 +903,7 @@ public function registerAccount($enduserid, $clearinghouse, $banknumber, * account notification which is sent after a SelectAccount order has been * completed. * - * @see https://trustly.com/en/developer/api#/accountpayout + * @see https://eu.developers.trustly.com/doc/reference/accountpayout * * @param string $notificationurl The URL to which notifications for this * payment should be sent to. This URL should be hard to guess and not @@ -967,7 +967,7 @@ public function accountPayout($notificationurl, $accountid, $enduserid, * Initiates a new P2P transfer by generating a new OrderID and returning * an URL to which the end-user should be redirected. * - * @see https://trustly.com/en/developer/api#/p2p + * @see https://eu.developers.trustly.com/doc/reference/p2p * * @param string $notificationurl The URL to which notifications for this * payment should be sent to. This URL should be hard to guess and not @@ -1104,7 +1104,7 @@ public function p2p($notificationurl,$enduserid, $messageid, * Captures a previously completed Deposit where * Deposit.Attributes.AuthorizeOnly was set to 1 * - * @see https://trustly.com/en/developer/api#/capture + * @see https://eu.developers.trustly.com/doc/reference/capture * * @param integer $orderid The OrderID of the deposit to capture * @@ -1138,7 +1138,7 @@ public function capture($orderid, $amount, $currency) { * * Voids a previously completed Deposit where Deposit.Attributes.AuthorizeOnly was set to 1. * - * @see https://trustly.com/en/developer/api#/void + * @see https://eu.developers.trustly.com/doc/reference/void * * @param integer $orderid The OrderID of the deposit to void * @@ -1163,7 +1163,7 @@ public function void($orderid) { * * Initiates a new drect debit charge. * - * @see https://trustly.com/en/developer/api#/charge + * @see https://eu.developers.trustly.com/doc/reference/charge * * @param string $accountid The AccountID received from an account * notification with granted direct debit mandate from which the money @@ -1216,7 +1216,7 @@ public function charge($accountid, $notificationurl, $enduserid, $messageid, * * Get a list of withdrawals from an executed order. * - * @see https://trustly.com/en/developer/api#/getwithdrawals + * @see https://eu.developers.trustly.com/doc/reference/getwithdrawals * * @param integer $orderid The OrderID of the order to query * @@ -1228,7 +1228,7 @@ public function getWithdrawals($orderid) { 'OrderID' => $orderid, ); - $request = new Trustly_Data_JSONRPCRequest('getWithdrawals', $data); + $request = new Trustly_Data_JSONRPCRequest('GetWithdrawals', $data); return $this->call($request); } diff --git a/Trustly/Api/unsigned.php b/Trustly/Api/unsigned.php index 0cc0b88..c62d6b9 100644 --- a/Trustly/Api/unsigned.php +++ b/Trustly/Api/unsigned.php @@ -66,7 +66,7 @@ class Trustly_Api_Unsigned extends Trustly_Api { * hostname. When integrating with our public API this is typically * either 'test.trustly.com' or 'trustly.com'. * - * @param integer $port Port on API host used for communicaiton. Normally + * @param integer $port Port on API host used for communication. Normally * 443 for https, or 80 for http. * * @param bool $is_https Indicator wether the port on the API host expects diff --git a/example/www/php/example.php b/example/www/php/example.php index 9c0f548..a724170 100644 --- a/example/www/php/example.php +++ b/example/www/php/example.php @@ -248,7 +248,7 @@ function deposit() { * * All of the parameters below are document in the API * documentationf or the deposit call visit - * https://trustly.com/en/developer/api#/deposit for information on + * https://eu.developers.trustly.com/doc/reference/deposit for information on * the specifics of all of the parameters. A few tips below. * * EndUserID - Make sure this is something unique per enduser in