Add support for package payment methods and basic checkout proccess
This commit is contained in:
@@ -6,11 +6,27 @@ export const fromWCPackage = wcPackage => {
|
||||
id: wcPackage.id,
|
||||
reference: wcPackage.slug,
|
||||
image: wcPackage.images[0].src || DEFAULT_PACKAGE_IMG,
|
||||
hasImage: !!wcPackage.images.length,
|
||||
name: wcPackage.name,
|
||||
country: 'Sweden',
|
||||
countryCode: 'se',
|
||||
currency: 'SEK',
|
||||
documents: [],
|
||||
shortDescription: wcPackage.description,
|
||||
prices: wcPackage.prices.map(price => ({
|
||||
idPrice: price.id,
|
||||
idPaymentType: price.id,
|
||||
payType: price['payment_type'],
|
||||
isSameCompanyAsCl: false,
|
||||
idPackage: wcPackage.id,
|
||||
periodUnit: price['period_unit'],
|
||||
maxContractPeriod: price['max_contract_period'],
|
||||
packagePayPeriod: price['package_pay_period'],
|
||||
servicesContractPeriod: price['services_contract_period'],
|
||||
fixedExtra: price['minimal_fixed_price'],
|
||||
servicesExtra: price['minimal_services_price'],
|
||||
recurentExtra: price['recurrent_price']
|
||||
})) || [],
|
||||
groups: [],
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user