coinbase / coinbase-commerce-node

Coinbase Commerce Node
MIT License
148 stars 54 forks source link

Charge response problem..! #26

Closed Gennttii closed 4 years ago

Gennttii commented 4 years ago

Hi,

I am trying to make an app and I choosed coinbase commerce to receive payments.

I want users to write their amount they want to deposit, made it possible with : var Charge = coinbase.resources.Charge;, but the problem is that this is considered as donation, in the end of the deposit it says thanks for the donation.

I am not asking for donations, so I don't want it to say

Donation Sent
Thank you for your donation

Can you remove the word donation here? Or make it possible to customize it the way I want..

Thanks in advance..

oa-coinbase commented 4 years ago

@Gennttii When creating a new Charge, you must set pricing_type to fixed_price, and also define the local_price. Otherwise it will be seen by the api as a donation.

// example
const charge = new Charge({
    "description": "Mastering the Transition to the Information Age",
    "metadata": {
        "customer_id": "id_1005",
        "customer_name": "Satoshi Nakamoto"
    },
    "name": "Test Name",
    "payments": [],
    "pricing_type": "fixed_price",
    "local_price": {
        "amount": "100.00",
        "currency": "USD"
    }
}
mworks-proj commented 1 year ago

Are there any other parameters than fixed_price, such as recurring billing ie monthly_price, weekly_price or other?