Code Monkey home page Code Monkey logo

vendure-pagarme-plugin's Introduction

Vendure Pagar.me Plugin

npm (scoped) semantic-release Crowdin

πŸ’³ A plugin to enable Pagar.me as a payment provider for Vendure. Its a WORK IN PROGRESS. In issues you can find what need to be done.

🌟 Feature

This plugin have inside it a lot of stuff:

  • A PaymentMethodHandler to createPayments and configure Pagar.me transaction
  • A PagarmePostbackController controller to receive postback request from Pagar.me
  • A custom field pagarmePaymentMethod on Order to change the Pagar.me Payment Method BEFORE create a payment. You can define to calculate discount on Order based on that.
  • A pagarmeBoletoPromotionAction and pagarmeCreditCardPromotionAction to create promotion based on what payment method selected by the user
  • Refund credit card payments in Admin UI

🚩 Roadmap

  • Add unit and E2E test
  • Cronjob for cancel order after some time
  • CRUD for save bank information for refund
  • CRUD for save credit card's ID to create transactions based on that

βš™οΈ Install

1. Install and configure Vendure

Here you can find out how to install

2. Install the package

npm install vendure-pagarme-plugin --save

3. Add the plugin in Vendure configuration

import { PagarmePlugin } from 'vendure-pagarme-plugin';
const config: VendureConfig = {
  ...
  plugins: [
    PagarmePlugin
  ]
}

4. Add this package in your storefront (Optional)

To create a payment with this plugin you will need to fill with metadata in createPayment mutation. If you use Typescript in your storefront you can use the PagarmePaymentMethodMetadata type to know witch fields that will be need. 😁

import { PagarmePaymentMethodMetadata } from 'vendure-pagarme-plugin';

5. Configure Pagar.me

You will need to enable and configure the options to make work. You can edit this in Payment Method section in Vendure Admin UI

6. Enjoy!

It's done!

😍 Do you like?

Please, consider supporting my work as a lot of effort takes place to create this repo! Thanks a lot.

Buy Me A Coffee

🌐 Localization

This project localization its hosted in Crowdin.

❗️ License

MIT

vendure-pagarme-plugin's People

Contributors

dependabot[bot] avatar jonyw4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vendure-pagarme-plugin's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update dependency @vendure/core to v0.18.5
  • chore(deps): update dependency @vendure/testing to v0.18.5
  • chore(deps): update dependency eslint-config-prettier to v6.15.0
  • chore(deps): update dependency eslint-plugin-prettier to v3.4.1
  • chore(deps): update dependency husky to v4.3.8
  • chore(deps): update dependency prettier to v2.7.1
  • chore(deps): update dependency ts-jest to v26.5.6
  • chore(deps): update dependency typescript to v4.9.3
  • chore(deps): update typescript-eslint monorepo to v3.10.1 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update dependency pagarme to v4.28.0
  • fix(deps): update dependency pagarme-js-types to v2.9.7
  • fix(deps): update dependency qs to v6.11.0 (qs, @types/qs)
  • chore(deps): update actions/cache action to v3
  • chore(deps): update actions/checkout action to v3
  • chore(deps): update actions/setup-node action to v3
  • chore(deps): update commitlint monorepo to v17 (major) (@commitlint/config-conventional, commitlint)
  • chore(deps): update dependency @vendure/core to v1
  • chore(deps): update dependency @vendure/testing to v1
  • chore(deps): update dependency eslint to v8
  • chore(deps): update dependency eslint-config-prettier to v8
  • chore(deps): update dependency eslint-plugin-prettier to v4
  • chore(deps): update dependency husky to v8
  • chore(deps): update jest monorepo to v29 (major) (@types/jest, jest, ts-jest)
  • chore(deps): update typescript-eslint monorepo to v5 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
  • mcr.microsoft.com/vscode/devcontainers/typescript-node 0-12
github-actions
.github/workflows/publish.yml
  • actions/checkout v2
  • actions/setup-node v1
  • actions/cache v1
npm
package.json
  • @types/qs 6.9.3
  • pagarme 4.13.0
  • pagarme-js-types 2.6.0
  • qs 6.9.4
  • @commitlint/config-conventional 9.1.1
  • @types/jest 26.0.4
  • @typescript-eslint/eslint-plugin 3.6.1
  • @typescript-eslint/parser 3.6.1
  • @vendure/core 0.17.1
  • @vendure/testing 0.17.1
  • commitlint 9.1.0
  • eslint 7.4.0
  • eslint-config-prettier 6.11.0
  • eslint-plugin-prettier 3.1.4
  • husky 4.2.5
  • jest 26.1.0
  • ncp 2.0.0
  • prettier 2.0.5
  • rimraf 3.0.2
  • semantic-release 17.1.1
  • ts-jest 26.1.3
  • typescript 4.0.3
  • @vendure/core ~0.17.0

  • Check this box to trigger a request for Renovate to run again on this repository

Add limitation refund boleto

In storefront must be a way to first create and check the credit card response before create a boleto payment

Erro resposta nova versΓ£o vendure

metadata: {errorMessage: transaction.acquirer_response_code}
metadata: {errorMessage: e.message}
errorMessage: e.response.errors,
metadata: {errorMessage: e.response.errors}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.