Sandbox: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
m (fixed links)
 
(23 intermediate revisions by 9 users not shown)
Line 2: Line 2:
{{PageTitle|title=Setting up the Sandbox environment and testing payments}}
{{PageTitle|title=Setting up the Sandbox environment and testing payments}}


=Sandbox server=
{| style="margin-left:2em;" align="right"
Although Barion payments are super easy to integrate, we strongly advise all developers to use the sandbox server for development and testing, before going live.
| __TOC__
|}


There are many advantages of using the sandbox server for testing:
Barion Sandbox is a non-PCI DSS compliant test server that provides a playground environment for Barion developers, that’s identical to the production server in terms of Barion API support.
*Sandbox is available 7/24/365, you can even start working at night or during weekends (many developers do just that, but please note that except for the Facebook group, [[Support|support]] is only available durig working hours)
*Sandbox is totally self-service, no contract or NDA needed to use it
*No approvals required
*No transaction fees are spent during development and testing
*The two systems are completely separated, so the same e-mail address can be used in both systems (warning: easy to mix them up!)


=Limitations in functionality=
The point of Barion Sandbox is to simulate Barion Smart Gateway features, and Barion API endpoint functionality on the live Barion server environment, so you can try out your custom or plugin-based webshop integration without real-world financial consequences.
The sandbox server is a copy of the live Barion servers, with some minor differences:


*From the developers perspective, the only difference is the URL
<blockquote>Note that because the production server and Barion Sandbox are separate environments, you can use the same email address as Barion ID on both.
*No real money in the sandbox, all transactions are using "test" money that has no real value
*Since the sandbox is not using real money, withdrawal to bank accounts is not possible
*Real bank cards do not work, we provide a test card
*Top-up is only possible with test card
*Shops are automatically approved
*The servers are of smaller capacity
*Simple SSL certificates are used
*Sandbox servers are updated regularly without notice (we are doing our best not to lose any data)


[[file:live-sandbox.png|1000px]]
This also means that you can’t port the Barion Wallet you’ve created in the Barion Sandbox to the production environment – you explicitly need to create a new Barion Wallet in production.
</blockquote>
== Differences between production and Barion Sandbox ==


=Registering accounts=
Barion Sandbox differs from the production environment in the following:
Just as in the live server, a simple online form is needed to register a Barion account. Each merchant needs a Barion account, or Wallet, as we call it. Payments are credited onto this account, immediately after payment. Note: It is easy to mix up the live and sandbox accounts, so please always double check before calling support.


https://secure.test.barion.com/Registration
* the URL has “test” added:
** <code>secure.test.barion.com</code>
** <code>api.test.barion.com</code>
* a standard HTTPS certificate is used as opposed to Extended Validation (EV) used on the production server
* transactions are made in nominal funds:
** outgoing transfers to bank accounts aren’t supported
** only the dedicated test bank cards are supported for payments and adding money to your Barion Wallet balance
* test cards that trigger various pre-set payment process responses are supported
* 3D-S authentication isn’t performed when using test cards
* actual bank cards aren’t guaranteed to work
* the [[PurchaseInformation|RecurringFrequency property]] of subsequent payments in a subscription payment scenario isn’t checked
* [[Callback mechanism|callbacks for payment status changes]] are sent from a different IP address
* Barion shops are approved automatically – you don’t have to [[Going live|go through onboarding]] when setting up a test Barion shop
* no KYC procedures are in place:
** there’s no need or indeed way to verify your identity as the owner of a Barion Wallet,
** there aren’t any (transfer, balance, or payment) limits on Barion Wallets in the Barion Sandbox
** no data you enter during registration (email address, shop details, etc.) is checked or verified
* the Barion Smart Gateway is displayed with a warning ribbon
* token payment scenarios are enabled by default
* [[C2C Payments|Barion Bridge]] is enabled by default
* there’s no SLA for any downtime, or assurance for any potential data loss resulting from a server update
== Using the Barion Sandbox ==


This URL is identical to https://test.barion.com/Registration, the word "secure" can be omitted.
Make dummy purchases in your Barion shop on the Barion Sandbox server using test card data that always returns the same payment process results to test whether your Barion integration reacts properly to various payment outcomes.
=== Test cards ===


