(options)
| 52 | }; |
| 53 | return { |
| 54 | click(options) { |
| 55 | return new Promise(function(accept, reject) { |
| 56 | onPaymentStarted(); |
| 57 | return _.defer(function() { |
| 58 | const { |
| 59 | payment |
| 60 | } = paymentData; |
| 61 | // Add (partial) stub info that PayPal would attach to a payment object |
| 62 | _.merge(payment, { |
| 63 | cart: 'fake_cart_id', |
| 64 | id: 'fake_payment_id', |
| 65 | payer: { |
| 66 | payer_info: { |
| 67 | payer_id: 'fake_payer_id', |
| 68 | email: 'fake_email@example.com' |
| 69 | }, |
| 70 | payment_method: 'paypal', |
| 71 | status: 'VERIFIED' |
| 72 | }, |
| 73 | intent: 'sale', |
| 74 | state: 'approved' |
| 75 | }, options); |
| 76 | return onPaymentComplete(payment).then(() => accept()); |
| 77 | }); |
| 78 | }); |
| 79 | } |
| 80 | }; |
| 81 | }; |
| 82 |
nothing calls this directly
no outgoing calls
no test coverage detected