.. _buy_now_button: Buy Now Button ############## .. toctree:: :maxdepth: 3 .. contents:: :local: .. role:: ex .. role:: code Introduction ^^^^^^^^^^^^ | Buy Now Button integration is relevant for Connecting Party who has limited portfolio of products to sell. It is the easiest way to integrate with Payneteasy. This way of integration doesn’t require much technical effort. Buy Now Button integration also allows Connecting Party to exclude itself from storing, processing, or transmitting Payer’s cardholder data or other sensitive payment details. Such data is submitted by Payer on Payneteasy hosted customer details form and payment form in PCI DSS certified environment. | | See terms definitions in :ref:`Glossary`. | 1. Payer clicks on Buy Now Button, gets redirected to customer details form provided by Payment Gateway and submits customer data; .. image:: ../_static/images/buy_now_button/buy_now_form.png :alt: Buy Now Button Form :align: center :width: 550 2. Payers then gets redirected to payment form and submits payment (cardholder) data. .. image:: /_static/images/3ds_server_to_server_sale_flow/payment_form.png :alt: Payment Form :align: center :width: 550 3. Contextual data is gathered by Payneteasy to process the transaction, Payer stays on wait form until transaction is finished; .. image:: ../_static/images/buy_now_button/buy_now_button_wait.png :alt: Wait Form :align: center :width: 550 4. Payer’s browser gets redirected to the Connecting Party website to the resultant page. Required Parameters for Buy Now Button Integration ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Connecting Party provides to Payment Gateway support the following information for each product (item): Amount, Description, Final Redirect URL, Destination (purpose of payment) and Payment tool (payment method). | Payment Gateway provides to Connecting Party the Buy Now Button URLs for each product (item). URLs have the following format: .. list-table:: :widths: 50, 50 :header-rows: 1 :class: longtable * - Integration - Production * - :ex:`https://sandbox.payneteasy.com/paynet/api/v2/pay/ENDPOINTID/ITEMID` - :ex:`https://gate.payneteasy.com/paynet/api/v2/pay/ENDPOINTID/ITEMID` Buy Now Button Form Flow ^^^^^^^^^^^^^^^^^^^^^^^^ .. uml:: :align: center skinparam roundcorner 20 skinparam sequenceArrowThickness 2 skinparam ParticipantPadding 30 actor Payer as Customer participant "Connecting Party\nwebsite" as Merchant participant "Payment Gateway" as g autonumber Customer -> Merchant: Checkout activate Customer activate Merchant Customer <-- Merchant: Display Buy Now Button deactivate Merchant Customer -> g: Redirect to Buy Now Button form activate g g --> Customer: Return customer details form deactivate g g <- Customer: Submit customer details form activate g g --> Customer: Return payment form deactivate g Customer -> g: Submit payment form deactivate Customer activate g g --> g: Process payment == Final redirect of customer == g -> Customer: Connecting Party website redirect_url activate Customer Customer -> Merchant: POST redirect_url\nstatus, orderid deactivate Customer activate Merchant group Get Final Status == Receive Connecting Party Callback == Merchant <- g: Сallback with final status g <-- Merchant: HTTP 200 deactivate g == Order Status Request == Merchant -> g: api/v2/status activate g g --> Merchant: Response \nstatus, order-stage deactivate g end Merchant -> Customer: Show result deactivate Merchant | (2) Place the Buy Now Button HTML element on checkout page available for the Payer. | (9) To implement final redirect see :ref:`Final Redirect`. | (11,12) To implement order status request see :ref:`/api/v2/status/`. Connecting Party may request order status after receiving transaction ID in either Connecting Party callback or final redirect. | (13) To implement callback with final status handling see :ref:`Connecting Party Callbacks`.