=Opening a shop=
Each of the <code>ProcessResult</code> property value options in [[FundingInformation|the <code>FundingInformation</code> object]] returned by the payment state endpoint has a dedicated test card that reliably triggers it.
Opening a shop in the sandbox is the same as opening one in the live server. The only difference is that the sandbox is wired to automatically approve all changes, while the live server requires a human compliance officer to approve the shop. Prepare for questions and some minor paperwork when switching from sandbox to live.


=API URL=
All test cards accept any future date as expiration date, and any 3-digit number as CVC code.
The base URL for the Barion API is the same as the live, with the word "test" added.


https://api.test.barion.com
{|
|Successful
|4444 8888 8888 5559
|-
|ProblemWithCard
|4444 8888 8888 4446
|-
|LowFunds
|4444 8888 8888 9999
|-
|LostOrStolenCard
|4444 8888 8888 1111
|-
|Declined
|4444 8888 8888 3331
|-
|FraudulentTransaction
|4444 8888 8888 6664
|-
|CardSystemError
|4444 8888 8888 7779
|-
|ScaSoftDeclined
|4444 8888 8888 0006
|}
=== Using the Barion mobile app in Sandbox mode ===


=HTTPS and Certificates=
Add “test#” in front of your Barion ID email address when logging in to the Barion mobile app to make the app connect to the Sandbox server instead of the production one: <code>test#youremail@example.com</code>
All communication with the Barion system must be done using TLS v1.1 / 1.2 - former encryption standards (SSLv3, TLS1.0 etc.) are not allowed. You can test your solution on the Sandbox server, where TLS 1.0 has already been disabled.


Our sandbox server is using more economical certificates, than the live server. Standard HTTPS certificate is used, instead of Extended Validation (EV), and a less well known brand has been chosen. This does not effect security and development, and applies only to the sandbox.
The Barion mobile app displays a green ribbon across the top of the device screen to indicate that it’s currently connected to the Barion Sandbox server.
== Related links ==


