Credit Card Transactions in Angular with PayPal - Online Payments

Поділитися
Вставка
  • Опубліковано 2 гру 2024

КОМЕНТАРІ • 60

  • @nicbrainChannel
    @nicbrainChannel 3 роки тому +3

    this is crazy! never thought it would be so simple after days of searching. THANK YOU

  • @Bogopimp
    @Bogopimp 3 роки тому +3

    My, I followed this exactly (with the only change being my buttons in another component) and I get an 'ERROR Error: Document is ready and element myPaypalButtons does not exist' error... is anybody else finding the same issue?

  • @jsblade2770
    @jsblade2770 3 роки тому +3

    this is soo cool! can t wait to do it myself

  • @abdulaziz7013
    @abdulaziz7013 3 роки тому +3

    Thank you sir, Keep teaching us.

  • @felikowski
    @felikowski Рік тому +1

    nice tutorial! but better put it into ngOnInit and not in the constructor, as it may happen that the template is not rendered when the component calls the constructor. then the render() won't work as the div myPaypalButtons is not yet in the DOM

  • @vukkumsp
    @vukkumsp 3 роки тому +2

    Wow I nevee thought it is this simple to implement Paypal payment gateway. Thank you for teaching us 🙂

  • @danielberry9610
    @danielberry9610 2 роки тому +1

    Great video. Very nicely done.

  • @dkumarchannel
    @dkumarchannel 3 роки тому +1

    Well explained! Thanks for the video

  • @gaminggenes320
    @gaminggenes320 3 роки тому +3

    I like the the 3 buttons layout without the PayPal login screen, but do you have the equivalent JS CDN instead of NPM package where I can use the same render object to render these 3 (or 2) buttons with the same effects? Also, can I hide that PayPal Later button? Appreciate if you can reply, thank you!

    • @Codeible
      @Codeible  3 роки тому +2

      Hello,
      You can render each button individually without the NPM package.
      1) Add the PayPal script element in the head tags of the indext.html page
      2) Go to the component that you are adding the buttons to and declare the paypal variable.
      declare var paypal;
      Watch the video on loading and Using JavaScript for more understanding - ua-cam.com/video/k6o8H4YMwGE/v-deo.html
      3) Call this to render the single button:
      paypal.Buttons(
      {
      fundingSource: paypal.FUNDING.PAYPAL,
      }
      ).render("#paypalButtons");
      Here are the types of fundingSource you can use for each button:
      paypal.FUNDING.PAYPAL,
      paypal.FUNDING.VENMO,
      paypal.FUNDING.CREDIT,
      paypal.FUNDING.CARD
      If you want to set the other parameters for the buttons such as currency and the amount, look at this page from the Paypal Developer website to set the values.

    • @Codeible
      @Codeible  3 роки тому +2

      Link to site:
      developer.paypal.com/docs/checkout/integrate/

    • @slipknotfya
      @slipknotfya 3 роки тому +1

      @@Codeible omg thank you man. I've been looking at the documentation for days to no results. This is the first explanation in Angular that actually makes sense. Thank you!

  • @mdell-t4655
    @mdell-t4655 2 роки тому

    the only features I see in render are id, currency, value, and onApprove. How would I be able to modify the description and quantity of each item bought? I have variables for both in my code.

  • @MohamedAtefGad
    @MohamedAtefGad 4 роки тому +2

    Very Thanks
    I have error
    ERROR Error: Document is ready and element "myButtomPayment" does not exist

  • @liamsapera5688
    @liamsapera5688 3 роки тому +1

    Hi how can i make the value dynamic

    • @Codeible
      @Codeible  3 роки тому

      Hello, instead of calling the render function in the constructor, call it individually.

    • @liamsapera5688
      @liamsapera5688 3 роки тому

      @@Codeible do you have a reference for this one ? Thanks in advance.

  • @elvisperez4565
    @elvisperez4565 Рік тому

    If I have a personal PayPal account, can I apply the PayPal payment button?

    • @Codeible
      @Codeible  Рік тому

      You should be able to use your personal PayPal account and turn it into a developer account.

  • @connorthomas4770
    @connorthomas4770 3 роки тому

    Is there any security issues by hardcoding those values on the frontend? Can the user change the $ amount value in your front end code?

    • @Codeible
      @Codeible  3 роки тому

      Hello, what do you mean by changing the amount in front end? You mean through the console on the browser?
      That has no effect and it is safe.

  • @alessandrocinque4542
    @alessandrocinque4542 2 роки тому +1

    Question: How do I change the currency in GBP? I already wrote - currency: "GBP", - instead of - currency: "USD" - but it doesn't work

    • @Codeible
      @Codeible  2 роки тому +1

      Hello, the supported currency is here: developer.paypal.com/api/rest/reference/currency-codes/

    • @alessandrocinque4542
      @alessandrocinque4542 2 роки тому

      @@Codeible thanks for the reply but as you can see I am writing the same code listed in your link but it is not working

    • @Codeible
      @Codeible  2 роки тому

      @@alessandrocinque4542 Hello, what link are you referring to? You need to use your own client id.

    • @alessandrocinque4542
      @alessandrocinque4542 2 роки тому

      @@Codeible Hi I meant the one you just sent me to check out the currency codes

    • @Codeible
      @Codeible  2 роки тому

      @@alessandrocinque4542 Should work, I just clicked on it.
      You can search "paypal api supported currencies" and it should show up.

  • @DamienSteven
    @DamienSteven 2 роки тому

    This only works with USD. Cannot get it to work other currencies such as "EUR", "GBP"

  • @sharadhijain2017
    @sharadhijain2017 3 роки тому

    Hello sir, I'm getting license issue when tried to use the URL with Client Id. I wanted to use the in one of the component.html. Am I allowed to use it there or should it be used inside index in html only?

    • @Codeible
      @Codeible  3 роки тому +2

      Only in the index.html
      If you want to put it in another component, you need to create the Script element in the Typecript file and then add it to the DOM.
      Watch this video @2:11
      ua-cam.com/video/k6o8H4YMwGE/v-deo.html

  • @brunoromanhuaman4882
    @brunoromanhuaman4882 3 роки тому

    Can only be used in the constructor? If I need the value of "value" to be dynamic, how can I use it outside the constructor?

  • @ginuxtech
    @ginuxtech 3 роки тому

    Pls with this method works with Ionic 4 mobile app

    • @Codeible
      @Codeible  3 роки тому

      Hello, it should it if uses JavaScript

    • @ginuxtech
      @ginuxtech 3 роки тому

      @@Codeible Thanks alot I will give it a try now

  • @hazemsweed9979
    @hazemsweed9979 3 роки тому

    thanks a lot sir, but we did not use the security key, is that right ؟

    • @Codeible
      @Codeible  3 роки тому +2

      Hello, what do you mean by security key?

    • @hazemsweed9979
      @hazemsweed9979 3 роки тому

      Hi, Paypal gives us ClientID and secret key, but we did not use secret key, is that safe !!

    • @Codeible
      @Codeible  3 роки тому +2

      @@hazemsweed9979 Yes

    • @hazemsweed9979
      @hazemsweed9979 3 роки тому +1

      Thanks a lot for the replies 🌹

  • @bouaicha1
    @bouaicha1 2 роки тому

    thank you

  • @jonihoss6467
    @jonihoss6467 3 роки тому

    how can i change button color and shape?

    • @Codeible
      @Codeible  3 роки тому

      Hello, locate the creditCardPayments package in the node_module folder.
      Go into the creditCardPayment.js file and add the style object code in
      paypal.Buttons(
      {
      style: {
      layout: 'vertical',
      color: 'blue',
      shape: 'rect',
      label: 'paypal'
      },
      createOrder ...,
      onApprove ....
      }
      ).render(...)
      Replace the values in the styles object. See the supported styles here:
      developer.paypal.com/docs/checkout/integration-features/customize-button/#shape

  • @PHPTechLife
    @PHPTechLife 3 роки тому

    How to make it live?

    • @Codeible
      @Codeible  3 роки тому

      Just switch it to Live mode in the console.

    • @PHPTechLife
      @PHPTechLife 3 роки тому

      @@Codeible you mean I should create an app on live mode and then use client id from live account?

    • @Codeible
      @Codeible  3 роки тому +1

      @@PHPTechLife Yes

  • @idoudifadi876
    @idoudifadi876 3 роки тому +1

    doesnt work , ReferenceError: paypal is not defined , no documentation

    • @Codeible
      @Codeible  3 роки тому +1

      Hello, you need to add this code inside the head tags of your index.html page. You get the client id from your Paypal account.
      script
      src="www.paypal.com/sdk/js?client-id=​"
      script

    • @idoudifadi876
      @idoudifadi876 3 роки тому

      @@Codeible sorry about earlier actually it worked when i put the script inside body tag , inside head tag it caused a problem

  • @saschahuber7206
    @saschahuber7206 3 роки тому +2

    Only USD works.

    • @Codeible
      @Codeible  3 роки тому

      Hello,
      See the supported currencies:
      developer.paypal.com/docs/api/reference/currency-codes/

    • @alessandrocinque4542
      @alessandrocinque4542 2 роки тому

      Hi did you manage to make it work for another currency?

    • @DamienSteven
      @DamienSteven 2 роки тому +1

      I still cannot get it to work with other currencies.