Hi
Ich benötige unbedingt sofortüberweisung als Payment Gateway für Nexus. Ich betreibe einen Shop und verkaufe virtuelle Güter (Gamecards & CD-Keys) und möchte diesen Shop jetzt in die Community integrieren. Sofortüberweisung hat den Vorteil, dass ich eine Zahlungsgarantie habe, denn ich will die Produkte sofort nach Bezahlung automatisch versenden.
Ich kann einigermassen (hobbymässig) mit PHP & Co umgehen. Aber ein Payment Gateway hab ich noch nie entwickelt. Ich hoffe ich erhalte hier Unterstützung.
Hier ist erst mal ein kleines Tutorial, wie man ein neues PG (Payment Gateway) erstellt:
http://www.invisionpower.com/support/guides/_/advanced-and-developers/ipnexus/how-to-create-your-own-payment-gateway-r129
Das hab ich nun auch getan.
Das neue Gateway "sofortueberweisung" ist erstellt und installiert.
Hier ist die Doku zu sofortüberweisung (Eigene Integration):
https://integration.sofort.com/shopschnittstellen/
Direktlink PDF:
https://integration.sofort.com/content/download/1027/14507/file/Schnittstellenbeschreibung_SOFORT_U%CC%88berweisung.pdf
Direktlink Sofort Library:
https://integration.sofort.com/content/download/1041/14575/file/SofortLib_1.5.1.zip
Die Lib hab ich auch installiert.
So sieht meine klasse nun aus:
require_once('libs/sofort/sofortLib.php');
class gateway_sofortueberweisung extends gatewayCore
{
//ich will nur EUR anbieten und eine Bestellung darf max 150.00 EUR betragen
public $maxAmounts = array(
"EUR" => 150,
);
//ssl ist bei der umleitung auf sofortüberweisung aktiv. in meinem forum aber nicht. also ist true nun korrekt?
public $requireHttps = true;
//übergeben muss ich eigentlich nichts, tu es aber zum test
public $requireInfo = array( "cm_first_name", "cm_last_name" );
public function payScreen()
{
$sofort = new SofortLib_Multipay('?????:??????:????????????????????????????????'); //hier ist natürlich mein richtiger key drin
$sofort->setSofortueberweisung();
$sofort->setAmount(29.90, 'EUR'); //zum test mal 29.90 eur
$sofort->setReason('Mein Shop', 'verwendungszweck 2');
$sofort->setSenderAccount('88888888', '12345678', 'Max Mustermann');
$sofort->setSuccessUrl('http://www.meinedomain.net/');
$sofort->setAbortUrl('http://www.meinedomain.net/');
$sofort->setTimeoutUrl('http://www.meinedomain.net/');
$sofort->setNotificationUrl('http://www.meinedomain.net/');
$sofort->sendRequest();
}
//versteh ich nicht!
public function validatePayment()
{
return array( 'status' => "hold", 'amount' => 10, 'note' => "Hello, World!", 'publicNote' => "Hello, World!", 'gw_id' => 12345, 'extra' => array( "foo" => "bar" ) );
}
//muss ich hier einbauen, wie es die produkte automatisch ausliefert?
public function paidInformation( $transaction, $items )
{
// This method is optional
}
}
Ich komme da einfach nicht weiter!
Vielleicht mache ich auch alles falsch -.-
Hoffe ihr könnt mir helfen.
Wenn ich so eine Bestellung ausführe und auf "confirm my order" klicke erscheint:
Warning: Default data handler used. The data passed was: in /home/???/public_html/???/admin/applications_addon/ips/nexus/sources/gateways/libs/sofort/helper/xml_to_array.php on line 128