checkout / frames-android

Frames Android: making native card payments simple
https://www.checkout.com/docs/integrate/sdks/android-sdk
MIT License
47 stars 33 forks source link

[Version 4.0.0] billing address #175

Closed benju69 closed 1 year ago

benju69 commented 1 year ago

Is your feature request related to a problem? Please describe. Is it possible to don't show the billing address like before includeBilling(false) I don't want the address block, we handle addresses on our side

chintan-soni-cko commented 1 year ago

@benju69 Thank you for providing information regarding your concern. We have the possibility to hide the address block in the styling.

  1. if you using the default SDK style for the payment form please pass addressSummarystyle as null into PaymentformConfig. [Example here](https://github.com/checkout/frames-android/blob/master/example_app_frames/src/main/java/com/checkout/example/frames/ui/screen/MainActivity.kt#:~:text=style%20%3D%20PaymentFormStyle()%2C) style = PaymentFormStyle(paymentDetailsStyle = PaymentDetailsStyle(addressSummaryStyle = null))
    1. If you using custom styling for paymentform, please pass null to addressSummaryStyle [Example here](https://github.com/checkout/frames-android/blob/master/example_app_frames/src/main/java/com/checkout/example/frames/paymentformstyling/CustomPaymentDetailsStyle.kt#:~:text=addressSummaryStyle%20%3D-,provideAddressSummaryStyle(),-%2C)
    2. If you are using custom theming style for payment form, please add setIsFieldHidden to true in order to hide billing form summary. Example here

Hope above solution helpful for you. Let me know if you need more help or any questions.

benju69 commented 1 year ago

Ok with paymentFormStyle.paymentDetailsStyle.addressSummaryStyle = null Thanks

devs-gireeb commented 1 year ago

Hi,

How can we set below fields like before?

injectCardHolderName(this.firstName)

injectPhone( PhoneModel( "971", phone ) )

injectBilling( billingModel )

chintan-soni-cko commented 1 year ago

Hi @Devs-97Eats , you can set fields for the billing form as we have had that possibility before. Please find below solutions for it.

  1. If you want to use the default billing form, use the SDK default style which will provide all default fields. See example here. More details
  2. If you want to inject specific fields along with desired order. Please have a look at example here
  3. If you want to inject custom fields by using theming style of SDK. Please have a look at example here) Please refer. SDK documentation
devs-gireeb commented 1 year ago

Thanks for the quick reply, I tried your solutions above but there are no related functions for injecting values and I only found style functions.

Note:

maxim-nosov-cko commented 1 year ago

Hi @Devs-97Eats

Billing address data injection is not available right now. If this functionality is needed please create a feature request ticket.

The Invalid country error looks like an implementation issue. Please create a new ticket for further discussion with detailed code snippets and please clarify which customization approach is used (custom styling, default SDK styling, or theming).

***This ticket is closed and any further discussion should be moved to somewhere else.