---- dataentry gateway ----
type : gateway # do not change this line
name : PayU #
countries : PL, CZ #
support-added : 2.0.0 #
support-removed : #
auth-net-emulation : no # enter "yes" or "no" (without quotes)
supports-3dsecure : yes # enter "yes" or "no" (without quotes)
gateway_url : http://payu.com/ #
----
====== PayU ======
This integration works with PayU's Poland (PL) and Czechia (CZ) markets with alternative payment methods, but also supports credit cards for all EU and EEA countries.
Subscriptions are not supported with PayU at this time. If you intend to sell subscriptions with your FoxyCart store, you will also need to make use of another payment gateway that does.
===== Setting Up PayU for FoxyCart =====
First of all you should register here: [[https://www.payu.pl/en|PayU]]. If you have any questions about getting an account set up, please contact PayU for more information.
===== Testing =====
==== Obtaining a Test Account ====
Once you have a PayU account, you can log in to the [[https://secure.payu.com/user/start?lang=en|PayU admin panel]]. Once logged in, you will need to generate PayU credentials:
* Create your store in the **Online Payments** section, using the "Add Shop" button. This will then run you through a few steps to get a shop within PayU created.
{{ :gateways:foxy_payu_stores.png?nolink&600 |}}
* In step 1 you'll create your store. Select the website address and give it a name. We'd recommend entering the store name as you've entered it into FoxyCart as well, as customers will see this name on the PayU payments page.
* In step 2, you'll create a POS. Select the option for "Checkout" (should be labeled "REST API (Checkout)") and give it a name.
* After completing the second step - you'll be presented with your "Configuration Keys". These values need to be copied over to the PayU settings on the "payments" page of your store's FoxyCart administration:
* **POS ID (pos_id)** in the **pos id** field
* **Second key (MD5)** in the **second key** field
* **OAuth protocol - client_secret** or **Key (MD5)** (depending on the interface) in the **key** field
* After copying the values, click the "End" button below them and it will take you to the summary page for the POS you just created. On this page, you'll need to enable the "test payment" method for your store for testing. {{ :gateways:foxy_payu_keys.png?nolink&600 |}}
* To access the POS overview page again to reference your configuration keys, or to enable/disable the test payment method, from the "Online Payments" section of the PayU administration, go to the "My Shops" page and click the "POS" link of the store you created, and then click on the individual POS
==== Test Card Numbers ====
Use the test payment method option.
===== Troubleshooting & Interpreting Response Codes =====
Contact PayU for info. Know more? Feel free to edit this page with info.
===== Important Notes and Caveats =====
==== Possible Action: Datafeed Handling ====
At the time of the customer completing the transaction - we don't necessarily know whether the transaction was completed yet or not. We instead rely on a notification from the gateway after the checkout has been completed to confirm whether the transaction was approved or not. To handle this, transactions are initially marked as pending, and when we get a confirmation from the gateway on the result of the transaction, we update it accordingly. Each time the status changes, a datafeed will be sent to your endpoint if configured with the transaction details and the ''status'' node will be present.
The ''status'' node can contain one of three different values: ''pending'', ''approved'' or ''rejected''. Depending on the types of actions you're needing to perform at your datafeed endpoint, you need to make sure the appropriate status value is present first.
===== User Notes and Experiences =====
If you have tips, experience, or helpful notes related to this gateway that would benefit others, please add them below, including your name and the date. We reserve the right to edit or remove comments that don't add value to this page.