MCPcopy Create free account
hub / github.com/codecombat/codecombat / click

Function click

test/app/views/core/SubscribeModal.spec.coco.js:62–87  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

60 };
61 return {
62 click(options) {
63 return new Promise(function(accept, reject) {
64 onPaymentStarted();
65 return _.defer(function() {
66 const {
67 payment
68 } = paymentData;
69 // Add (partial) stub info that PayPal would attach to a payment object
70 _.merge(payment, {
71 cart: 'fake_cart_id',
72 id: 'fake_payment_id',
73 payer: {
74 payer_info: {
75 payer_id: 'fake_payer_id',
76 email: 'fake_email@example.com'
77 },
78 payment_method: 'paypal',
79 status: 'VERIFIED'
80 },
81 intent: 'sale',
82 state: 'approved'
83 }, options);
84 return onPaymentComplete(payment).then(() => accept());
85 });
86 });
87 }
88 };
89};
90

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected