diff --git a/examples/ExpressCheckoutCreate.php b/examples/GatewayCreate.php similarity index 51% rename from examples/ExpressCheckoutCreate.php rename to examples/GatewayCreate.php index 43c99b8..ab5a801 100644 --- a/examples/ExpressCheckoutCreate.php +++ b/examples/GatewayCreate.php @@ -18,38 +18,38 @@ $payrexx = new \Payrexx\Payrexx($instanceName, $secret); -$expressCheckout = new \Payrexx\Models\Request\ExpressCheckout(); +$gateway = new \Payrexx\Models\Request\Gateway(); // amount multiplied by 100 -$expressCheckout->setAmount(89.25 * 100); +$gateway->setAmount(89.25 * 100); // currency ISO code -$expressCheckout->setCurrency('CHF'); +$gateway->setCurrency('CHF'); //success and failed url in case that merchant redirects to payment site instead of using the modal view -$expressCheckout->setSuccessRedirectUrl('https://www.merchant-website.com/success'); -$expressCheckout->setFailedRedirectUrl('https://www.merchant-website.com/failed'); +$gateway->setSuccessRedirectUrl('https://www.merchant-website.com/success'); +$gateway->setFailedRedirectUrl('https://www.merchant-website.com/failed'); // optional: payment service provider(s) to use (see http://developers.payrexx.com/docs/miscellaneous) // empty array = all available psps -$expressCheckout->setPsp(array()); +$gateway->setPsp(array()); // optional: reference id of merchant (e. g. order number) -$expressCheckout->setReferenceId(975382); +$gateway->setReferenceId(975382); // optional: add contact information which should be stored along with payment -$expressCheckout->addField($type = 'title', $value = 'mister'); -$expressCheckout->addField($type = 'forename', $value = 'Maximilian'); -$expressCheckout->addField($type = 'surname', $value = 'Pichler'); -$expressCheckout->addField($type = 'company', $value = 'Pichler Solutions'); -$expressCheckout->addField($type = 'street', $value = 'Seeweg 123'); -$expressCheckout->addField($type = 'postcode', $value = '1234'); -$expressCheckout->addField($type = 'place', $value = 'Englach'); -$expressCheckout->addField($type = 'country', $value = 'AT'); -$expressCheckout->addField($type = 'phone', $value = '+43123456789'); -$expressCheckout->addField($type = 'email', $value = 'info@pichler-solutions.com'); -$expressCheckout->addField($type = 'date_of_birth', $value = '03.06.1985'); -$expressCheckout->addField($type = 'custom_field_1', $value = '123456789', $name = array( +$gateway->addField($type = 'title', $value = 'mister'); +$gateway->addField($type = 'forename', $value = 'Maximilian'); +$gateway->addField($type = 'surname', $value = 'Pichler'); +$gateway->addField($type = 'company', $value = 'Pichler Solutions'); +$gateway->addField($type = 'street', $value = 'Seeweg 123'); +$gateway->addField($type = 'postcode', $value = '1234'); +$gateway->addField($type = 'place', $value = 'Englach'); +$gateway->addField($type = 'country', $value = 'AT'); +$gateway->addField($type = 'phone', $value = '+43123456789'); +$gateway->addField($type = 'email', $value = 'info@pichler-solutions.com'); +$gateway->addField($type = 'date_of_birth', $value = '03.06.1985'); +$gateway->addField($type = 'custom_field_1', $value = '123456789', $name = array( 1 => 'Benutzerdefiniertes Feld (DE)', 2 => 'Benutzerdefiniertes Feld (EN)', 3 => 'Benutzerdefiniertes Feld (FR)', @@ -57,7 +57,7 @@ )); try { - $response = $payrexx->create($expressCheckout); + $response = $payrexx->create($gateway); var_dump($response); } catch (\Payrexx\PayrexxException $e) { print $e->getMessage(); diff --git a/examples/ExpressCheckoutDelete.php b/examples/GatewayDelete.php similarity index 83% rename from examples/ExpressCheckoutDelete.php rename to examples/GatewayDelete.php index 6707c9f..8be1756 100644 --- a/examples/ExpressCheckoutDelete.php +++ b/examples/GatewayDelete.php @@ -18,11 +18,11 @@ $payrexx = new \Payrexx\Payrexx($instanceName, $secret); -$expressCheckout = new \Payrexx\Models\Request\ExpressCheckout(); -$expressCheckout->setId(1); +$gateway = new \Payrexx\Models\Request\Gateway(); +$gateway->setId(1); try { - $response = $payrexx->delete($expressCheckout); + $response = $payrexx->delete($gateway); var_dump($response); } catch (\Payrexx\PayrexxException $e) { print $e->getMessage(); diff --git a/examples/ExpressCheckoutGetOne.php b/examples/GatewayGetOne.php similarity index 83% rename from examples/ExpressCheckoutGetOne.php rename to examples/GatewayGetOne.php index 17a8f81..a2038ff 100644 --- a/examples/ExpressCheckoutGetOne.php +++ b/examples/GatewayGetOne.php @@ -18,11 +18,11 @@ $payrexx = new \Payrexx\Payrexx($instanceName, $secret); -$expressCheckout = new \Payrexx\Models\Request\ExpressCheckout(); -$expressCheckout->setId(1); +$gateway = new \Payrexx\Models\Request\Gateway(); +$gateway->setId(1); try { - $response = $payrexx->getOne($expressCheckout); + $response = $payrexx->getOne($gateway); var_dump($response); } catch (\Payrexx\PayrexxException $e) { print $e->getMessage(); diff --git a/lib/Payrexx/Models/Request/ExpressCheckout.php b/lib/Payrexx/Models/Request/Gateway.php similarity index 97% rename from lib/Payrexx/Models/Request/ExpressCheckout.php rename to lib/Payrexx/Models/Request/Gateway.php index 0a63508..75439ca 100644 --- a/lib/Payrexx/Models/Request/ExpressCheckout.php +++ b/lib/Payrexx/Models/Request/Gateway.php @@ -3,13 +3,13 @@ namespace Payrexx\Models\Request; /** - * Express Checkout request class + * Gateway request class * * @copyright Payrexx AG * @author Payrexx Development Team * @package \Payrexx\Models\Request */ -class ExpressCheckout extends \Payrexx\Models\Base +class Gateway extends \Payrexx\Models\Base { /** @@ -228,7 +228,7 @@ public function setFailedRedirectUrl($failedRedirectUrl) */ public function getResponseModel() { - return new \Payrexx\Models\Response\ExpressCheckout(); + return new \Payrexx\Models\Response\Gateway(); } } diff --git a/lib/Payrexx/Models/Response/ExpressCheckout.php b/lib/Payrexx/Models/Response/Gateway.php similarity index 94% rename from lib/Payrexx/Models/Response/ExpressCheckout.php rename to lib/Payrexx/Models/Response/Gateway.php index abbd021..ce2683d 100644 --- a/lib/Payrexx/Models/Response/ExpressCheckout.php +++ b/lib/Payrexx/Models/Response/Gateway.php @@ -3,13 +3,13 @@ namespace Payrexx\Models\Response; /** - * Express Checkout response class + * Gateway response class * * @copyright Payrexx AG * @author Payrexx Development Team * @package \Payrexx\Models\Response */ -class ExpressCheckout extends \Payrexx\Models\Request\ExpressCheckout +class Gateway extends \Payrexx\Models\Request\Gateway { /**