اذهب إلى المحتوى

Ahmad Ahmad11

الأعضاء
  • المساهمات

    4
  • تاريخ الانضمام

  • تاريخ آخر زيارة

أجوبة بواسطة Ahmad Ahmad11

  1. كيف نتأكد من الدفع قد تم عبر التطبيق

    هل عند الحصول على المعلومات في صورة يكون الدفع قد تم

    ام نحتاج لأتمام العملية بطريقة ما ..

    تابعت احد الفيديوهات 
    يقوم بعد الحصول على المعلومات يستخدم ال firebase

    حيث يقوم  بأرسال ال nonce  و ال device_data

     http.Response response = await http.post(Uri.tryParse('$url?paymentMethodNonce=${result.paymentMethodNonce.nonce}&device_data=${result.deviceData}'));

    الى سيرفر    nodejs

    const functions = require("firbase_funcation");
    const braintree = require('braintree');
    
    const gateway = new braintree.BraintreeGateway({
      environment: braintree.Environment.Sandbox,
      merchantId: 'your_merchant_id',
      publicKey: 'your_public_key',
      privateKey: 'your_private_key'
    });
    exports.paypalPayment = functions.https.onRequest(async (req, res) => {
       const nonceFromTheClient = req.body.payment_method_nonce;
        const deviceData = req.body.device_data;
        
        gateway.transaction.sale({
      amount: '5.00',
      paymentMethodNonce: 'nonce-from-the-client',
      options: {
        submitForSettlement: true
      }
    }, (err, result) => {
        if (err != null) {
          console.error(err);
        }
      
        if (result.success) {
          console.log('Transaction ID: ' + result.transaction.id);
        } else {
          res.json({
              result: 'success'
          })
        }
      }); 
    
    });

    هل من الضروري اتمام العملية باستخدام firebase

    WhatsApp Image 2021-09-20 at 9.44.27 PM.jpeg

  2. استخدمت هذه المكتبة للدفع عبر البايبال
    https://pub.dev/packages/flutter_braintree
    المشكلة عند اضافة هذه المكبتة يجب التعديل على ملف AndroidManifest.xml

    التعديلات موجودة في رابط المكتبة

    لكن ظهرت المشكلة في ملف AndroidManifest.xml عندي بدء debuging
    وتم الحل بحذف اسم التطبيق من ال  AndroidManifest.xml
    حيث قمت بحذف "android:label="xxxapp
    لكن المشكلة الان بأسم التطبيق 
    يظهر باسم  Secure Cheekout
    ولا استطيع تعديل الاسم 

    AndroidManifest.xml

    • أعجبني 1
×
×
  • أضف...