private Protos.PaymentRequest newSimplePaymentRequest(String netID) { Protos.Output.Builder outputBuilder = Protos.Output.newBuilder() .setAmount(coin.value) .setScript(ByteString.copyFrom(outputToMe.getScriptBytes())); Protos.PaymentDetails paymentDetails = Protos.PaymentDetails.newBuilder() .setNetwork(netID) .setTime(time) .setPaymentUrl(simplePaymentUrl) .addOutputs(outputBuilder) .setMemo(paymentRequestMemo) .setMerchantData(merchantData) .build(); return Protos.PaymentRequest.newBuilder() .setPaymentDetailsVersion(1) .setPkiType("none") .setSerializedPaymentDetails(paymentDetails.toByteString()) .build(); }
private Protos.PaymentRequest newExpiredPaymentRequest() { Protos.Output.Builder outputBuilder = Protos.Output.newBuilder() .setAmount(coin.value) .setScript(ByteString.copyFrom(outputToMe.getScriptBytes())); Protos.PaymentDetails paymentDetails = Protos.PaymentDetails.newBuilder() .setNetwork("test") .setTime(time - 10) .setExpires(time - 1) .setPaymentUrl(simplePaymentUrl) .addOutputs(outputBuilder) .setMemo(paymentRequestMemo) .setMerchantData(merchantData) .build(); return Protos.PaymentRequest.newBuilder() .setPaymentDetailsVersion(1) .setPkiType("none") .setSerializedPaymentDetails(paymentDetails.toByteString()) .build(); }
public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentRequest other) { if (other == org.bitcoin.protocols.payments.Protos.PaymentRequest.getDefaultInstance()) return this; if (other.hasPaymentDetailsVersion()) { setPaymentDetailsVersion(other.getPaymentDetailsVersion()); } if (other.hasPkiType()) { bitField0_ |= 0x00000002; pkiType_ = other.pkiType_; onChanged(); } if (other.hasPkiData()) { setPkiData(other.getPkiData()); } if (other.hasSerializedPaymentDetails()) { setSerializedPaymentDetails(other.getSerializedPaymentDetails()); } if (other.hasSignature()) { setSignature(other.getSignature()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentRequest other) { if (other == org.bitcoin.protocols.payments.Protos.PaymentRequest.getDefaultInstance()) return this; if (other.hasPaymentDetailsVersion()) { setPaymentDetailsVersion(other.getPaymentDetailsVersion()); } if (other.hasPkiType()) { bitField0_ |= 0x00000002; pkiType_ = other.pkiType_; onChanged(); } if (other.hasPkiData()) { setPkiData(other.getPkiData()); } if (other.hasSerializedPaymentDetails()) { setSerializedPaymentDetails(other.getSerializedPaymentDetails()); } if (other.hasSignature()) { setSignature(other.getSignature()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentRequest other) { if (other == org.bitcoin.protocols.payments.Protos.PaymentRequest.getDefaultInstance()) return this; if (other.hasPaymentDetailsVersion()) { setPaymentDetailsVersion(other.getPaymentDetailsVersion()); } if (other.hasPkiType()) { bitField0_ |= 0x00000002; pkiType_ = other.pkiType_; onChanged(); } if (other.hasPkiData()) { setPkiData(other.getPkiData()); } if (other.hasSerializedPaymentDetails()) { setSerializedPaymentDetails(other.getSerializedPaymentDetails()); } if (other.hasSignature()) { setSignature(other.getSignature()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentRequest other) { if (other == org.bitcoin.protocols.payments.Protos.PaymentRequest.getDefaultInstance()) return this; if (other.hasPaymentDetailsVersion()) { setPaymentDetailsVersion(other.getPaymentDetailsVersion()); } if (other.hasPkiType()) { bitField0_ |= 0x00000002; pkiType_ = other.pkiType_; onChanged(); } if (other.hasPkiData()) { setPkiData(other.getPkiData()); } if (other.hasSerializedPaymentDetails()) { setSerializedPaymentDetails(other.getSerializedPaymentDetails()); } if (other.hasSignature()) { setSignature(other.getSignature()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentRequest other) { if (other == org.bitcoin.protocols.payments.Protos.PaymentRequest.getDefaultInstance()) return this; if (other.hasPaymentDetailsVersion()) { setPaymentDetailsVersion(other.getPaymentDetailsVersion()); } if (other.hasPkiType()) { bitField0_ |= 0x00000002; pkiType_ = other.pkiType_; onChanged(); } if (other.hasPkiData()) { setPkiData(other.getPkiData()); } if (other.hasSerializedPaymentDetails()) { setSerializedPaymentDetails(other.getSerializedPaymentDetails()); } if (other.hasSignature()) { setSignature(other.getSignature()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }