# Paypal Plus Kauf auf Rechnung Iban/BIC Rest Api

**URL:** <https://forum.shopware.com/t/paypal-plus-kauf-auf-rechnung-iban-bic-rest-api/44771>\
**Category:** Plugins\
**Tags:** offizielle-shopware-\
**Created:** [24. März 2017 um 09:57 UTC](https://forum.shopware.com/t/paypal-plus-kauf-auf-rechnung-iban-bic-rest-api/44771 "2017-03-24T09:57:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timomayer](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@timomayer](https://forum.shopware.com/u/timomayer)\
**Post date:** [24. März 2017 um 09:57 UTC](https://forum.shopware.com/t/paypal-plus-kauf-auf-rechnung-iban-bic-rest-api/44771/1 "2017-03-24T09:57:17Z")

</div>

Hallo, ich suche eine Möglichkeit die Iban/BIC die Paypal Plus bei Kauf auf Rechnung übermittelt per RestAPI zu bekommen, gibt es da keine Möglichkeit?? Ich hätte gedacht Diese Daten werden im Order Endpunkt ergänzt was wohl nicht der Fall ist. Muss ich wirklich direkt auf die DB um Die Daten auszulesen :(?&nbsp;

Danke für eure Hilfe, Grüße Timo

---

<div class="post-metadata">

**Author:** ![Netzhirsch](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@Netzhirsch](https://forum.shopware.com/u/Netzhirsch)\
**Post date:** [17. August 2017 um 07:17 UTC](https://forum.shopware.com/t/paypal-plus-kauf-auf-rechnung-iban-bic-rest-api/44771/2 "2017-08-17T07:17:23Z")

</div>

Ich muss hier leider auch nochmal einhaken. Ich würde nämlich gerne auch auf diese Daten von unserer Faktura aus zugreifen.

---

<div class="post-metadata">

**Author:** ![supertester](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@supertester](https://forum.shopware.com/u/supertester)\
**Post date:** [19. Oktober 2017 um 13:57 UTC](https://forum.shopware.com/t/paypal-plus-kauf-auf-rechnung-iban-bic-rest-api/44771/3 "2017-10-19T13:57:38Z")

</div>

Hallo,

ich habe die Anzeige der Iban und des Verwendungszwecks mittels Rest Order&nbsp;wie folgt gelöst:

In der Tabelle s\_order die Rows &nbsp;x\_pp\_iban und x\_pp\_reference anlegen.

In der Datei engine\Shopware\Models\Order\Order.php diese referenzieren

&nbsp; &nbsp; /\*\*&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp; \* @var string $payPalIban  
&nbsp;&nbsp; &nbsp; \*  
&nbsp;&nbsp; &nbsp; \* @ORM\Column(name=“x\_pp\_iban”, type=“text”, nullable=false)  
&nbsp;&nbsp; &nbsp; \*/  
&nbsp; &nbsp; private $payPalIban; &nbsp;

&nbsp; &nbsp; /\*\*&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp; \* @var string $payPalReference  
&nbsp;&nbsp; &nbsp; \*  
&nbsp;&nbsp; &nbsp; \* @ORM\Column(name=“x\_pp\_reference”, type=“text”, nullable=false)  
&nbsp;&nbsp; &nbsp; \*/  
&nbsp; &nbsp; private $payPalReference;&nbsp;

Dann wird wie folgt der set/get Eintrag noch ergänzt

&nbsp;/\*\*  
&nbsp;&nbsp; &nbsp;\* Set payPalIban  
&nbsp;&nbsp; &nbsp;\*  
&nbsp;&nbsp; &nbsp;\* @param string $payPalIban  
&nbsp;&nbsp; &nbsp;\* @return Order  
&nbsp;&nbsp; &nbsp;\*/  
&nbsp;&nbsp; &nbsp;public function setPayPalIban($payPalIban)  
&nbsp;&nbsp; &nbsp;{  
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$this-\>payPalIban = $payPalIban;  
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return $this;  
&nbsp;&nbsp; &nbsp;}

&nbsp;&nbsp; &nbsp;/\*\*  
&nbsp;&nbsp; &nbsp;\* Get payPalIban  
&nbsp;&nbsp; &nbsp;\*  
&nbsp;&nbsp; &nbsp;\* @return string  
&nbsp;&nbsp; &nbsp;\*/  
&nbsp;&nbsp; &nbsp;public function getPayPalIban()  
&nbsp;&nbsp; &nbsp;{  
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return $this-\>payPalIban;  
&nbsp; &nbsp; }&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;  
&nbsp; &nbsp; /\*\*  
&nbsp;&nbsp; &nbsp;\* Set payPalReference  
&nbsp;&nbsp; &nbsp;\*  
&nbsp;&nbsp; &nbsp;\* @param string $payPalReference  
&nbsp;&nbsp; &nbsp;\* @return Order  
&nbsp;&nbsp; &nbsp;\*/  
&nbsp;&nbsp; &nbsp;public function setPayPalReference($payPalReference)  
&nbsp;&nbsp; &nbsp;{  
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$this-\>payPalIban = $payPalReference;  
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return $this;  
&nbsp;&nbsp; &nbsp;}

&nbsp;&nbsp; &nbsp;/\*\*  
&nbsp;&nbsp; &nbsp;\* Get payPalReference  
&nbsp;&nbsp; &nbsp;\*  
&nbsp;&nbsp; &nbsp;\* @return string  
&nbsp;&nbsp; &nbsp;\*/  
&nbsp;&nbsp; &nbsp;public function getPayPalReference()  
&nbsp;&nbsp; &nbsp;{  
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return $this-\>payPalReference;  
&nbsp; &nbsp; }&nbsp;&nbsp; &nbsp;

Nun fügen wir in der&nbsp;engine\Shopware\Components\Api\Recource\Order.php die Einträge für die Anzeige mittels Rest-Api hinzu:

&nbsp; &nbsp; public function prepareOrderData(array $params)  
&nbsp; &nbsp; {  
&nbsp; &nbsp; &nbsp; &nbsp; $params = $this-\>prepareOrderDetailsData($params);

&nbsp; &nbsp; &nbsp; &nbsp; $orderWhiteList = [  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘paymentStatusId’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘orderStatusId’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘trackingCode’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘comment’,  
**&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘payPalIban’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘payPalReference’,&nbsp;&nbsp;** &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘customerComment’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘internalComment’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘transactionId’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘clearedDate’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘attribute’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘details’,  
&nbsp; &nbsp; &nbsp; &nbsp; ];

und zum Schluß muss noch im PayPalPlus Plugin die Datei&nbsp;\engine\Shopware\Plugins\Community\Frontend\SwagPaymentPaypalPlus\Components\PaymentInstructionProvider.php

bei dem Abschnitt wo&nbsp;Shopware&nbsp;“internalComment”: "Paid with Paypal Invoice " einträgt, hab ich komplett entfernt, &nbsp;folgendes ergänzt werden

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$sql = ‘UPDATE &nbsp;s\_order  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SET x\_pp\_iban = CONCAT(x\_pp\_iban, :paypaliban)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE ordernumber = :orderNumber’;  
&nbsp; &nbsp; &nbsp; &nbsp; $this-\>db-\>query($sql, array(‘paypaliban’ =\> $instructions[‘recipient\_banking\_instruction’][‘international\_bank\_account\_number’], ‘orderNumber’ =\> $orderNumber));

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$sql = ‘UPDATE &nbsp;s\_order  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SET x\_pp\_reference = CONCAT(x\_pp\_reference, :paypalreference)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE ordernumber = :orderNumber’;  
&nbsp; &nbsp; &nbsp; &nbsp; $this-\>db-\>query($sql, array(‘paypalreference’ =\> $instructions[‘reference\_number’], ‘orderNumber’ =\> $orderNumber));

Das ganze ist natürlich alles andere als updatesicher&nbsp;aber da ich sowieso mit Perforce arbeite hält sich der Mehraufwand bei mir in Grenzen.

Eine ähnliche Lösung habe&nbsp;ich schon seit fast 2 Jahren mit&nbsp;Billpay im produktiven Betrieb, da war das Problem das Gleiche.

Der Output mittels Rest Order Abfrage sieht dann so aus:

“id”: 50,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“number”: “20021”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“customerId”: 1,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“paymentId”: 8,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“dispatchId”: 0,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“partnerId”: “”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“shopId”: 1,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“invoiceAmount”: 3,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“invoiceAmountNet”: 2.52,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“invoiceShipping”: 0,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“invoiceShippingNet”: 0,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“orderTime”: “2017-10-18T11:14:55+0200”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“transactionId”: “9DV729096B9777820”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“comment”: “”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“customerComment”: “”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“internalComment”: “”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“net”: 0,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“taxFree”: 0,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“temporaryId”: “8df1dc6673e0f20cf4543ed7f99a27599449335d”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“referer”: “”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“clearedDate”: “2017-10-18T11:14:55+0200”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“trackingCode”: “”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“languageIso”: “1”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“payPalIban”: “DE78120700888000126920”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“payPalReference”: “9DV729096B9777820”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“currency”: “EUR”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“currencyFactor”: 1,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“remoteAddress”: “192.168.0.169”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“deviceType”: “desktop”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“attribute”:

Dann viel Spass beim implementieren…

supertester

&nbsp;
