UNPKG

eva-sdk-js

Version:
132 lines (130 loc) 4.78 kB
<html> <p>Paying for an <code>Order</code> is in most cases a two step process:</p> <ol> <li>List the available payment methods</li> <li>Create a payment.</li> </ol> <h1 id="listing-available-payment-methods">Listing available payment methods</h1> <p>To list the available payment methods for the current order the <code>GetAvailablePaymentMethodsService</code> should be called. It returns an array of available payment codes.</p> <h1 id="creating-a-payment">Creating a payment</h1> <p>To create a new payment the <code>CreatePaymentService</code> should be called:</p> <pre><code>{ int OrderID string Code //PaymentMethod code decimal Amount //Optional amount to pay, if not set the open amount will be used object Properties //Payment method specific properties }</code></pre> <p>Response</p> <pre><code>{ PaymentTransactionDto PaymentTransaction decimal OpenAmount object Properties }</code></pre> <p>For a couple of payment methods there are specific request and/or response properties. These are defined below.</p> <h2 id="payment-methods">Payment methods</h2> <h3 id="harmonycredit">HarmonyCredit</h3> <p>The harmony credit payment is used to pay for an order with a <code>Waardebrief</code>. The <code>ReferenceNumber</code> and <code>PolicyNumber</code> are used to validate the payment against Harmony.</p> <p>RequestProperties</p> <pre><code>{ string ReferenceNumber string PolicyNumber }</code></pre> <p>ResultProperties</p> <pre><code>{}</code></pre> <h3 id="intersolve">Intersolve</h3> <p>This payment method is used to pay with a giftcard from Intersolve. If a <code>Pin</code> is provided on the card, it is required for the validation. If the payment fails the result message is available on the <code>Message</code> property.</p> <p>RequestProperties</p> <pre><code>{ string CardNumber string Pin }</code></pre> <p>ResultProperties</p> <pre><code>{ bool Success string Message }</code></pre> <h3 id="mediamarkt">MediaMarkt</h3> <p>The MediaMarkt payment method is only available in the MediaMarkt application. It will always pay the complete order.</p> <p>RequestProperties</p> <pre><code>{}</code></pre> <p>ResultProperties</p> <pre><code>{}</code></pre> <h3 id="acapture">Acapture</h3> <p>This payment method provides support for ideal, paypal and creditcard payments.<br /> TODO: add some docs for ideal/creditcard</p> <p>RequestProperties</p> <pre><code>{ string PaymentBrand // AMEX/MAESTRO/MASTER/VISA/VPAY/IDEAL/PAYPAL object Card { string Holder string Number string ExpiryMonth string ExpiryYear string CVV } object VirtualAccount { //Username/password for PayPal string AccountID string Password } object BankAccount { string Holder string BankName string Number string IBAN string BankCode string BIC string Counrty string MandateID DateTime MandateDateOfSignature DateTime DueDate } string ReturlUrl //Url to redirect the user after the payment }</code></pre> <p>ResultProperties</p> <pre><code>{ string AcapturePaymentID string RedirectUrl string[] RedirectParameters bool Success string ResultCode string ResultDescription }</code></pre> <h3 id="cash">Cash</h3> <p>In a store the payment method Cash can be used. The <code>AmountGiven</code> is the exact amount given by the customer. The API will calculate the rounding and the amount to return to the customer. If the payment is a return, the <code>AmountGiven</code> is <code>0</code>.</p> <p>RequestProperties</p> <pre><code>{ decimal AmountGiven //Amount given by the customer int StationID }</code></pre> <p>ResultProperties</p> <pre><code>{ decimal RawReturnAmount decimal RoundedReturnAmount //Exact amount to give back to the customer }</code></pre> <h3 id="manual">Manual</h3> <p>Manual payments are only available for Debtors.<br /> RequestProperties</p> <pre><code>{}</code></pre> <p>ResultProperties</p> <pre><code>{}</code></pre> <h3 id="usercard">UserCard</h3> <p>When a customer has an EVA usercard available, it can be used to pay for an order. The cards can be listed with the <code>GetUserCardsForUserService</code>.<br /> A UserCard payment will be created as a pending payment and needs to be finalized with the <code>FinalizePaymentService</code>.</p> <p>RequestProperties</p> <pre><code>{ int UserID int UserCardID }</code></pre> <p>ResultProperties</p> <pre><code>{}</code></pre> <h3 id="pin">Pin</h3> <p>RequestProperties</p> <pre><code>{}</code></pre> <p>ResultProperties</p> <pre><code>{}</code></pre> <h3 id="verificationpin">VerificationPin</h3> <p>RequestProperties</p> <pre><code>{}</code></pre> <p>ResultProperties</p> <pre><code>{}</code></pre> </html>