{{NotificationBox|title=IMPORTANT|text=TLS 1.0 has been disabled on the Sandbox, switch to TLS 1.1 / 1.2 now, otherwise your Barion implementation will not work!|color=#FF7A3D}}
When you’ve made sure that your Barion shop’s website handles all the necessary user interactions and API responses, [[Going live|switch to the production environment]].
{{NotificationBox|title=WARNING|text=TLS 1.0 will be switched off on the 25th of July 2018 on the live servers, switch to TLS 1.1 / 1.2 now!|color=#FF0000}}
 
=Test cards=
 
The sandbox server is connected to a card acquirer, so all transactions using the test card reach out to that server. This can cause a variation in card processing time. Please note, that if you make many payments to a merchant, the account can reach a balance where another level of KYC is required, and the account will be temporarily suspended. Suspended accounts can initiate payments, but can not send or withdraw money. Try to avoid this, or in case you don't, drop a mail to support.
 
{{NotificationBox|title=UPDATE|text=From 28th November 2017, the following test cards are available and previous ones do not work.|color=#1993c7}}
 
'''CARD 1''' - payments with this card will always SUCCEED
*BIN: '''4444 8888 8888 5559'''
*Expiration date: '''any future date'''
*CVC: '''any 3-digit number'''
 
[[file:Test-card2.png]]
 
'''CARD 2''' - payments with this card will always FAIL
*BIN: '''4444 8888 8888 4446'''
*Expiration date: '''any future date'''
*CVC: '''any 3-digit number'''
 
=Payment GUI=
The payment GUI in the sandbox server is the same as in the live, with some exceptions:
*A black bar is present at the top, with a message saying "sandbox server"
*The Comodo Site Authority is missing, since the sandbox server uses a different SSL certificate
*The URL has the word "test" in it
*It only accpets the test card, no real cards can be used
*All payments are with "test" money, not real money
 
[[file:Sandbox-payment-gui.PNG|600px]]
 
 
{{NotificationBox|title=IMPORTANT|text=Confirmation e-mails are actually sent out in the Sandbox environment as well, so DO NOT use any real e-mail address that does not belong to you. Please use your own personal or development e-mail address, or if you do not care about the e-mail itself, use the @example.com e-mail domain.
|color=#1993c7}}
 
=Using the Barion Web App in Sandbox mode=
You can log into the Barion Web App on the same URL, with the word "test" added. A black bar is shown on top of each screen to help differentiate from the live server.
https://secure.test.barion.com/
 
This URL is identical to https://test.barion.com/, the word "secure" can be omitted.
 
= Using the Barion Mobile App in Sandbox mode =
You can also use the Barion Mobile App with the sandbox server by entering <tt>test#</tt> before the e-mail address when logging into the app. The title bar of the app turns green to help differentiate from live accounts. You can download the app from Google Play or from the App Store.
 
<source lang="html4strict">
</source>
 
=Limitations of the Barion Mobile App=
Current version of the Barion Mobile App supports HUF payments only. If you do not have an HUF currency set up in your wallet, the mobile app login will fail.

Latest revision as of 14:33, 5 August 2024

Setting up the Sandbox environment and testing payments

Barion Sandbox is a non-PCI DSS compliant test server that provides a playground environment for Barion developers, that’s identical to the production server in terms of Barion API support.

The point of Barion Sandbox is to simulate Barion Smart Gateway features, and Barion API endpoint functionality on the live Barion server environment, so you can try out your custom or plugin-based webshop integration without real-world financial consequences.

Note that because the production server and Barion Sandbox are separate environments, you can use the same email address as Barion ID on both.

This also means that you can’t port the Barion Wallet you’ve created in the Barion Sandbox to the production environment – you explicitly need to create a new Barion Wallet in production.

Differences between production and Barion Sandbox

Barion Sandbox differs from the production environment in the following:

  • the URL has “test” added:
    • secure.test.barion.com
    • api.test.barion.com
  • a standard HTTPS certificate is used as opposed to Extended Validation (EV) used on the production server
  • transactions are made in nominal funds:
    • outgoing transfers to bank accounts aren’t supported
    • only the dedicated test bank cards are supported for payments and adding money to your Barion Wallet balance
  • test cards that trigger various pre-set payment process responses are supported
  • 3D-S authentication isn’t performed when using test cards
  • actual bank cards aren’t guaranteed to work
  • the RecurringFrequency property of subsequent payments in a subscription payment scenario isn’t checked
  • callbacks for payment status changes are sent from a different IP address
  • Barion shops are approved automatically – you don’t have to go through onboarding when setting up a test Barion shop
  • no KYC procedures are in place:
    • there’s no need or indeed way to verify your identity as the owner of a Barion Wallet,
    • there aren’t any (transfer, balance, or payment) limits on Barion Wallets in the Barion Sandbox
    • no data you enter during registration (email address, shop details, etc.) is checked or verified
  • the Barion Smart Gateway is displayed with a warning ribbon
  • token payment scenarios are enabled by default
  • Barion Bridge is enabled by default
  • there’s no SLA for any downtime, or assurance for any potential data loss resulting from a server update

Using the Barion Sandbox

Make dummy purchases in your Barion shop on the Barion Sandbox server using test card data that always returns the same payment process results to test whether your Barion integration reacts properly to various payment outcomes.

Test cards

Each of the ProcessResult property value options in the FundingInformation object returned by the payment state endpoint has a dedicated test card that reliably triggers it.

All test cards accept any future date as expiration date, and any 3-digit number as CVC code.

Successful 4444 8888 8888 5559
ProblemWithCard 4444 8888 8888 4446
LowFunds 4444 8888 8888 9999
LostOrStolenCard 4444 8888 8888 1111
Declined 4444 8888 8888 3331
FraudulentTransaction 4444 8888 8888 6664
CardSystemError 4444 8888 8888 7779
ScaSoftDeclined 4444 8888 8888 0006

Using the Barion mobile app in Sandbox mode

Add “test#” in front of your Barion ID email address when logging in to the Barion mobile app to make the app connect to the Sandbox server instead of the production one: test#[email protected]

The Barion mobile app displays a green ribbon across the top of the device screen to indicate that it’s currently connected to the Barion Sandbox server.

Related links

When you’ve made sure that your Barion shop’s website handles all the necessary user interactions and API responses, switch to the production environment.