[bisq-network/bisq-core] Add payment method: moneygram (#103)

Manfred Karrer notifications at github.com
Fri Apr 27 14:57:39 UTC 2018


ManfredKarrer requested changes on this pull request.



> +                countryCode,
+                maxTradePeriod,
+                excludeFromJsonDataMap);
+        this.holderName = holderName;
+        this.city = city;
+        this.state = state;
+        this.email = email;
+    }
+
+    @Override
+    public Message toProtoMessage() {
+        PB.MoneyGramAccountPayload.Builder builder =
+                PB.MoneyGramAccountPayload.newBuilder()
+                        .setHolderName(holderName)
+                        .setCity(city)
+                        .setState(state)

State is optional and need to be treated in PB optional otherwise it can cause errors. Is the same in WesternUnion (my fault).

> +                .getCountryBasedPaymentAccountPayloadBuilder()
+                .setMoneyGramAccountPayload(builder);
+        return getPaymentAccountPayloadBuilder()
+                .setCountryBasedPaymentAccountPayload(countryBasedPaymentAccountPayload)
+                .build();
+    }
+
+    public static PaymentAccountPayload fromProto(PB.PaymentAccountPayload proto) {
+        PB.CountryBasedPaymentAccountPayload countryBasedPaymentAccountPayload = proto.getCountryBasedPaymentAccountPayload();
+        PB.MoneyGramAccountPayload moneyGramAccountPayload = countryBasedPaymentAccountPayload.getMoneyGramAccountPayload();
+        return new MoneyGramAccountPayload(proto.getPaymentMethodId(),
+                proto.getId(),
+                countryBasedPaymentAccountPayload.getCountryCode(),
+                moneyGramAccountPayload.getHolderName(),
+                moneyGramAccountPayload.getCity(),
+                moneyGramAccountPayload.getState(),

State is optional and need to be treated in PB optional otherwise it can cause errors. Is the same in WesternUnion (my fault).

> @@ -513,6 +513,9 @@ portfolio.pending.step2_buyer.altcoin=Please transfer from your external {0} wal
 # suppress inspection "TrailingSpacesInProperty"
 portfolio.pending.step2_buyer.cash=Please go to a bank and pay {0} to the BTC seller.\n\n
 portfolio.pending.step2_buyer.cash.extra=IMPORTANT REQUIREMENT:\nAfter you have done the payment write on the paper receipt: NO REFUNDS.\nThen tear it in 2 parts, make a photo and send it to the BTC seller's email address.
+portfolio.pending.step2_buyer.moneyGram=Please pay {0} to the BTC seller by using MoneyGram.\n\n
+portfolio.pending.step2_buyer.moneyGram.extra=IMPORTANT REQUIREMENT:\nAfter you have done the payment send the MTCN (tracking number) and a photo of the receipt by email to the BTC seller.\n\

Is it called MTCN at MoneyGram? I though that was specific to WU?

> @@ -531,6 +534,10 @@ portfolio.pending.step2_buyer.paperReceipt.headline=Did you send the paper recei
 portfolio.pending.step2_buyer.paperReceipt.msg=Remember:\n\
   You need to write on the paper receipt: NO REFUNDS.\n\
   Then tear it in 2 parts, make a photo and send it to the BTC seller's email address.
+portfolio.pending.step2_buyer.moneyGramMTCNInfo.headline=Send MTCN and receipt
+portfolio.pending.step2_buyer.moneyGramMTCNInfo.msg=You need to send the MTCN (tracking number) and a photo of the receipt by email to the BTC seller.\n\

Those 2 strings are also using MTCN. Not sure if that is the right term here...

> +import java.util.Map;
+
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.annotation.Nullable;
+
+ at EqualsAndHashCode(callSuper = true)
+ at ToString
+ at Setter
+ at Getter
+ at Slf4j
+public class MoneyGramAccountPayload extends CountryBasedPaymentAccountPayload {

As mentioned in the issue country limitation is probably wrong (also wrong at WU).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq-core/pull/103#pullrequestreview-115968370
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20180427/8079bebe/attachment-0002.html>


More information about the github mailing list