Razor Pay 支付屏幕显示白色边框

问题描述 投票:0回答:1

我添加了 razorpay 包,它全屏显示。之后我添加了 Firebase 身份验证、谷歌登录、Facebook 登录。发布这些更新后,razor pay 支付屏幕缩小到中间部分,如图所示。

Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  target 'RunnerTests' do
    inherit! :search_paths
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
          config.build_settings['ENABLE_BITCODE'] = 'YES'
          config.build_settings['SWIFT_VERSION'] = '5.0'
     end
  end
end

我用来打开razorpay屏幕的方法

Future makePayment(String orderId, double total) async {
  Razorpay razorpay = Razorpay();
  var options = {
    'amount': (total * 100).round(),
    'currency': 'INR',
    'name': 'kaushik chandru',
    'description': 'Car Booking',
    'prefill': {
      'contact': '123456789',
      'email': '[email protected]',
    },
    'send_sms_hash': true,
    'retry': {'enabled': true, 'max_count': 1},
    'key': 'rzp_test_rrrrrrr',
  };
  razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, handlePaymentErrorResponse);
  razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, handlePaymentSuccessResponse);
  razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, handleExternalWalletSelected);
  razorpay.open(options);
}

我尝试删除 Pods、.symlinks、Podfile.lock 并再次安装 pod,但结果相同。这发生在ios模拟器中

运行堆栈如下

I/chromium(17808): [INFO:CONSOLE(1)] "Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently", source: https://checkout-static-next.razorpay.com/build/d962afde0dc0b7bd79b0ced1b6c3fdd77de18678/checkout-frame.modern.js (1)
E/com.razorpay.checkout(17808): Webview JS Error: Error: <svg> attribute width: Unexpected end of attribute. Expected length, "".
I/chromium(17808): [INFO:CONSOLE(1)] "Error: <svg> attribute width: Unexpected end of attribute. Expected length, "".", source: https://checkout-static-next.razorpay.com/build/d962afde0dc0b7bd79b0ced1b6c3fdd77de18678/checkout-frame.modern.js (1)
E/com.razorpay.checkout(17808): Webview JS Error: Error: <svg> attribute height: Unexpected end of attribute. Expected length, "".
I/chromium(17808): [INFO:CONSOLE(1)] "Error: <svg> attribute height: Unexpected end of attribute. Expected length, "".", source: https://checkout-static-next.razorpay.com/build/d962afde0dc0b7bd79b0ced1b6c3fdd77de18678/checkout-frame.modern.js (1)
E/com.razorpay.checkout(17808): Webview JS Error: Error: <svg> attribute width: Unexpected end of attribute. Expected length, "".
I/chromium(17808): [INFO:CONSOLE(1)] "Error: <svg> attribute width: Unexpected end of attribute. Expected length, "".", source: https://checkout-static-next.razorpay.com/build/d962afde0dc0b7bd79b0ced1b6c3fdd77de18678/checkout-frame.modern.js (1)
E/com.razorpay.checkout(17808): Webview JS Error: Error: <svg> attribute height: Unexpected end of attribute. Expected length, "".
I/chromium(17808): [INFO:CONSOLE(1)] "Error: <svg> attribute height: Unexpected end of attribute. Expected length, "".", source: https://checkout-static-next.razorpay.com/build/d962afde0dc0b7bd79b0ced1b6c3fdd77de18678/checkout-frame.modern.js (1)
E/com.razorpay.checkout(17808): Webview JS Error: Error: <svg> attribute width: Unexpected end of attribute. Expected length, "".
I/chromium(17808): [INFO:CONSOLE(1)] "Error: <svg> attribute width: Unexpected end of attribute. Expected length, "".", source: https://checkout-static-next.razorpay.com/build/d962afde0dc0b7bd79b0ced1b6c3fdd77de18678/checkout-frame.modern.js (1)
E/com.razorpay.checkout(17808): Webview JS Error: Error: <svg> attribute height: Unexpected end of attribute. Expected length, "".
I/chromium(17808): [INFO:CONSOLE(1)] "Error: <svg> attribute height: Unexpected end of attribute. Expected length, "".", source: https://checkout-static-next.razorpay.com/build/d962afde0dc0b7bd79b0ced1b6c3fdd77de18678/checkout-frame.modern.js (1)
I/MSHandlerLifeCycle(17808): removeMultiSplitHandler: no exist. decor=DecorView@cc0c034[CheckoutActivity]
D/OpenGLRenderer(17808): setSurface called with nullptr
D/OpenGLRenderer(17808): setSurface() destroyed EGLSurface
D/OpenGLRenderer(17808): destroyEglSurface
I/ViewRootImpl@598c491[CheckoutActivity](17808): dispatchDetachedFromWindow
D/InputTransport(17808): Input channel destroyed: 'bc0372b', fd=129
ios flutter xcode flutter-dependencies razorpay
1个回答
0
投票

完全删除razorpay集成并再次安装,问题得到解决

© www.soinside.com 2019 - 2024. All rights reserved.