Custom Note Integration
(Optional steps)
Follow this section if you want to integrate Custom Note in PayUCheckoutPro SDK

Create Custom Note List

Create a list of custom Note that you want to pass to the CheckoutPro SDK. For each custom note , custom_note and custom_note_category needs to be passed.
Swift
1
var customNotes = [PayUCustomNote]()
2
3
// for specific custom_note_category
4
let customNote = PayUCustomNote()
5
customNote.note = "Please welcome note"
6
customNote.noteCategories = [.ccdc]
7
customNotes.append(customNote)
8
9
// when want to pass same custom note for multiple custom_note_category
10
let customNote2 = PayUCustomNote()
11
customNote2.note = "Please welcome note"
12
customNote2.noteCategories = [.ccdc , .netBanking]
13
customNotes.append(customNote2)
14
15
// If you want to show custom note on L1 screen, please set custom_note_category to nil
16
let customNote3 = PayUCustomNote()
17
customNote3.note = "Please welcome note"
18
customNote3.noteCategories = nil
19
customNotes.append(customNote3)
20
21
Copied!

Pass custom Note List to SDK

To pass the custom Note array created in above section to the SDK. Create a Object of PayUCheckoutProConfig and set customNotes as below
Swift
1
let checkoutProConfig = PayUCheckoutProConfig()
2
config.customNotes = customNotes
Copied!
This checkoutProConfig object should be passed in PayUCheckoutPro.open() method
Last modified 1mo ago