Giter Site home page Giter Site logo

showpo_pay's Introduction

This is a magento extension for processing orders from magento backend with showpo online payment method.

Installation The extension should be upload into magento root folder and enabled from System->Configuration->Sales->Payment Methods->Showpo Online Payment.

How to use it This extension will enable a payment method (Showpo Online Payment) which is available for backend orders only.

It will be triggered when admin is trying to generate the invoice for a pending order from magento backend. An API call will be made to pass order amount, customer id and quote id. The response will be status, amount, reference and txn_ref. The information for txn_ref will be save into additional information for the transaction.

Debug A log named showpo_pay.log will record the input and response for all API calls.

Some thoughts about this extension The endpoint url should be moved in to admin section if the url could be changed later.

Was trying to start the API call inside the validate() function and then trigger the capture() function after get response. Soif the request was rejected, the admin will still be able to select other method to process the order. But not sure why, the validate() function was always been called three times when admin trying to place the order. Wasted some time on it but still can not figure out why. I was ended up with starting the API call when admin submit the invoice. Submit invoice will trigger the capture() and the API response will be saved into transaction. The reason I didn’t do that at the beginning is that the admin will not be able to use other payment method to invoice the order (The payment method cannot be changed after the order generated). The admin only can try it again later with the same payment method. Still think there must be a better to solve this issue. Will dig a bit deeper for the magento payment life cycle later

showpo_pay's People

Contributors

northblue avatar

Watchers

 avatar  avatar  avatar

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.