Coder Social home page Coder Social logo

omise / examples Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 53.0 1.94 MB

Examples for implementing Omise Libraries

License: GNU General Public License v2.0

Ruby 41.18% JavaScript 0.72% CSS 0.58% HTML 9.54% PHP 0.82% Java 1.34% C# 0.65% Hack 2.25% ASP.NET 0.29% TypeScript 9.18% Python 2.36% Swift 8.26% Kotlin 0.02% Objective-C 0.13% Dart 10.40% CMake 4.01% C++ 4.64% C 0.40% Shell 0.22% Go 3.00%

examples's People

Contributors

anasnaouchi avatar chakrit avatar chenka avatar danfowler avatar dependabot[bot] avatar fred avatar guzzilar avatar keeratita avatar muthuswamyopn avatar ratchagarn avatar shunsuke-h-opn avatar swathi1102 avatar tommy-omise avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

examples's Issues

Create a script that will populate database

To create a ruby script that will populate the database with records for local development.

  • tokens
  • charges
  • transactions
  • refunds
  • customers

Use random numbers for the amount, and also for the description can use random words from /usr/share/dict/words

Use ruby library, such as omise-ruby

Fatal error : config.php line 3

สวัสดีีครับ,
ผมลองใช้โค้ดตัวอย่างจากสคริปต์บนเซิร์ฟเวอร์ดู ปรากฏว่าพอ checkout เสร็จแล้วมันจะรีไดเรคไปยัง services/checkout.php ทีนี้ในไฟล์ config.php บรรทัดที่ 3 มันจะต้อง include autoload.php ใน vendor ผมหาโฟลเดอร์นี้ไม่เจอ ทั้งในไฟล์ตัวอย่างและใน git ดัง error ด้านล่างนี้ครับ

Warning: require_once(vendor/autoload.php): failed to open stream: No such file or directory in /home/xxx/omise/config.php on line 3

why it submit only #checkoutForm2

    <form id="checkoutForm1" name="checkoutForm1" method="POST" action="payment_2.php">
        <input type="hidden" name="amount" value="10000">
        <button type="submit" id="checkout1"><img src="https://www.xxx.com/images/L_click2buy.gif" /> 100</button>
    </form>
    
    
    <form id="checkoutForm2" name="checkoutForm2" method="POST" action="payment_2.php">
        <input type="hidden" name="amount" value="20000">
        <button type="submit" id="checkout2"><img src="https://www.xxx.com/images/L_click2buy.gif" /> 200</button>
    </form>

    <!-- Include card.js library -->
    <script type="text/javascript" src="https://cdn.omise.co/omise.js"></script>

    <!-- Config the card.js library -->
    <script type="text/javascript">
    // Set default parameters
    OmiseCard.configure({
        publicKey: 'pkey_test_xxx',
        image: 'http://www.xxx.com/images/logo.png',
        frameLabel: 'xxx.com',
        submitLabel: 'PAY NOW'
    });
    
    // Configuring your own custom button
    OmiseCard.configureButton('#checkout1', {
        amount: 10000,
        submitFormTarget: '#checkoutForm1'
    });
    OmiseCard.configureButton('#checkout2', {
        amount: 20000,
        submitFormTarget: '#checkoutForm2'
    });
    
    // Then, attach all of the config and initiate it by 'OmiseCard.attach();' method
    OmiseCard.attach();
  </script>

  `

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.