Skip to content

Latest commit

 

History

History
69 lines (42 loc) · 2.6 KB

README.md

File metadata and controls

69 lines (42 loc) · 2.6 KB

Payment processing with Checkout Bricks

💻 Technologies

  • Node.js
  • NPM (dependency manager)
  • Express

💡 Requirements

  • Node.js 10 or higher (you can download it here).
  • Read our instructions on how to create an application at the Mercado Pago Developer Panel in order to acquire your public key and access token. They will grant you access to Mercado Pago's public APIs.

⚙️ Installation

  1. Clone the project.
git clone https://github.com/mercadopago/payment-bricks-sample-node.git
  1. Go to the project's folder.
cd payment-bricks-sample-node
  1. Then install the dependencies.
npm install

🌟 How to run it

  1. Run the following command to start the application:
npm run localtunnel
  1. Copy the generated URL: (it may take a few seconds to show the URL)

image

  1. Keep the previous terminal instance running and open a new one. In the new terminal instance, run the following command:
HOST=YOUR-URL MERCADO_PAGO_SAMPLE_PUBLIC_KEY=YOUR-PUBLIC-KEY MERCADO_PAGO_SAMPLE_ACCESS_TOKEN=YOUR-ACCESS-TOKEN npm start
  1. Remember to replace YOUR-URL with the URL from the step 2, YOUR_PUBLIC_KEY and YOUR_ACCESS_TOKEN with the corresponding credentials from your account.

  2. Navigate to YOUR-URL from step 2 in your browser. In your first access to this URL, you will be prompted with a warning page. You'll need to inform your public IP Address, but don't worry, the warning page shows you how you can do that. Then paste your public IP in the input field and "Click to Submit".

  3. That's all, now you can access your localhost running app through the URL exposed by localtunnel.

🧪 Testing

On our testing instructions you'll find credit cards that can be used along with this sample and a guide on how to create test users.

🤝 Contributing

You can contribute to this project by reporting problems and bugs. Before opening an issue, make sure to read our code of conduct.

🔖 License

MIT License. Copyright (c) 2022 - Mercado Pago
For more information, see the LICENSE file.