This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:girocheckout:paypal:start [2014/05/14 14:32] jeromejung created |
en:girocheckout:paypal:start [2023/05/08 04:17] (current) michaelheumann |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== PayPal ====== | ====== PayPal ====== | ||
- | Information about credit card payent can be found under https:// | ||
- | ===== test data ===== | ||
- | For testing purpose there runs a PayPal sumulation page. After initialisation of a PayPal payent the buyer is redirected to a simulation page. There can be chosed if the transaction should be finished successfully or unsuccessfully. | ||
- | **Transaktionsausgang** | + | ===== Test data ===== |
+ | {{page> | ||
- | ^ResultCode | + | ===== Workflow |
- | |4000 |successful transaction | The payment result can be chosen in the simulation page. | | + | |
- | |4900 |unsuccessful transaction | The payment result can be chosen in the simulation page. | | + | |
- | + | ||
- | ===== workflow | + | |
<uml> | <uml> | ||
Line 45: | Line 39: | ||
- buyer chooses PayPal payment method | - buyer chooses PayPal payment method | ||
- | - merchant | + | - merchant |
- | - GiroCheckout | + | - GiroCheckout |
- PayPal submits response to GiroCheckout | - PayPal submits response to GiroCheckout | ||
- | - merchant gets response about initialisation | + | - merchant gets response about initialization |
- merchant sends redirect URL to buyer | - merchant sends redirect URL to buyer | ||
- the buyer' | - the buyer' | ||
Line 55: | Line 49: | ||
- transaction is beeing processed | - transaction is beeing processed | ||
- PayPal submits payment result to GiroCheckout | - PayPal submits payment result to GiroCheckout | ||
- | - GiroCheckout notifies merchant about the payment result ([[en: | + | - GiroCheckout notifies merchant about the payment result ([[en: |
- merchant processes result | - merchant processes result | ||
- merchant sends HTTP statuscode to GiroCheckout | - merchant sends HTTP statuscode to GiroCheckout | ||
- GiroCheckout sends merchants redirect page to PayPal | - GiroCheckout sends merchants redirect page to PayPal | ||
- | - buyer clicks "back to the shop" and gets redirected to the merchant ([[en: | + | - buyer clicks "back to the shop" and gets redirected to the merchant ([[en: |
===== API functions ===== | ===== API functions ===== | ||
- | ==== overview | + | ==== Overview |
As shown in the workflow there are different API calls during a PayPal transaction. | As shown in the workflow there are different API calls during a PayPal transaction. | ||
- | - initialise | + | - Initialize |
- | - payment | + | - Payment |
- | - buyer redirection to the merchant (triggered by buyer) | + | - Buyer redirection to the merchant (triggered by buyer) |
+ | ==== Initialize PayPal payment ==== | ||
+ | Towards a successful initialization you receive a reference number and an redirect link. The redirect link leads to the payment page of PayPal. He has to be redirected. This can be achieved by a HTTP-Redirect-Header, | ||
- | + | === Request | |
- | + | ||
- | ==== initialise PayPal payment ==== | + | |
- | + | ||
- | Torwards a successful initialisation you receive a reference number and an redirect link. The redirect link leads to the payment page of PayPal. He has to be redirected. This can be achieved by a HTTP-Redirect-Header, | + | |
- | + | ||
- | === request | + | |
**URL:** https:// | **URL:** https:// | ||
**provided by:** GiroCheckout \\ | **provided by:** GiroCheckout \\ | ||
**called by:** merchant | **called by:** merchant | ||
- | == parameters == | + | == POST parameters == |
- | ^name ^mandatory | + | ^Name ^Mandatory |
|merchantId | |merchantId | ||
|projectId | |projectId | ||
- | |merchantTxId | + | |merchantTxId |
|amount | |amount | ||
|currency | |currency | ||
|purpose | |purpose | ||
- | |locale | + | |type |optional |
- | |mobile | + | |urlRedirect |
- | |pkn |optional |String(50) | + | |urlNotify |
- | |recurring | + | |kassenzeichen |
- | |urlRedirect | + | |hash |
- | |urlNotify | + | |
- | |hash | + | |
- | == example | + | == Example |
- | {{page> | + | {{page> |
- | === reply === | + | === Reply === |
- | The reply includes a JSON encoded string. The field rc contains the response code. If it is 0 the transaction was successfully | + | The reply includes a JSON encoded string. The field rc contains the response code. If it is 0 the transaction was successfully |
== Parameter == | == Parameter == | ||
^name | ^name | ||
- | |rc | + | |rc |
- | |msg |yes | + | |msg |yes |
- | |reference | + | |reference |
- | |redirect | + | |redirect |
- | |hash | + | ^HEADER parameter^^^^ |
+ | |hash | ||
- | == example | + | == Example |
- | {{page> | + | {{page> |
- | + | ||
- | == example in case of error == | + | |
- | {{page> | + | |
+ | == Example in case of error == | ||
+ | {{page> | ||
- | ==== notification | + | ==== Notification |
- | The result of a initialised | + | The result of an initialized |
- | Due to the internal payment process, a redirection of the customer to urlRedirect is not done automatically but only after a customer click. | + | |
- | === request | + | === Request |
**URL:** notifyUrl of the prior init transaction call \\ | **URL:** notifyUrl of the prior init transaction call \\ | ||
**provided by:** merchant \\ | **provided by:** merchant \\ | ||
Line 139: | Line 126: | ||
== GET parameter == | == GET parameter == | ||
^name | ^name | ||
- | |gcReference | + | |gcReference |
- | |gcMerchantTxId | + | |gcMerchantTxId |
- | |gcBackendTxId | + | |gcBackendTxId |
- | |gcAmount | + | |gcAmount |
- | |gcCurrency | + | |gcCurrency |
- | |gcResultPayment | + | |gcResultPayment |
- | |gcHash | + | |gcHash |
- | === reply === | + | === Reply === |
As a reply to the GET request, one of the following HTTP status codes is expected. | As a reply to the GET request, one of the following HTTP status codes is expected. | ||
Line 155: | Line 142: | ||
|all others | |all others | ||
- | ==== redirection | + | ==== Redirection |
After completing the payment, the customer may return to the merchant through a link. This return is not done automatically. | After completing the payment, the customer may return to the merchant through a link. This return is not done automatically. | ||
- | === request | + | === Request |
**URL:** redirectUrl of the prior init transaction call \\ | **URL:** redirectUrl of the prior init transaction call \\ | ||
**provided by:** merchant \\ | **provided by:** merchant \\ | ||
Line 165: | Line 152: | ||
== GET parameter == | == GET parameter == | ||
^name | ^name | ||
- | |gcReference | + | |gcReference |
- | |gcMerchantTxId | + | |gcMerchantTxId |
- | |gcBackendTxId | + | |gcBackendTxId |
- | |gcAmount | + | |gcAmount |
- | |gcCurrency | + | |gcCurrency |
- | |gcResultPayment | + | |gcResultPayment |
- | |gcHash | + | |gcHash |
+ | ===== Other transaction types ===== | ||
+ | These transactions reference a previous transaction. | ||
+ | **Provided by:** GiroCheckout \\ | ||
+ | **Called by:** Merchant \\ | ||
+ | ==== Workflow ==== | ||
+ | <uml> | ||
+ | hide footbox | ||
- | ==== Initialisierung einer PayPal Zahlung ==== | + | participant " |
+ | participant " | ||
+ | participant " | ||
- | Durch eine erfolgreiche Initialisierung wird eine Referenznummer erstellt sowie ein Weiterleitunsurl (redirect) an den Händler übermittelt. Der Kunde muss an diese URL weitergeleitet werden. Dies kann durch einen HTTP-Redirect-Header, | + | autonumber |
- | === Anfrage === | + | shop -> girocheckout: |
- | **URL:** https:// | + | girocheckout |
- | **Bereitzustellen von:** GiroCheckout \\ | + | cc -> girocheckout: |
- | **Aufzurufen von:** Händler | + | girocheckout -> shop: |
- | == Parameter == | + | center footer |
- | ^Name | + | </uml> |
- | |merchantId | + | |
- | |projectId | + | |
- | |merchantTxId | + | |
- | |amount | + | |
- | |currency | + | |
- | |purpose | + | |
- | |urlRedirect | + | |
- | |urlNotify | + | |
- | |hash | + | |
- | + | ||
- | == Beispiel == | + | |
- | {{page>codesamples: | + | |
- | + | ||
- | + | ||
- | === Antwort === | + | |
- | Die Antwort besteht aus einem JSON Objekt. Das Feld rc liefert einen Fehlercode zurück. Wird rc = 0 zurückgeliefert, | + | |
- | + | ||
- | == Parameter == | + | |
- | ^Name | + | |
- | |rc | + | |
- | |msg |Ja | + | |
- | |reference | + | |
- | |redirect | + | |
- | + | ||
- | == Beispiel im Erfolgsfall == | + | |
- | {{page> | + | |
- | + | ||
- | == Beispiel im Fehlerfall == | + | |
- | {{page> | + | |
- | + | ||
- | + | ||
- | ==== Benachrichtigung über den Zahlungsausgang ==== | + | |
- | + | ||
- | Der Ausgang einer Zahlung wird, an die im // | + | |
- | Der Zahlungausgang einer Transaktion steht im Feld gcResultPayment. | + | - Shop sends reference to previous credit card transaction |
+ | - GiroCheckout sends transaction to credit card processor | ||
+ | - credit card processor transmits result to GiroCheckout | ||
+ | - Shop receives reply on transaction outcome ([[en: | ||
- | Aufgrund des Zahlungsablaufes findet **keine automatische Rückleitung des Käufers** an die im Parameter // | + | ==== Capture ==== |
+ | {{page> | ||
+ | ==== Refund ==== | ||
+ | {{page> | ||
- | === Anfrage | + | === POST Parameters |
- | **URL:** notifyUrl aus der Transaktionsinitialisierung | + | URL CAPTURE: https:// |
- | **Bereitzustellen von:** Händler \\ | + | URL REFUND: https:// |
- | **Aufzurufen von:** GiroCheckout | + | |
- | == GET Parameter == | + | ^Name |
- | ^Name | + | |merchantId |
- | |gcReference | + | |projectId |
- | |gcMerchantTxId | + | |merchantTxId |
- | |gcBackendTxId | + | |amount |
- | |gcAmount | + | |currency |
- | |gcCurrency | + | |reference |
- | |gcResultPayment | + | |purpose |
- | |gcHash | + | |kassenzeichen |
+ | |hash |yes |String(32) |HMAC MD5 hash on the complete call. See [[en:girocheckout: | ||
- | === Antwort === | + | == Example |
- | Als Antwort auf den GET-Request wird einer der folgenden HTTP Statuscodes erwartet. | + | {{page> |
- | ^HTTP Statuscode | + | === Reply === |
- | |200 (OK) |Die Benachrichtigung wurde korrekt verarbeitet. | | + | The reply is a JSON encoded string. The field rc contains the response code. If it is 0 the transaction was successfully initialized. The response also includes a transaction id and other information about the transaction. |
- | |400 (Bad Request) | + | |
- | |Alle anderen | + | |
- | ==== Rückleitung des Kunden zum Händler ==== | + | == Parameters |
- | Nach Beendigung der Zahlung kann der Kunde über einen Link zurück zum Händler kommen. Eine Weiterleitung erfolgt erst, wenn der Käufer den „Abbrechen“ oder „Zurück zum Shop“ Button drückt. Diese Rückleitung erfolgt nicht automatisch. | + | ^Name |
+ | |rc | ||
+ | |msg |yes | ||
+ | |reference | ||
+ | |merchantTxId | ||
+ | |backendTxId | ||
+ | |amount | ||
+ | |currency | ||
+ | |resultPayment | ||
+ | ^HEADER parameter^^^^ | ||
+ | |hash | ||
- | === Anfrage | + | == Example in case of success |
- | **URL:** redirectUrl aus der Transaktionsinitialisierung \\ | + | {{page> |
- | **Bereitzustellen von:** Händler \\ | + | |
- | **Aufzurufen von:** GiroCheckout | + | |
- | == GET Parameter | + | == Example in case of error == |
- | ^Name | + | {{page> |
- | |gcReference | + | |
- | |gcMerchantTxId | + | |
- | |gcBackendTxId | + | |
- | |gcAmount | + | |
- | |gcCurrency | + | |
- | |gcResultPayment | + | |
- | |gcHash | + | |