<?php require_once '../vendor/autoload.php'; require_once 'config.php'; try { $result = Paynl\Alliance\Service::add(array('merchantId' => 'M-1699-0230', 'name' => 'Andy Test', 'description' => 'Andy Test Add service By Api', 'categoryId' => 9, 'url' => 'http://www.pay.nl', 'extraUrls' => array('http://www.admin.pay.nl', 'http://www.shop.pay.nl'), 'alwaysSendExchange' => true)); var_dump($result->getServiceId()); } catch (Exception $e) { echo "Error occurred: " . $e->getMessage(); }
<?php require_once '../vendor/autoload.php'; require_once 'config.php'; try { $success = Paynl\Alliance\Service::enablePaymentMethod(array('serviceId' => 'SL-2820-5610', 'paymentMethodId' => 739, 'settings' => array('merchantId' => 1234, 'merchantPassword' => 'p4ssw0rd', 'portefeuilleId' => '2'))); if ($success) { // enabling succeeded } } catch (Exception $e) { echo "Error occurred: " . $e->getMessage(); }
<?php require_once '../vendor/autoload.php'; require_once 'config.php'; try { $success = Paynl\Alliance\Service::disablePaymentMethod(array('serviceId' => 'SL-2820-5610', 'paymentMethodId' => 739)); } catch (Exception $e) { echo "Error occurred: " . $e->getMessage(); }
<?php require_once '../vendor/autoload.php'; require_once 'config.php'; try { $categories = Paynl\Alliance\Service::getCategories(); $data = $categories->getData(); var_dump($data); } catch (Exception $e) { echo "Error occurred: " . $e->getMessage(); }
<?php require_once '../vendor/autoload.php'; require_once 'config.php'; try { $result = Paynl\Alliance\Service::add(array('merchantId' => 'M-2892-7460', 'name' => 'Andy Test', 'description' => 'Andy Test Add service By Api', 'categoryId' => 9, 'url' => 'http://www.pay.nl', 'extraUrls' => array('http://www.admin.pay.nl', 'http://www.shop.pay.nl'), 'paymentOptions' => array(array('id' => 10, 'settings' => array()), array('id' => 739, 'settings' => array('merchantId' => 1234, 'merchantPassword' => 'p4ssw0rd', 'portefeuilleId' => '1'))), 'exchange' => array('useExchange' => 1, 'alwaysSendExchange' => 1, 'requestMethod' => 'POST', 'resultSeperator' => '|', 'retry' => 4, 'urls' => array('http://www.pay.nl/ex', 'https://www.pay.nl/ex2')))); var_dump($result->getServiceId()); } catch (Exception $e) { echo "Error occurred: " . $e->getMessage(); }