Giter Club home page Giter Club logo

angular2-paypal's Introduction

angular2-paypal

An angular 2 app that demonstrates the use of online payment service paypal Paypal using the BUY NOW payment option

how to start

the project is created using angular-cli

  • clone the project
  • serve the files
  • visit localhost:4200/
the problem for me was getting the form to perform a submit in angular 2 template invoking the action url

I did this in the template

<form #form class="form-inline" name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="[email protected]">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="item_name" value="Paypal demo charge">
    <input name="item_number" type="hidden" value="0001"/>
    <input type="text" class="form-control" size="30" id="paypalAmount" name="amount"/>
    <input type="hidden" name="return" value="https://localhost:4200/" />
    <input type="hidden" name="cancel_return" value="https://localhost:4200/" />
    <input type="hidden" name="custom" value={{title}}>
    <!--pass your notification URL-->
    <input name="notify_url" value="YOUR NOTIFICATION URL" type="hidden"><br/><br/>
    <input (click)="form.submit()" type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0"
                name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/>
</form>

I set the #form then in the submit button I did form.submit() invoking the action url

angular2-paypal's People

Contributors

angular-cli avatar musale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.