import sdk from '../../../dist/index'
console.log('paypalSPB')

const publicKey = {
  key: 'AUY6Budt21Ebh5ZSHgaKVTflqTj6oicuszaGsr-cBZv-GsQfcdOGIOxLx0mIf-eqx-zP19uBQ2scXshz',
  expand: {
    currency: 'USD',
    // chDealId: '5L77127322196863J',
  },
}

const initialData = {
  env: 'dev',
  domId: '',
  sdkName: 'paypalSPB',
  createToken: response => {
    console.log('token回调', response)
  },
  createOrder: response => {
    console.log('paypalSPB选择按钮时的回调', response)
    return '8FW20256UD7626911'
  }, // paypalSPB选择按钮时的回调
  styleOption: {
    commonStyle: {
      paypalSPBStyle: {
        layout: 'vertical',
        color: 'gold',
        shape: 'rect',
        label: 'paypal',
        height: 45,
        tagline: false,
      },
    },
  },
}

const pay = new sdk(publicKey, initialData)
