Outputs in Payment Protocol

Hi,

I’m trying to make Payment Details like it says here: http://bitcore.io/guide/module/payment-protocol/index.html

How do I create ‘outputs’?

I tried making an array with one Output:

var output = new bitcore.Transaction.Output({
	'script': bitcore.Script(new bitcore.Address(address)),
	'satoshis': satoshis
});

but that doesn’t work.

Nevermind, that was the wrong Output.
This works:

var output = new PaymentProtocol.Output();
output.set('amount', satoshis);
output.set('script', bitcore.Script(new bitcore.Address(address)).toBuffer());

:+1:

Glad you were able to sort it out :slight_smile: