UnifiedRtpsConfig

Definition

export class UnifiedRtpsConfig{
  financingType: FinancingType;
  order?: Order;
  locationType?: string;
  cardType?: string;
  country?: string;
  prescreenId?: string;
  correlationData?: string;
  customerAcceptedOffer?: boolean;
  channel?: string;
  subChannel?: string;
  mockResponse?: FetchRtpsMockOptions
}
export type FetchRtpsMockOptions =
  | 'success'
  | 'noHit'
  | 'makeOffer'
  | 'ackknowledge'
  | 'existingAccount'
  | 'existingOffer'
  | 'newOffer'
  | 'error';

Examples

const setupConfig: UnifiedSetupConfig = {...} //See Unified Setup config link below
                                         
const rtpsConfig: UnifiedRtpsConfig = {
  financingType: 'card',
  channel: '1', // replace with actual value from ADS
  subchannel: '4', // replace with actual value from ADS
  locationType: 'checkout', // homepage, landing, search, product, category, banner, checkout cart 
  // If you want to mock out the rtps flow use the following
  mockResponse: 'success', // 'success', 'noHit', 'makeOffer', 'ackknowledge', 'existingAccount', 'existingOffer', 'newOffer', 'error';
};

BreadPayments.setup(setupConfig); // Called first to store buyer info 
BreadPayments.submitRtps(rtpsConfig);

Related

SubmitRtps
UnifiedSetupConfig