* Copyright (c) 2012 SOFORT AG * * Released under the GNU General Public License (Version 2) * [http://www.gnu.org/licenses/gpl-2.0.html] * * $Date: 2012-11-21 12:02:12 +0100 (Wed, 21 Nov 2012) $ * @version SofortLib 1.5.0 $Id: example_sofortrechnung.php 5724 2012-11-21 11:02:12Z rotsch $ * @author SOFORT AG http://www.sofort.com (integration@sofort.com) * */ require_once '../../../library/sofortLib.php'; define('CONFIGKEY', '1111:2222:6f3d938b65eb833e695393985e1r13z79c'); //your configkey or userid:projektid:apikey $PnagInvoice = new PnagInvoice(CONFIGKEY); $PnagInvoice->setVersion('MY_VERSION'); $PnagInvoice->addInvoiceAddress('John', 'Doe', 'Street', '15', '35578', 'City', 2, 'Max Mustermann', '3 Stock', 'Firma ABC'); //try firstname 'success' or 'decline' as firstname $PnagInvoice->addShippingAddress('John', 'Doe', 'Street', '15', '35578', 'City', 2); $PnagInvoice->setReason('Invoice', 'Invoice'); $PnagInvoice->setOrderId('213124'); $PnagInvoice->setCustomerId('213124'); $PnagInvoice->setDebitorVatNumber('DE325236'); $PnagInvoice->setEmailCustomer('*****@*****.**'); $PnagInvoice->addItemToInvoice(md5('unique'), 'Art01', 'a simple title', 1.2, 0, 'a simple description', 6, 19); $PnagInvoice->setSuccessUrl('https://{website}/'); $PnagInvoice->setAbortUrl('https://{website}/'); $PnagInvoice->setTimeoutUrl('https://{website}/'); $PnagInvoice->setNotificationUrl('https://{website}/'); $err = $PnagInvoice->checkout(); $PnagInvoice->confirmInvoice($PnagInvoice->transactionId); if ($PnagInvoice->isError()) {
* Copyright (c) 2012 SOFORT AG * * Released under the GNU General Public License (Version 2) * [http://www.gnu.org/licenses/gpl-2.0.html] * * $Date: 2012-11-21 12:02:12 +0100 (Wed, 21 Nov 2012) $ * @version SofortLib 1.5.0 $Id: example_edit_cart.php 5724 2012-11-21 11:02:12Z rotsch $ * @author SOFORT AG http://www.sofort.com (integration@sofort.com) * */ require_once '../../../library/sofortLib.php'; define('CONFIGKEY', '1111:2222:6f3d938b65eb833e695393985e1r13z79c'); //your configkey or userid:projektid:apikey $PnagInvoice = new PnagInvoice(CONFIGKEY); $PnagInvoice->setVersion('MY_VERSION'); $PnagInvoice->addInvoiceAddress('success', 'Doe', 'Street', '15', '35578', 'City', 2, 'DE', 'Company Name'); $PnagInvoice->addShippingAddress('success', 'Doe', 'Street', '15', '35578', 'City', 2, 'DE', 'Company Name'); $PnagInvoice->setReason('Invoice', 'Invoice'); $PnagInvoice->setEmailCustomer('*****@*****.**'); $PnagInvoice->addItemToInvoice(md5('unique'), 'Art01', 'a simple title', 1.2, 0, 'a simple description', 6, 19); $PnagInvoice->setAbortUrl('http://127.0.0.1'); $PnagInvoice->setSuccessUrl('http://127.0.0.1'); $PnagInvoice->setTimeoutUrl('http://127.0.0.1'); $PnagInvoice->setNotificationUrl('http://127.0.0.1'); try { $err = $PnagInvoice->checkout(); getWebPage($PnagInvoice->getPaymentUrl()); } catch (XmlToArrayException $e) { } $transactionId = $PnagInvoice->getTransactionId(); $articles = array(array('articleId' => md5('unique'), 'articleNumber' => 'Art01', 'articleTitle' => 'a simple title', 'articlePrice' => 1.2, 'articleType' => 0, 'articleDescription' => 'a simple description', 'articleQuantity' => 2, 'articleTax' => 19));