Paypal Integration in Flutter - Paypal Payment Method in Flutter - CodeBite

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ม.ค. 2025

ความคิดเห็น • 40

  • @BaniAkram-r2f
    @BaniAkram-r2f ปีที่แล้ว +1

    Is there anyway to fetch the shipping address that the user has selected or chosen from Paypal ?

  • @crazymusicnetwork8844
    @crazymusicnetwork8844 ปีที่แล้ว

    Does this package support subscriptions?

  • @carlosa.florescarrasco3728
    @carlosa.florescarrasco3728 ปีที่แล้ว

    Thanks, bit how I enable the button "pay with credit or debir card"

  • @anurudhsingh3397
    @anurudhsingh3397 ปีที่แล้ว +2

    provide the github link for the code

  • @kamohelolebona4666
    @kamohelolebona4666 ปีที่แล้ว

    so after i click on the button it says "Something went wrong"

  • @harpreet_meen
    @harpreet_meen 2 ปีที่แล้ว +1

    hlo bro,i am also using this package and everything works fine in android but in ios it is not working ..and second thing this package is not updating from last year ...may be cause a issue?

    • @codebite786
      @codebite786  2 ปีที่แล้ว

      Paa g! Yes package is not being updating for long time
      I am going to make another video on this with new way

  • @vtbymrmh
    @vtbymrmh 2 ปีที่แล้ว +1

    We don't need to change return url ?

    • @codebite786
      @codebite786  2 ปีที่แล้ว

      For Mobile apps, NO.

  • @bhumikachaplot
    @bhumikachaplot 2 ปีที่แล้ว +1

    how can test this?

    • @codebite786
      @codebite786  ปีที่แล้ว

      Don't test it, Try it 😂

  • @madeye1839
    @madeye1839 ปีที่แล้ว

    What about flutter web?

  • @FlutterTutorial
    @FlutterTutorial 2 ปีที่แล้ว +1

    Tutorial defining method is nice. 👍

  • @TungNguyen-lt5ej
    @TungNguyen-lt5ej 2 ปีที่แล้ว +1

    please update source code for me?

    • @codebite786
      @codebite786  2 ปีที่แล้ว

      Tung Nguyen i am sending you whole class,
      use PayPalIntigration.initialize(context, context) to open paypal gateway
      Thanks for comment
      import 'package:flutter_paypal/flutter_paypal.dart';
      class PayPalIntigration {
      static initialize(
      BuildContext context,
      BuildContext parentContext,
      ) async {
      print(PosConstants.membershipAmount);
      Navigator.of(context).push(
      MaterialPageRoute(
      builder: (BuildContext context) => UsePaypal(
      sandboxMode: true,
      clientId:
      [your client id],
      secretKey: [your secret id],
      returnURL: "samplesite.com/return",
      cancelURL: "samplesite.com/cancel",
      transactions: [
      {
      "amount": {
      "total": PosConstants.membershipAmount,
      "currency": "AUD",
      "details": {
      "subtotal": PosConstants.membershipAmount,
      "shipping": '0',
      "shipping_discount": 0
      }
      },
      "description": "Payment for PULSE membership.",
      "item_list": {
      "items": [
      {
      "name": "A demo product",
      "quantity": 1,
      "price": PosConstants.membershipAmount,
      "currency": "AUD"
      }
      ],
      }
      }
      ],
      note: "Contact us for any questions on your order.",
      onSuccess: (Map params) async {
      Navigator.push(
      parentContext,
      MaterialPageRoute(builder: (context) => LoginPOS()),
      );
      ;
      },
      onError: (error) {
      print("onError: $error");
      },
      onCancel: (params) {
      print('cancelled: $params');
      }),
      ),
      );
      }
      }

    • @TungNguyen-lt5ej
      @TungNguyen-lt5ej 2 ปีที่แล้ว

      @@codebite786 thanks bro! Please see class PosConstants, how do i want to pass data total + subtotal, price from outside by 1 method? must be const bro?

    • @codebite786
      @codebite786  2 ปีที่แล้ว

      ​@@TungNguyen-lt5ej it is very easy
      just create a class like i created (PosConstants)
      now make static variables of total and subtotal in it.
      you can directly access static variable by using class name because they are shared variable for each object of that class
      see example
      class YourClass {
      static const total = 30;
      static const subtotal = 35;
      }
      so you can use YourClass.total and YourClass.subtotal where ever you want in your project.
      Hope so you got me.

    • @TungNguyen-lt5ej
      @TungNguyen-lt5ej 2 ปีที่แล้ว

      @@codebite786 i need to total and subtotal dynamic

    • @codebite786
      @codebite786  2 ปีที่แล้ว

      @@TungNguyen-lt5ej create Google Meet meeting share link to me in comment,
      let see what you want to achieve.
      Thanks