func (m NativeAmount) MutatePayment(o interface{}) (err error) {
	switch o := o.(type) {
	default:
		err = errors.New("Unexpected operation type")
	case *xdr.PaymentOp:
		o.Amount, err = amount.Parse(m.Amount)
		if err != nil {
			return
		}
		o.Asset, err = xdr.NewAsset(xdr.AssetTypeAssetTypeNative, nil)
	case *xdr.PathPaymentOp:
		o.DestAmount, err = amount.Parse(m.Amount)
		if err != nil {
			return
		}
		o.DestAsset, err = xdr.NewAsset(xdr.AssetTypeAssetTypeNative, nil)
	}
	return
}
MutatePayment for NativeAmount sets the PaymentOp's currency field to
native and sets its amount to the provided integer
package build
import (
	"github.com/stellar/go/amount"
	"github.com/stellar/go/support/errors"
	"github.com/stellar/go/xdr"
)
func Payment(muts ...interface{}) (result PaymentBuilder) {
	result.Mutate(muts...)
	return
}
type PaymentMutator interface {
	MutatePayment(interface{}) error
}
type PaymentBuilder struct {
	PathPayment bool
	O           xdr.Operation
	P           xdr.PaymentOp
	PP          xdr.PathPaymentOp
	Err         error
}
func (b *PaymentBuilder) Mutate(muts ...interface{}) {
	for _, m := range muts {
		if _, ok := m.(PayWithPath); ok {
			b.PathPayment = true
			break
		}
	}
	for _, m := range muts {
		var err error
		switch mut := m.(type) {
		case PaymentMutator:
			if b.PathPayment {
				err = mut.MutatePayment(&b.PP)
			} else {
				err = mut.MutatePayment(&b.P)
			}
		case OperationMutator:
			err = mut.MutateOperation(&b.O)
		default:
			err = errors.New("Mutator type not allowed")
		}
		if err != nil {
			b.Err = errors.Wrap(err, "PaymentBuilder error")
			return
		}
	}
}
func (m CreditAmount) MutatePayment(o interface{}) (err error) {
	switch o := o.(type) {
	default:
		err = errors.New("Unexpected operation type")
	case *xdr.PaymentOp:
		o.Amount, err = amount.Parse(m.Amount)
		if err != nil {
			return
		}
		o.Asset, err = createAlphaNumAsset(m.Code, m.Issuer)
	case *xdr.PathPaymentOp:
		o.DestAmount, err = amount.Parse(m.Amount)
		if err != nil {
			return
		}
		o.DestAsset, err = createAlphaNumAsset(m.Code, m.Issuer)
	}
	return
}
func (m Destination) MutatePayment(o interface{}) error {
	switch o := o.(type) {
	default:
		return errors.New("Unexpected operation type")
	case *xdr.PaymentOp:
		return setAccountId(m.AddressOrSeed, &o.Destination)
	case *xdr.PathPaymentOp:
		return setAccountId(m.AddressOrSeed, &o.Destination)
	}
}