diff --git a/src/actions/messages/sendPayment.js b/src/actions/messages/sendPayment.js index 2189e6ce..955fbd091 100644 --- a/src/actions/messages/sendPayment.js +++ b/src/actions/messages/sendPayment.js @@ -61,7 +61,7 @@ export const sendPayment = (rawTransaction, metadata, contact) => { dispatch(sendPaymentRequest()); // Send payment as a message to the contact's Pine server. - return dispatch(sendPaymentToServer(rawTransaction, contact)) + return dispatch(sendPaymentToServer(rawTransaction, contact, metadata.card)) .then((sentMessage) => { const message = { id: sentMessage.id, diff --git a/src/actions/paymentServer/messages/sendPayment.js b/src/actions/paymentServer/messages/sendPayment.js index faf422b1..63b0f707 100644 --- a/src/actions/paymentServer/messages/sendPayment.js +++ b/src/actions/paymentServer/messages/sendPayment.js @@ -37,8 +37,9 @@ const sendPaymentFailure = (error) => { * @param {string} contact.address - The contact's Pine address. * @param {string} contact.userId - The contact's user ID. * @param {string} contact.publicKey - The contact's public key. + * @param {string} [card] - A Pine greeting card to attach to the payment (optional). */ -export const sendPayment = (transaction, contact) => { +export const sendPayment = (transaction, contact, card) => { return (dispatch, getState) => { const state = getState(); const { credentials } = state.pine; @@ -49,7 +50,8 @@ export const sendPayment = (transaction, contact) => { type: MESSAGE_TYPE_PAYMENT, data: { transaction, - network + network, + card } };