Skip to content

Commit

Permalink
Merge pull request #25 from trustly/api.trustly.com
Browse files Browse the repository at this point in the history
updated doc links and changed cert to api.trustly.com
  • Loading branch information
pontus-eliason authored Mar 13, 2024
2 parents ca43da4 + e909695 commit 61600e2
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand Down Expand Up @@ -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 */
);
Expand Down
6 changes: 3 additions & 3 deletions Trustly/Api/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down
File renamed without changes.
34 changes: 17 additions & 17 deletions Trustly/Api/signed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
*
Expand All @@ -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.
*
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand All @@ -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
Expand Down Expand Up @@ -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
*
Expand All @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion Trustly/Api/unsigned.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/www/php/example.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61600e2

Please sign in to comment.