query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Humanreadable description of request for the customer optional string memo = 5;
com.google.protobuf.ByteString getMemoBytes();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6585906", "0.65844226", "0.65844226", "0.65844226", "0.6577161", "0.6533293", "0.6533293", "0.6533293", "0.6492224", "0.6492224", "0.6492224", "0.6492224", "0.6489006", "0.6463484", "0.6463484", "0.6439395", "0.6421381", "0.63958514", "0.6367693", "0.6272251", "0.6272251", "0.6272251", "0.6255467", "0.6255467", "0.6255467", "0.62359333", "0.6085406", "0.60789454", "0.5999008", "0.5986913", "0.5912662", "0.5639692", "0.56175077", "0.5584724", "0.5580113", "0.55542064", "0.55542064", "0.55542064", "0.5519726", "0.55074316", "0.55074316", "0.54742396", "0.54711825", "0.5450919", "0.5450919", "0.5450919", "0.5440557", "0.5429505", "0.5397781", "0.5397781", "0.5397781", "0.5360305", "0.5360305", "0.53522104", "0.53393465", "0.53373915", "0.5308891", "0.5289372", "0.5285602", "0.52843356", "0.5265737", "0.52620643", "0.52371997", "0.52319235", "0.5230502", "0.5220521", "0.52048594", "0.520371", "0.5201008", "0.5200531", "0.51975304", "0.5188884", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5185775", "0.5179849", "0.5179849", "0.51766956", "0.5154039", "0.51538134", "0.51504993", "0.5149471", "0.5149471", "0.5149323", "0.51492393", "0.5149173", "0.5139369", "0.51362336", "0.513503", "0.5129426", "0.512833", "0.5123045", "0.5106914", "0.5106914" ]
0.0
-1
URL to send Payment and get PaymentACK optional string payment_url = 6;
boolean hasPaymentUrl();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "public void autoPay() {}", "String getPaymentInformation();", "void setPaymentMethod(PaymentMethod paymentMethod);", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.80256826", "0.6980822", "0.69090235", "0.6688548", "0.6611434", "0.65964526", "0.6565504", "0.6476589", "0.6458323", "0.64513665", "0.6384907", "0.6384185", "0.6365502", "0.63613033", "0.63592046", "0.6210337", "0.6191012", "0.6185661", "0.61486834", "0.6129377", "0.60795176", "0.60771054", "0.60578895", "0.60336494", "0.59858817", "0.59428304", "0.59387314", "0.5936344", "0.5935076", "0.5932212", "0.5919778", "0.5910342", "0.59091634", "0.5886775", "0.5872107", "0.58506817", "0.5847652", "0.58168167", "0.57537925", "0.5726177", "0.5724655", "0.57218397", "0.57147026", "0.5708963", "0.56726587", "0.56702155", "0.56696624", "0.56289005", "0.5591952", "0.55725414", "0.5568936", "0.5562204", "0.55608237", "0.5552734", "0.5545528", "0.55387807", "0.5505166", "0.5496348", "0.5494464", "0.54811656", "0.5473715", "0.5473218", "0.5455547", "0.5448536", "0.5441001", "0.54340786", "0.5429193", "0.5423579", "0.5402684", "0.54008126", "0.5397096", "0.53676176", "0.5362304", "0.5344667", "0.53353405", "0.53343356", "0.5329618", "0.5323663", "0.53142035", "0.5312862", "0.53118813", "0.53063023", "0.5305259", "0.52897644", "0.52696514", "0.52647185", "0.5262621", "0.5259405", "0.52346504", "0.523025", "0.52300835", "0.52272874", "0.5218169", "0.521555", "0.5211449", "0.5207238", "0.5202055", "0.52013713", "0.52003425", "0.519714" ]
0.6550355
7
URL to send Payment and get PaymentACK optional string payment_url = 6;
java.lang.String getPaymentUrl();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.6980227", "0.69088143", "0.66878295", "0.66115063", "0.65975267", "0.6565925", "0.65518755", "0.64772063", "0.6457564", "0.6451593", "0.6384458", "0.6383388", "0.6366041", "0.6362245", "0.63607705", "0.6210263", "0.61898124", "0.61852676", "0.6147616", "0.6129988", "0.6080698", "0.6076927", "0.6058412", "0.6031431", "0.59856427", "0.5942277", "0.59378994", "0.5937617", "0.59362257", "0.59323347", "0.5921494", "0.5911156", "0.5909989", "0.58883506", "0.58714366", "0.585218", "0.58466995", "0.58157575", "0.5754194", "0.57259154", "0.57256687", "0.5721945", "0.5713502", "0.57079804", "0.5672102", "0.5670566", "0.56691813", "0.56296", "0.5591498", "0.55728877", "0.55688053", "0.5560611", "0.5560283", "0.5551254", "0.55446655", "0.5538667", "0.5504422", "0.5495317", "0.54945385", "0.54808444", "0.5474726", "0.5473705", "0.54555184", "0.54481065", "0.5440958", "0.5432879", "0.5428726", "0.54242593", "0.540161", "0.5400543", "0.5396257", "0.53656447", "0.53615296", "0.5343353", "0.53356403", "0.5334144", "0.5329569", "0.5323391", "0.53144985", "0.5312271", "0.5312208", "0.53051794", "0.53051496", "0.5288981", "0.52685386", "0.5264153", "0.526275", "0.5259683", "0.52343994", "0.5231375", "0.5230777", "0.522749", "0.5218384", "0.5215393", "0.52111095", "0.5206343", "0.5201812", "0.52016383", "0.5199229", "0.5196824" ]
0.8026184
0
URL to send Payment and get PaymentACK optional string payment_url = 6;
com.google.protobuf.ByteString getPaymentUrlBytes();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8026184", "0.69088143", "0.66878295", "0.66115063", "0.65975267", "0.6565925", "0.65518755", "0.64772063", "0.6457564", "0.6451593", "0.6384458", "0.6383388", "0.6366041", "0.6362245", "0.63607705", "0.6210263", "0.61898124", "0.61852676", "0.6147616", "0.6129988", "0.6080698", "0.6076927", "0.6058412", "0.6031431", "0.59856427", "0.5942277", "0.59378994", "0.5937617", "0.59362257", "0.59323347", "0.5921494", "0.5911156", "0.5909989", "0.58883506", "0.58714366", "0.585218", "0.58466995", "0.58157575", "0.5754194", "0.57259154", "0.57256687", "0.5721945", "0.5713502", "0.57079804", "0.5672102", "0.5670566", "0.56691813", "0.56296", "0.5591498", "0.55728877", "0.55688053", "0.5560611", "0.5560283", "0.5551254", "0.55446655", "0.5538667", "0.5504422", "0.5495317", "0.54945385", "0.54808444", "0.5474726", "0.5473705", "0.54555184", "0.54481065", "0.5440958", "0.5432879", "0.5428726", "0.54242593", "0.540161", "0.5400543", "0.5396257", "0.53656447", "0.53615296", "0.5343353", "0.53356403", "0.5334144", "0.5329569", "0.5323391", "0.53144985", "0.5312271", "0.5312208", "0.53051794", "0.53051496", "0.5288981", "0.52685386", "0.5264153", "0.526275", "0.5259683", "0.52343994", "0.5231375", "0.5230777", "0.522749", "0.5218384", "0.5215393", "0.52111095", "0.5206343", "0.5201812", "0.52016383", "0.5199229", "0.5196824" ]
0.6980227
1
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
boolean hasMerchantData();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000020;\n merchantData_ = value;\n }", "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000020);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "void setData(byte[] data) {\n this.data = data;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public String getMerchant() {\n return _merchant;\n }", "public void setPayload(int data) {\n payload = data;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.7631937", "0.76195043", "0.733696", "0.733696", "0.70596427", "0.70596427", "0.63906693", "0.63260716", "0.6267505", "0.6267505", "0.6243509", "0.6243509", "0.608402", "0.6083088", "0.60734", "0.5704557", "0.56059736", "0.5514029", "0.54480094", "0.54480094", "0.5415663", "0.5395114", "0.53570676", "0.5339678", "0.5329479", "0.5300158", "0.52505165", "0.5244725", "0.5198038", "0.5161542", "0.5161427", "0.5150951", "0.5127551", "0.5123566", "0.5119369", "0.5094767", "0.5068022", "0.5064682", "0.5063079", "0.5028807", "0.5028399", "0.502783", "0.5025913", "0.5023619", "0.5012664", "0.50010425", "0.4993671", "0.4982377", "0.49818653", "0.4972097", "0.49628812", "0.49549", "0.4954491", "0.49540997", "0.4953341", "0.49532455", "0.49496344", "0.49473065", "0.4947242", "0.4932948", "0.492636", "0.49199855", "0.49199855", "0.49199855", "0.49199855", "0.4919061", "0.49185425", "0.49093637", "0.49071303", "0.49043027", "0.48953164", "0.4890843", "0.48876825", "0.48849273", "0.4878451", "0.48718622", "0.4869632", "0.48680347", "0.48611084", "0.4855335", "0.48498198", "0.484321", "0.4837225", "0.4830462", "0.4830298", "0.48287177", "0.4828307", "0.4828307", "0.48188978", "0.48175278", "0.4812966", "0.48100978", "0.48092172", "0.48074073", "0.48025775", "0.47980908", "0.479339", "0.47921", "0.47903758" ]
0.52277166
28
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
com.google.protobuf.ByteString getMerchantData();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000020;\n merchantData_ = value;\n }", "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000020);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "void setData(byte[] data) {\n this.data = data;\n }", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public String getMerchant() {\n return _merchant;\n }", "public void setPayload(int data) {\n payload = data;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.76300323", "0.7617597", "0.7059095", "0.7059095", "0.6389361", "0.6324724", "0.6265656", "0.6265656", "0.6243923", "0.6243923", "0.6086128", "0.6081462", "0.60717684", "0.5706813", "0.5610246", "0.5511306", "0.5446434", "0.5446434", "0.541683", "0.53977525", "0.5355959", "0.5341446", "0.5331263", "0.5300884", "0.5252495", "0.52418417", "0.5226436", "0.5226436", "0.5199506", "0.5161985", "0.516113", "0.5153838", "0.51270026", "0.51229614", "0.51187253", "0.50945103", "0.5068383", "0.5064563", "0.50639075", "0.5030928", "0.5029941", "0.50295573", "0.5026745", "0.5022471", "0.501158", "0.5004264", "0.49950758", "0.498435", "0.49805808", "0.4975186", "0.4962245", "0.49571773", "0.4956153", "0.49555865", "0.49542344", "0.4950877", "0.49502397", "0.4946308", "0.4945857", "0.49362367", "0.49276966", "0.49187714", "0.49186146", "0.49186146", "0.49186146", "0.49186146", "0.49183324", "0.49101818", "0.49088922", "0.49033964", "0.48986474", "0.48936906", "0.48887584", "0.4883458", "0.4880903", "0.48748472", "0.48725367", "0.4870911", "0.48614663", "0.48565418", "0.48519433", "0.4841359", "0.48356745", "0.4833025", "0.48276553", "0.48271188", "0.48255527", "0.48255527", "0.48179457", "0.4816771", "0.48131406", "0.48119134", "0.48112005", "0.48089328", "0.48023614", "0.479768", "0.47946352", "0.47932565", "0.47925442" ]
0.73379797
2
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
@java.lang.Override public boolean hasGenesis() { return ((bitField0_ & 0x00000001) != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "Block getBlockByHash(byte[] hash);", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getHash();", "int getClientHashLength();", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash() {\n\t\treturn hash;\n\t}", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String generateBlock(){\n return null;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6927262", "0.667585", "0.6641752", "0.6522562", "0.63241553", "0.63015246", "0.62781", "0.6247412", "0.6167449", "0.6025517", "0.5952364", "0.59229356", "0.5783024", "0.5783024", "0.57362574", "0.56823224", "0.5627969", "0.56225675", "0.56048673", "0.5585004", "0.55720365", "0.5512543", "0.55064183", "0.5503348", "0.5491421", "0.54832345", "0.5450458", "0.5447108", "0.54454356", "0.54323125", "0.54320747", "0.5414614", "0.5413313", "0.5411276", "0.54040694", "0.53846604", "0.53810024", "0.5362061", "0.5362061", "0.5354684", "0.530585", "0.5302721", "0.53009564", "0.5292881", "0.52921015", "0.5272396", "0.5262361", "0.5246798", "0.52458483", "0.5237759", "0.5237289", "0.5236922", "0.5236779", "0.5193596", "0.51752645", "0.5174919", "0.51707715", "0.51638764", "0.51539963", "0.5153503", "0.5148855", "0.5135387", "0.51346236", "0.51261973", "0.5123218", "0.5123218", "0.5123218", "0.51218456", "0.5110199", "0.510511", "0.5102973", "0.50849116", "0.50831", "0.50754523", "0.50743884", "0.50737745", "0.50586647", "0.5055565", "0.5055565", "0.50467384", "0.5037671", "0.50351477", "0.50164294", "0.50150084", "0.50140494", "0.50089", "0.50022095", "0.4989217", "0.4989217", "0.49872896", "0.4986533", "0.49828473", "0.49762282", "0.4975395", "0.4975395", "0.49699154", "0.49671045", "0.49569386", "0.49569386", "0.49500513" ]
0.5683724
15
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
@java.lang.Override public java.lang.String getGenesis() { return genesis_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "Block getBlockByHash(byte[] hash);", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "int getHash();", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getClientHashLength();", "public String getHash() {\n\t\treturn hash;\n\t}", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String generateBlock(){\n return null;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public String getHash() {\n\t\treturn _hash;\n\t}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6927193", "0.6641989", "0.65225834", "0.6324055", "0.6300944", "0.6277257", "0.62475276", "0.6167162", "0.6026396", "0.5953146", "0.5923169", "0.57848513", "0.57848513", "0.5735895", "0.56831145", "0.568288", "0.5627883", "0.56227237", "0.5606991", "0.55866367", "0.5574322", "0.5512874", "0.550862", "0.55038023", "0.54916304", "0.54849905", "0.5450623", "0.544596", "0.5444949", "0.543169", "0.5430706", "0.5417249", "0.54157877", "0.5411514", "0.540398", "0.53841215", "0.5381501", "0.536431", "0.536431", "0.53556556", "0.5307385", "0.5304889", "0.5301996", "0.52944624", "0.5291656", "0.5272587", "0.5263168", "0.5245919", "0.5245335", "0.52389127", "0.52385837", "0.5237658", "0.5236915", "0.5195128", "0.51771903", "0.5174617", "0.5173135", "0.5165873", "0.5156301", "0.5154577", "0.5148964", "0.5135943", "0.51354545", "0.51275796", "0.5125557", "0.5125557", "0.5125557", "0.512205", "0.5110016", "0.5106049", "0.5105192", "0.50843894", "0.5083567", "0.5076644", "0.50744355", "0.50744325", "0.5058675", "0.50543207", "0.50543207", "0.5048228", "0.50374603", "0.5036848", "0.5017614", "0.5016101", "0.50148326", "0.5009116", "0.500225", "0.49885973", "0.4987867", "0.4987867", "0.49870652", "0.49850726", "0.4977891", "0.49777257", "0.49777257", "0.49683353", "0.49659717", "0.49561232", "0.49561232", "0.49505696" ]
0.667675
1
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
@java.lang.Override public com.google.protobuf.ByteString getGenesisBytes() { return com.google.protobuf.ByteString.copyFromUtf8(genesis_); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "Block getBlockByHash(byte[] hash);", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "int getHash();", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getClientHashLength();", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash() {\n\t\treturn hash;\n\t}", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String generateBlock(){\n return null;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6926382", "0.66773117", "0.65233874", "0.6324576", "0.63017154", "0.62788105", "0.6247794", "0.6169162", "0.6027311", "0.59534395", "0.5923081", "0.5784323", "0.5784323", "0.57361966", "0.5683581", "0.568312", "0.56291246", "0.5623782", "0.5605472", "0.5585503", "0.5572977", "0.5512998", "0.5507533", "0.5504396", "0.5492604", "0.5486275", "0.54520786", "0.5447422", "0.54460204", "0.5433469", "0.5431714", "0.54162747", "0.5415245", "0.5411663", "0.5405281", "0.53859353", "0.5380344", "0.5363442", "0.5363442", "0.5354605", "0.5306142", "0.5303665", "0.5301465", "0.5294738", "0.5293774", "0.52724296", "0.5262588", "0.52468306", "0.5246396", "0.52383494", "0.52380025", "0.5237309", "0.52371395", "0.5195302", "0.5177193", "0.5175733", "0.5171677", "0.5165135", "0.51549035", "0.5154111", "0.5150341", "0.5137048", "0.51352364", "0.5127626", "0.51244617", "0.5124077", "0.5124077", "0.5124077", "0.5111016", "0.51055795", "0.5104613", "0.5088002", "0.5082135", "0.5078255", "0.5075151", "0.5073619", "0.50578964", "0.50569504", "0.50569504", "0.504746", "0.50407666", "0.5035865", "0.50176865", "0.50156236", "0.50155556", "0.50098497", "0.50023955", "0.49905786", "0.49905786", "0.49880874", "0.49853972", "0.49840862", "0.49766058", "0.49766058", "0.49759609", "0.4972321", "0.4968654", "0.4958243", "0.4958243", "0.49503064" ]
0.66424996
2
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
private void setGenesis( java.lang.String value) { java.lang.Class<?> valueClass = value.getClass(); bitField0_ |= 0x00000001; genesis_ = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "Block getBlockByHash(byte[] hash);", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "int getHash();", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getClientHashLength();", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash() {\n\t\treturn hash;\n\t}", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String generateBlock(){\n return null;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6927208", "0.6677202", "0.66426426", "0.65233", "0.6325492", "0.6301133", "0.6278923", "0.6247778", "0.61684054", "0.6026342", "0.59531325", "0.59239745", "0.5783109", "0.5783109", "0.57365197", "0.5683801", "0.568366", "0.5629013", "0.5623869", "0.56038487", "0.5584258", "0.557094", "0.5506202", "0.5503636", "0.54910725", "0.54842967", "0.5451885", "0.5447901", "0.5445707", "0.5433288", "0.54319334", "0.5415159", "0.54128075", "0.54121125", "0.5404796", "0.53857213", "0.5380276", "0.53621066", "0.53621066", "0.5354611", "0.53046376", "0.5303355", "0.5300909", "0.52937376", "0.529188", "0.52718467", "0.5261775", "0.5246618", "0.5245486", "0.523786", "0.52375287", "0.5236766", "0.52367544", "0.519359", "0.5175988", "0.5175348", "0.5171025", "0.51646835", "0.51542646", "0.51532006", "0.5149615", "0.51363516", "0.51337415", "0.512565", "0.5123582", "0.5123582", "0.5123582", "0.5123544", "0.5110774", "0.5104745", "0.5103525", "0.508705", "0.5082297", "0.50768715", "0.50748307", "0.5072381", "0.50574213", "0.5056443", "0.5056443", "0.50472605", "0.5039753", "0.5035076", "0.50162137", "0.50149256", "0.50142115", "0.5009398", "0.5001379", "0.49901065", "0.49901065", "0.4986799", "0.49858057", "0.49823135", "0.49757475", "0.49757475", "0.49756223", "0.4971661", "0.49678743", "0.49570286", "0.49570286", "0.4949644" ]
0.5512136
22
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
private void clearGenesis() { bitField0_ = (bitField0_ & ~0x00000001); genesis_ = getDefaultInstance().getGenesis(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "Block getBlockByHash(byte[] hash);", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getHash();", "int getClientHashLength();", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash() {\n\t\treturn hash;\n\t}", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String generateBlock(){\n return null;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6927262", "0.667585", "0.6641752", "0.6522562", "0.63241553", "0.63015246", "0.62781", "0.6247412", "0.6167449", "0.6025517", "0.5952364", "0.59229356", "0.5783024", "0.5783024", "0.57362574", "0.5683724", "0.56823224", "0.5627969", "0.56225675", "0.56048673", "0.5585004", "0.55720365", "0.5512543", "0.55064183", "0.5503348", "0.5491421", "0.54832345", "0.5450458", "0.5447108", "0.54454356", "0.54323125", "0.54320747", "0.5414614", "0.5413313", "0.54040694", "0.53846604", "0.53810024", "0.5362061", "0.5362061", "0.5354684", "0.530585", "0.5302721", "0.53009564", "0.5292881", "0.52921015", "0.5272396", "0.5262361", "0.5246798", "0.52458483", "0.5237759", "0.5237289", "0.5236922", "0.5236779", "0.5193596", "0.51752645", "0.5174919", "0.51707715", "0.51638764", "0.51539963", "0.5153503", "0.5148855", "0.5135387", "0.51346236", "0.51261973", "0.5123218", "0.5123218", "0.5123218", "0.51218456", "0.5110199", "0.510511", "0.5102973", "0.50849116", "0.50831", "0.50754523", "0.50743884", "0.50737745", "0.50586647", "0.5055565", "0.5055565", "0.50467384", "0.5037671", "0.50351477", "0.50164294", "0.50150084", "0.50140494", "0.50089", "0.50022095", "0.4989217", "0.4989217", "0.49872896", "0.4986533", "0.49828473", "0.49762282", "0.4975395", "0.4975395", "0.49699154", "0.49671045", "0.49569386", "0.49569386", "0.49500513" ]
0.5411276
34
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
private void setGenesisBytes( com.google.protobuf.ByteString value) { genesis_ = value.toStringUtf8(); bitField0_ |= 0x00000001; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "Block getBlockByHash(byte[] hash);", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "int getHash();", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getClientHashLength();", "public String getHash() {\n\t\treturn hash;\n\t}", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String generateBlock(){\n return null;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public String getHash() {\n\t\treturn _hash;\n\t}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6927193", "0.667675", "0.6641989", "0.65225834", "0.6324055", "0.6277257", "0.62475276", "0.6167162", "0.6026396", "0.5953146", "0.5923169", "0.57848513", "0.57848513", "0.5735895", "0.56831145", "0.568288", "0.5627883", "0.56227237", "0.5606991", "0.55866367", "0.5574322", "0.5512874", "0.550862", "0.55038023", "0.54916304", "0.54849905", "0.5450623", "0.544596", "0.5444949", "0.543169", "0.5430706", "0.5417249", "0.54157877", "0.5411514", "0.540398", "0.53841215", "0.5381501", "0.536431", "0.536431", "0.53556556", "0.5307385", "0.5304889", "0.5301996", "0.52944624", "0.5291656", "0.5272587", "0.5263168", "0.5245919", "0.5245335", "0.52389127", "0.52385837", "0.5237658", "0.5236915", "0.5195128", "0.51771903", "0.5174617", "0.5173135", "0.5165873", "0.5156301", "0.5154577", "0.5148964", "0.5135943", "0.51354545", "0.51275796", "0.5125557", "0.5125557", "0.5125557", "0.512205", "0.5110016", "0.5106049", "0.5105192", "0.50843894", "0.5083567", "0.5076644", "0.50744355", "0.50744325", "0.5058675", "0.50543207", "0.50543207", "0.5048228", "0.50374603", "0.5036848", "0.5017614", "0.5016101", "0.50148326", "0.5009116", "0.500225", "0.49885973", "0.4987867", "0.4987867", "0.49870652", "0.49850726", "0.4977891", "0.49777257", "0.49777257", "0.49683353", "0.49659717", "0.49561232", "0.49561232", "0.49505696" ]
0.6300944
5
Where payment should be sent repeated .payments.Output outputs = 2;
@java.lang.Override public java.util.List<com.dogecoin.protocols.payments.Protos.Output> getOutputsList() { return outputs_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}" ]
[ "0.61889356", "0.61716366", "0.59775674", "0.5939274", "0.5919283", "0.5902915", "0.58987474", "0.5882188", "0.5838648", "0.5800277", "0.5730218", "0.57213587", "0.56207657", "0.56170195", "0.55952394", "0.5572764", "0.55582607", "0.55220014", "0.5513604", "0.5511885", "0.55036163", "0.54878557", "0.54509014", "0.5445272", "0.54366237", "0.5435872", "0.5433543", "0.54156375", "0.53950316", "0.5366789", "0.5355474", "0.5347812", "0.5335905", "0.5309579", "0.52967167", "0.52933896", "0.5288708", "0.5279609", "0.52329385", "0.5220507", "0.52199197", "0.521781", "0.52107275", "0.521071", "0.5208446", "0.52054214", "0.5199339", "0.51880383", "0.51868075", "0.51841766", "0.51683265", "0.5155095", "0.51537156", "0.515283", "0.5145046", "0.51436293", "0.51409006", "0.51405925", "0.5139869", "0.513462", "0.5123272", "0.51180637", "0.5114326", "0.5107666", "0.5103886", "0.50997835", "0.50994617", "0.50991565", "0.5082842", "0.50826347", "0.50726056", "0.50690544", "0.5064763", "0.5063366", "0.50602365", "0.50563455", "0.505275", "0.5051821", "0.50416505", "0.50393885", "0.5038752", "0.50373745", "0.5036622", "0.5028214", "0.5024635", "0.5023041", "0.5018727", "0.50159854", "0.50147367", "0.5011746", "0.5005649", "0.5000691", "0.49988133", "0.4994527", "0.499186", "0.4991461", "0.4988242", "0.49862975", "0.49827713", "0.4978018", "0.49764577" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
public java.util.List<? extends com.dogecoin.protocols.payments.Protos.OutputOrBuilder> getOutputsOrBuilderList() { return outputs_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "void paymentOrder(long orderId);", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "public void pay(InternalAccountOwner from, InternalAccountOwner to, BigDecimal amount) {\n PerformPaymentData data;\n try {\n data = transactionService.getPaymentData(from, to, null);\n } catch (EntityNotFoundException e) {\n System.out.println(\"Some of the users were not found. Transaction aborted.\");\n return;\n }\n\n // try to figure out the type of payment (for some reason)\n List<TransferTypeWithCurrencyVO> types = data.getPaymentTypes();\n TransferTypeWithCurrencyVO paymentType = CollectionHelper.first(types);\n if (paymentType == null) {\n System.out.println(\"There is no possible payment type.\");\n }\n\n // set up payment to be made\n PerformPaymentDTO payment = new PerformPaymentDTO();\n payment.setType(paymentType);\n payment.setFrom(from);\n payment.setTo(to);\n payment.setAmount(amount);\n\n try {\n PaymentVO result = paymentService.perform(payment);\n TransactionAuthorizationStatus authStatus = result.getAuthorizationStatus();\n if (authStatus == TransactionAuthorizationStatus.PENDING_AUTHORIZATION) {\n System.out.println(\"The payment is pending authorization.\");\n } else {\n System.out.println(\"The payment has been processed.\");\n }\n } catch (InsufficientBalanceException e) {\n System.out.println(\"Insufficient balance\");\n } catch (MaxPaymentsPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MinTimeBetweenPaymentsException e) {\n System.out.println(\"A minimum period of time should be awaited to make \"\n + \"a payment of this type\");\n } catch (MaxAmountPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (Exception e) {\n System.out.println(\"The payment couldn't be performed\");\n }\n\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}" ]
[ "0.6189728", "0.61718285", "0.5977192", "0.5939357", "0.5918659", "0.59034014", "0.5898379", "0.5881606", "0.5838093", "0.58015126", "0.57310265", "0.5721403", "0.5620485", "0.56169635", "0.55954003", "0.5573718", "0.55580556", "0.5521689", "0.5514021", "0.55125624", "0.55041355", "0.548723", "0.54501307", "0.5445418", "0.5436704", "0.54362327", "0.5433203", "0.54160416", "0.53965473", "0.5368001", "0.5354394", "0.5349159", "0.53365266", "0.5309449", "0.52962303", "0.5294125", "0.52889377", "0.52800035", "0.52336025", "0.5221407", "0.52202225", "0.52170765", "0.5211051", "0.5210623", "0.52098566", "0.5205186", "0.5199939", "0.5189992", "0.5186849", "0.51852405", "0.51693857", "0.51556146", "0.51536286", "0.51535213", "0.5144993", "0.5143303", "0.5141935", "0.5140946", "0.5140417", "0.5135174", "0.51229525", "0.51190794", "0.51132345", "0.510806", "0.5103693", "0.5101224", "0.5099772", "0.50971353", "0.5083432", "0.50826865", "0.5072962", "0.5069325", "0.506653", "0.5064391", "0.5061817", "0.50561184", "0.5052614", "0.5052424", "0.5042602", "0.5039886", "0.5038208", "0.50379044", "0.5037628", "0.5028323", "0.5024976", "0.502224", "0.501936", "0.50169206", "0.50142473", "0.50117624", "0.50066406", "0.50010026", "0.49991363", "0.49946624", "0.49910918", "0.49908563", "0.49881998", "0.4986574", "0.49841088", "0.4977202", "0.4977158" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
@java.lang.Override public int getOutputsCount() { return outputs_.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
@java.lang.Override public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) { return outputs_.get(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.50230557
85
Where payment should be sent repeated .payments.Output outputs = 2;
public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder( int index) { return outputs_.get(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}" ]
[ "0.61889356", "0.61716366", "0.59775674", "0.5939274", "0.5919283", "0.5902915", "0.58987474", "0.5882188", "0.5838648", "0.5800277", "0.5730218", "0.57213587", "0.56207657", "0.56170195", "0.55952394", "0.5572764", "0.55582607", "0.55220014", "0.5513604", "0.5511885", "0.55036163", "0.54878557", "0.54509014", "0.5445272", "0.54366237", "0.5435872", "0.5433543", "0.54156375", "0.53950316", "0.5366789", "0.5355474", "0.5347812", "0.5335905", "0.5309579", "0.52967167", "0.52933896", "0.5288708", "0.5279609", "0.52329385", "0.5220507", "0.52199197", "0.521781", "0.52107275", "0.521071", "0.5208446", "0.52054214", "0.5199339", "0.51880383", "0.51868075", "0.51841766", "0.51683265", "0.5155095", "0.51537156", "0.515283", "0.5145046", "0.51436293", "0.51409006", "0.51405925", "0.5139869", "0.513462", "0.5123272", "0.51180637", "0.5114326", "0.5107666", "0.5103886", "0.50997835", "0.50994617", "0.50991565", "0.5082842", "0.50826347", "0.50726056", "0.50690544", "0.5064763", "0.5063366", "0.50602365", "0.50563455", "0.505275", "0.5051821", "0.50416505", "0.50393885", "0.5038752", "0.50373745", "0.5036622", "0.5028214", "0.5024635", "0.5023041", "0.5018727", "0.50159854", "0.50147367", "0.5011746", "0.5005649", "0.5000691", "0.49988133", "0.4994527", "0.499186", "0.4991461", "0.4988242", "0.49862975", "0.49827713", "0.4978018", "0.49764577" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
private void setOutputs( int index, com.dogecoin.protocols.payments.Protos.Output value) { value.getClass(); ensureOutputsIsMutable(); outputs_.set(index, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "void paymentOrder(long orderId);", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "public void pay(InternalAccountOwner from, InternalAccountOwner to, BigDecimal amount) {\n PerformPaymentData data;\n try {\n data = transactionService.getPaymentData(from, to, null);\n } catch (EntityNotFoundException e) {\n System.out.println(\"Some of the users were not found. Transaction aborted.\");\n return;\n }\n\n // try to figure out the type of payment (for some reason)\n List<TransferTypeWithCurrencyVO> types = data.getPaymentTypes();\n TransferTypeWithCurrencyVO paymentType = CollectionHelper.first(types);\n if (paymentType == null) {\n System.out.println(\"There is no possible payment type.\");\n }\n\n // set up payment to be made\n PerformPaymentDTO payment = new PerformPaymentDTO();\n payment.setType(paymentType);\n payment.setFrom(from);\n payment.setTo(to);\n payment.setAmount(amount);\n\n try {\n PaymentVO result = paymentService.perform(payment);\n TransactionAuthorizationStatus authStatus = result.getAuthorizationStatus();\n if (authStatus == TransactionAuthorizationStatus.PENDING_AUTHORIZATION) {\n System.out.println(\"The payment is pending authorization.\");\n } else {\n System.out.println(\"The payment has been processed.\");\n }\n } catch (InsufficientBalanceException e) {\n System.out.println(\"Insufficient balance\");\n } catch (MaxPaymentsPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MinTimeBetweenPaymentsException e) {\n System.out.println(\"A minimum period of time should be awaited to make \"\n + \"a payment of this type\");\n } catch (MaxAmountPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (Exception e) {\n System.out.println(\"The payment couldn't be performed\");\n }\n\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}" ]
[ "0.6189728", "0.61718285", "0.5977192", "0.5939357", "0.5918659", "0.59034014", "0.5898379", "0.5881606", "0.5838093", "0.58015126", "0.57310265", "0.5721403", "0.5620485", "0.56169635", "0.55954003", "0.5573718", "0.55580556", "0.5521689", "0.5514021", "0.55125624", "0.55041355", "0.548723", "0.54501307", "0.5445418", "0.5436704", "0.54362327", "0.5433203", "0.54160416", "0.53965473", "0.5368001", "0.5354394", "0.5349159", "0.53365266", "0.5309449", "0.52962303", "0.5294125", "0.52889377", "0.52800035", "0.52336025", "0.5221407", "0.52202225", "0.52170765", "0.5211051", "0.5210623", "0.52098566", "0.5205186", "0.5199939", "0.5189992", "0.5186849", "0.51852405", "0.51693857", "0.51556146", "0.51536286", "0.51535213", "0.5144993", "0.5143303", "0.5141935", "0.5140946", "0.5140417", "0.5135174", "0.51229525", "0.51190794", "0.51132345", "0.510806", "0.5103693", "0.5101224", "0.5099772", "0.50971353", "0.5083432", "0.50826865", "0.5072962", "0.5069325", "0.506653", "0.5064391", "0.5061817", "0.50561184", "0.5052614", "0.5052424", "0.5042602", "0.5039886", "0.5038208", "0.50379044", "0.5037628", "0.5028323", "0.5024976", "0.502224", "0.501936", "0.50169206", "0.50142473", "0.50117624", "0.50066406", "0.50010026", "0.49991363", "0.49946624", "0.49910918", "0.49908563", "0.49881998", "0.4986574", "0.49841088", "0.4977202", "0.4977158" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) { value.getClass(); ensureOutputsIsMutable(); outputs_.add(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.51419467
56
Where payment should be sent repeated .payments.Output outputs = 2;
private void addOutputs( int index, com.dogecoin.protocols.payments.Protos.Output value) { value.getClass(); ensureOutputsIsMutable(); outputs_.add(index, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.5169085
50
Where payment should be sent repeated .payments.Output outputs = 2;
private void addAllOutputs( java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) { ensureOutputsIsMutable(); com.google.protobuf.AbstractMessageLite.addAll( values, outputs_); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}" ]
[ "0.61889356", "0.61716366", "0.59775674", "0.5939274", "0.5919283", "0.5902915", "0.58987474", "0.5882188", "0.5838648", "0.5800277", "0.5730218", "0.57213587", "0.56207657", "0.56170195", "0.55952394", "0.5572764", "0.55582607", "0.55220014", "0.5513604", "0.5511885", "0.55036163", "0.54878557", "0.54509014", "0.5445272", "0.54366237", "0.5435872", "0.5433543", "0.54156375", "0.53950316", "0.5366789", "0.5355474", "0.5347812", "0.5335905", "0.5309579", "0.52967167", "0.52933896", "0.5288708", "0.5279609", "0.52329385", "0.5220507", "0.52199197", "0.521781", "0.52107275", "0.521071", "0.5208446", "0.52054214", "0.51880383", "0.51868075", "0.51841766", "0.51683265", "0.5155095", "0.51537156", "0.515283", "0.5145046", "0.51436293", "0.51409006", "0.51405925", "0.5139869", "0.513462", "0.5123272", "0.51180637", "0.5114326", "0.5107666", "0.5103886", "0.50997835", "0.50994617", "0.50991565", "0.5082842", "0.50826347", "0.50726056", "0.50690544", "0.5064763", "0.5063366", "0.50602365", "0.50563455", "0.505275", "0.5051821", "0.50416505", "0.50393885", "0.5038752", "0.50373745", "0.5036622", "0.5028214", "0.5024635", "0.5023041", "0.5018727", "0.50159854", "0.50147367", "0.5011746", "0.5005649", "0.5000691", "0.49988133", "0.4994527", "0.499186", "0.4991461", "0.4988242", "0.49862975", "0.49827713", "0.4978018", "0.49764577" ]
0.5199339
46
Where payment should be sent repeated .payments.Output outputs = 2;
private void clearOutputs() { outputs_ = emptyProtobufList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "void paymentOrder(long orderId);", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "public void pay(InternalAccountOwner from, InternalAccountOwner to, BigDecimal amount) {\n PerformPaymentData data;\n try {\n data = transactionService.getPaymentData(from, to, null);\n } catch (EntityNotFoundException e) {\n System.out.println(\"Some of the users were not found. Transaction aborted.\");\n return;\n }\n\n // try to figure out the type of payment (for some reason)\n List<TransferTypeWithCurrencyVO> types = data.getPaymentTypes();\n TransferTypeWithCurrencyVO paymentType = CollectionHelper.first(types);\n if (paymentType == null) {\n System.out.println(\"There is no possible payment type.\");\n }\n\n // set up payment to be made\n PerformPaymentDTO payment = new PerformPaymentDTO();\n payment.setType(paymentType);\n payment.setFrom(from);\n payment.setTo(to);\n payment.setAmount(amount);\n\n try {\n PaymentVO result = paymentService.perform(payment);\n TransactionAuthorizationStatus authStatus = result.getAuthorizationStatus();\n if (authStatus == TransactionAuthorizationStatus.PENDING_AUTHORIZATION) {\n System.out.println(\"The payment is pending authorization.\");\n } else {\n System.out.println(\"The payment has been processed.\");\n }\n } catch (InsufficientBalanceException e) {\n System.out.println(\"Insufficient balance\");\n } catch (MaxPaymentsPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MinTimeBetweenPaymentsException e) {\n System.out.println(\"A minimum period of time should be awaited to make \"\n + \"a payment of this type\");\n } catch (MaxAmountPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (Exception e) {\n System.out.println(\"The payment couldn't be performed\");\n }\n\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}" ]
[ "0.6189728", "0.61718285", "0.5977192", "0.5939357", "0.5918659", "0.59034014", "0.5898379", "0.5881606", "0.5838093", "0.58015126", "0.57310265", "0.5721403", "0.5620485", "0.56169635", "0.55954003", "0.5573718", "0.55580556", "0.5521689", "0.5514021", "0.55125624", "0.55041355", "0.548723", "0.54501307", "0.5445418", "0.5436704", "0.54362327", "0.5433203", "0.54160416", "0.53965473", "0.5368001", "0.5354394", "0.5349159", "0.53365266", "0.5309449", "0.52962303", "0.5294125", "0.52889377", "0.52800035", "0.52336025", "0.5221407", "0.52202225", "0.52170765", "0.5211051", "0.5210623", "0.52098566", "0.5205186", "0.5199939", "0.5189992", "0.5186849", "0.51852405", "0.51693857", "0.51556146", "0.51536286", "0.51535213", "0.5144993", "0.5143303", "0.5141935", "0.5140946", "0.5140417", "0.5135174", "0.51229525", "0.51190794", "0.51132345", "0.510806", "0.5103693", "0.5101224", "0.5099772", "0.50971353", "0.5083432", "0.50826865", "0.5072962", "0.5069325", "0.506653", "0.5064391", "0.5061817", "0.50561184", "0.5052614", "0.5052424", "0.5042602", "0.5039886", "0.5038208", "0.50379044", "0.5037628", "0.5028323", "0.5024976", "0.502224", "0.501936", "0.50169206", "0.50142473", "0.50117624", "0.50066406", "0.50010026", "0.49991363", "0.49946624", "0.49910918", "0.49908563", "0.49881998", "0.4986574", "0.49841088", "0.4977202", "0.4977158" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
private void removeOutputs(int index) { ensureOutputsIsMutable(); outputs_.remove(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.0
-1
Timestamp; when payment request created required uint64 time = 3;
@java.lang.Override public boolean hasTime() { return ((bitField0_ & 0x00000002) != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigInteger getResponse_time();", "com.google.protobuf.Timestamp getSubmitTime();", "com.google.protobuf.Timestamp getSendTime();", "public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}", "double getClientTime();", "long getCreateTime();", "long getCreateTime();", "Long timestamp();", "public int getTime() { return _time; }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "long getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "int getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "int getCreateTime();", "com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder();", "@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}", "com.google.protobuf.ByteString getSignedTimeStamp();", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public abstract long now();", "com.google.protobuf.Timestamp getCurrentStateTime();", "long getRetrievedTime();", "com.google.protobuf.ByteString\n getTimeBytes();", "public Date getPayTime() {\n return payTime;\n }", "public Date getPayTime() {\n return payTime;\n }", "OffsetDateTime creationTime();", "public long getSentTime();", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();", "public long getTimeStamp() {return timeStamp;}", "long getTimeStamp();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "public Date getRequesttime() {\n return requesttime;\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "public long getTimestamp() {\n return timestamp_;\n }", "com.google.protobuf.StringValue getTransactionDateTime();", "public Timestamp() {\n makeNow();\n }", "public Long getCreatetime() {\n return createtime;\n }", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "@ApiModelProperty(example = \"1518811817\", value = \"The transaction time in seconds since epoch.\")\n public Long getTransactionTime() {\n return transactionTime;\n }", "public double getTime() {return _time;}", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantity\r\n \t\r\n \tmillis = (timeStamp >> 16) & 0x00000000ffffffffL; // this is a 32 bit quantity\r\n \t\r\n \tmicros = timeStamp & 0x0000ffffL; // this is a 16 bit quantity\r\n \t \r\n }", "public String getReqTime() {\n return reqTime;\n }", "com.google.protobuf.Timestamp getVotingStartTime();", "public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }", "UtcT time_stamp () throws BaseException;", "public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTime(){\n return this.time;\n }", "@Override\n public long getTime() {\n return time;\n }", "public Date getTimeCreate() {\n return timeCreate;\n }", "public int getTimeStamp() {\n return timeStamp;\n }", "com.google.protobuf.Timestamp getTimestamp();", "OffsetDateTime timeCreated();", "@ApiModelProperty(value = \"The timestamp that the `last_price` represents.\")\n public OffsetDateTime getTime() {\n return time;\n }", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public long getCreateTime() {\n return createTime_;\n }", "public void setRequesttime(Date requesttime) {\n this.requesttime = requesttime;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();", "public int getCreateTime() {\n return createTime_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }" ]
[ "0.6862211", "0.6237775", "0.62266433", "0.61695325", "0.60990685", "0.60972226", "0.60972226", "0.60893995", "0.6078815", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.6055824", "0.6020825", "0.60091877", "0.60091877", "0.60067695", "0.59987754", "0.59873265", "0.59873265", "0.59873265", "0.59873265", "0.59873265", "0.59723383", "0.595153", "0.5931082", "0.5928206", "0.5916059", "0.5901096", "0.58967894", "0.5895911", "0.58947", "0.58563536", "0.5855777", "0.5855777", "0.5852643", "0.5849752", "0.58449316", "0.58393747", "0.5831907", "0.58238155", "0.5813723", "0.5813723", "0.5813723", "0.5801328", "0.57940394", "0.5783561", "0.5763269", "0.5751006", "0.5742821", "0.5742055", "0.5741806", "0.57363063", "0.5728784", "0.57270056", "0.5723633", "0.5720142", "0.57121485", "0.5709514", "0.57070845", "0.57020074", "0.57012177", "0.5686845", "0.5684942", "0.5678584", "0.5677381", "0.5673478", "0.56714153", "0.56699455", "0.56632763", "0.5660532", "0.5658431", "0.56533337", "0.56533337", "0.5650431", "0.5647556", "0.5647556", "0.5645724", "0.5643661", "0.5642724", "0.5639663", "0.5639663", "0.5631543", "0.56246406", "0.56216794", "0.5618763", "0.5618494", "0.5618494" ]
0.0
-1
Timestamp; when payment request created required uint64 time = 3;
@java.lang.Override public long getTime() { return time_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigInteger getResponse_time();", "com.google.protobuf.Timestamp getSubmitTime();", "com.google.protobuf.Timestamp getSendTime();", "public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}", "double getClientTime();", "long getCreateTime();", "long getCreateTime();", "Long timestamp();", "public int getTime() { return _time; }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "long getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "int getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "int getCreateTime();", "com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder();", "com.google.protobuf.ByteString getSignedTimeStamp();", "@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public abstract long now();", "com.google.protobuf.Timestamp getCurrentStateTime();", "long getRetrievedTime();", "com.google.protobuf.ByteString\n getTimeBytes();", "public Date getPayTime() {\n return payTime;\n }", "public Date getPayTime() {\n return payTime;\n }", "OffsetDateTime creationTime();", "public long getSentTime();", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();", "public long getTimeStamp() {return timeStamp;}", "long getTimeStamp();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "public Date getRequesttime() {\n return requesttime;\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "public long getTimestamp() {\n return timestamp_;\n }", "public Timestamp() {\n makeNow();\n }", "public Long getCreatetime() {\n return createtime;\n }", "com.google.protobuf.StringValue getTransactionDateTime();", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "@ApiModelProperty(example = \"1518811817\", value = \"The transaction time in seconds since epoch.\")\n public Long getTransactionTime() {\n return transactionTime;\n }", "public double getTime() {return _time;}", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantity\r\n \t\r\n \tmillis = (timeStamp >> 16) & 0x00000000ffffffffL; // this is a 32 bit quantity\r\n \t\r\n \tmicros = timeStamp & 0x0000ffffL; // this is a 16 bit quantity\r\n \t \r\n }", "public String getReqTime() {\n return reqTime;\n }", "com.google.protobuf.Timestamp getVotingStartTime();", "public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }", "UtcT time_stamp () throws BaseException;", "public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTime(){\n return this.time;\n }", "@Override\n public long getTime() {\n return time;\n }", "public Date getTimeCreate() {\n return timeCreate;\n }", "public int getTimeStamp() {\n return timeStamp;\n }", "com.google.protobuf.Timestamp getTimestamp();", "OffsetDateTime timeCreated();", "@ApiModelProperty(value = \"The timestamp that the `last_price` represents.\")\n public OffsetDateTime getTime() {\n return time;\n }", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public long getCreateTime() {\n return createTime_;\n }", "public void setRequesttime(Date requesttime) {\n this.requesttime = requesttime;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();", "public int getCreateTime() {\n return createTime_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}" ]
[ "0.68621355", "0.6238935", "0.6227435", "0.6166707", "0.60987115", "0.60976493", "0.60976493", "0.6091248", "0.60792816", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.60551953", "0.6022326", "0.6010585", "0.6010585", "0.60080326", "0.59980756", "0.59886926", "0.59886926", "0.59886926", "0.59886926", "0.59886926", "0.5972562", "0.59528756", "0.5929773", "0.59295505", "0.5917816", "0.59023833", "0.5896914", "0.58961976", "0.5893963", "0.5858191", "0.58535326", "0.58535326", "0.5852875", "0.58494747", "0.58441234", "0.5841095", "0.5833209", "0.582495", "0.5815562", "0.5815562", "0.5815562", "0.5800886", "0.57941383", "0.5781144", "0.57634455", "0.57520866", "0.57430893", "0.5742395", "0.57414854", "0.57376987", "0.57293177", "0.5727403", "0.57253665", "0.5719494", "0.5712719", "0.5709133", "0.57079434", "0.570333", "0.5702178", "0.5687681", "0.5686048", "0.56789744", "0.56773245", "0.5674543", "0.5673336", "0.56699896", "0.566345", "0.5662425", "0.5659543", "0.5654421", "0.5654421", "0.56515753", "0.56486255", "0.56486255", "0.5647216", "0.5643947", "0.5642213", "0.56404", "0.56404", "0.5632287", "0.5624811", "0.5622702", "0.56196266", "0.56196266", "0.5619617" ]
0.0
-1
Timestamp; when payment request created required uint64 time = 3;
private void setTime(long value) { bitField0_ |= 0x00000002; time_ = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigInteger getResponse_time();", "com.google.protobuf.Timestamp getSubmitTime();", "com.google.protobuf.Timestamp getSendTime();", "public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}", "double getClientTime();", "long getCreateTime();", "long getCreateTime();", "Long timestamp();", "public int getTime() { return _time; }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "long getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "int getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "int getCreateTime();", "com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder();", "@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}", "com.google.protobuf.ByteString getSignedTimeStamp();", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public abstract long now();", "com.google.protobuf.Timestamp getCurrentStateTime();", "long getRetrievedTime();", "com.google.protobuf.ByteString\n getTimeBytes();", "public Date getPayTime() {\n return payTime;\n }", "public Date getPayTime() {\n return payTime;\n }", "OffsetDateTime creationTime();", "public long getSentTime();", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();", "public long getTimeStamp() {return timeStamp;}", "long getTimeStamp();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "public Date getRequesttime() {\n return requesttime;\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "public long getTimestamp() {\n return timestamp_;\n }", "public Timestamp() {\n makeNow();\n }", "public Long getCreatetime() {\n return createtime;\n }", "com.google.protobuf.StringValue getTransactionDateTime();", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "@ApiModelProperty(example = \"1518811817\", value = \"The transaction time in seconds since epoch.\")\n public Long getTransactionTime() {\n return transactionTime;\n }", "public double getTime() {return _time;}", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantity\r\n \t\r\n \tmillis = (timeStamp >> 16) & 0x00000000ffffffffL; // this is a 32 bit quantity\r\n \t\r\n \tmicros = timeStamp & 0x0000ffffL; // this is a 16 bit quantity\r\n \t \r\n }", "public String getReqTime() {\n return reqTime;\n }", "com.google.protobuf.Timestamp getVotingStartTime();", "public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }", "UtcT time_stamp () throws BaseException;", "public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTime(){\n return this.time;\n }", "public Date getTimeCreate() {\n return timeCreate;\n }", "@Override\n public long getTime() {\n return time;\n }", "public int getTimeStamp() {\n return timeStamp;\n }", "com.google.protobuf.Timestamp getTimestamp();", "OffsetDateTime timeCreated();", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "@ApiModelProperty(value = \"The timestamp that the `last_price` represents.\")\n public OffsetDateTime getTime() {\n return time;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public long getCreateTime() {\n return createTime_;\n }", "public void setRequesttime(Date requesttime) {\n this.requesttime = requesttime;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();", "public int getCreateTime() {\n return createTime_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }" ]
[ "0.6860514", "0.6237032", "0.6225305", "0.6167018", "0.60975635", "0.6097323", "0.6097323", "0.609119", "0.6077096", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.605383", "0.60223824", "0.6010532", "0.6010532", "0.600802", "0.5996654", "0.5987994", "0.5987994", "0.5987994", "0.5987994", "0.5987994", "0.5972122", "0.5950463", "0.5929831", "0.5928889", "0.59180427", "0.59020984", "0.5897282", "0.589528", "0.5892568", "0.5855115", "0.5853071", "0.5853071", "0.58529663", "0.5848157", "0.58434176", "0.5838795", "0.5832858", "0.5824928", "0.58143187", "0.58143187", "0.58143187", "0.57995135", "0.57920694", "0.57827055", "0.57634515", "0.57518494", "0.57435244", "0.5741935", "0.57414496", "0.5737626", "0.57275474", "0.572538", "0.572366", "0.5718399", "0.5712028", "0.57094455", "0.5707663", "0.5702323", "0.57019734", "0.56877583", "0.5683615", "0.56768376", "0.5676671", "0.56740946", "0.56726605", "0.5670024", "0.5661865", "0.566147", "0.56594145", "0.56543064", "0.56543064", "0.5651394", "0.56484985", "0.56484985", "0.5646807", "0.5643743", "0.5640673", "0.5640212", "0.5640212", "0.56311524", "0.5624529", "0.5622499", "0.5619785", "0.5619452", "0.5619452" ]
0.0
-1
Timestamp; when payment request created required uint64 time = 3;
private void clearTime() { bitField0_ = (bitField0_ & ~0x00000002); time_ = 0L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigInteger getResponse_time();", "com.google.protobuf.Timestamp getSubmitTime();", "com.google.protobuf.Timestamp getSendTime();", "public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}", "double getClientTime();", "long getCreateTime();", "long getCreateTime();", "Long timestamp();", "public int getTime() { return _time; }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "long getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "int getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "int getCreateTime();", "com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder();", "@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}", "com.google.protobuf.ByteString getSignedTimeStamp();", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public abstract long now();", "com.google.protobuf.Timestamp getCurrentStateTime();", "long getRetrievedTime();", "com.google.protobuf.ByteString\n getTimeBytes();", "public Date getPayTime() {\n return payTime;\n }", "public Date getPayTime() {\n return payTime;\n }", "OffsetDateTime creationTime();", "public long getSentTime();", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();", "public long getTimeStamp() {return timeStamp;}", "long getTimeStamp();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "public Date getRequesttime() {\n return requesttime;\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "public long getTimestamp() {\n return timestamp_;\n }", "com.google.protobuf.StringValue getTransactionDateTime();", "public Timestamp() {\n makeNow();\n }", "public Long getCreatetime() {\n return createtime;\n }", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "@ApiModelProperty(example = \"1518811817\", value = \"The transaction time in seconds since epoch.\")\n public Long getTransactionTime() {\n return transactionTime;\n }", "public double getTime() {return _time;}", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantity\r\n \t\r\n \tmillis = (timeStamp >> 16) & 0x00000000ffffffffL; // this is a 32 bit quantity\r\n \t\r\n \tmicros = timeStamp & 0x0000ffffL; // this is a 16 bit quantity\r\n \t \r\n }", "public String getReqTime() {\n return reqTime;\n }", "com.google.protobuf.Timestamp getVotingStartTime();", "public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }", "UtcT time_stamp () throws BaseException;", "public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTime(){\n return this.time;\n }", "@Override\n public long getTime() {\n return time;\n }", "public Date getTimeCreate() {\n return timeCreate;\n }", "public int getTimeStamp() {\n return timeStamp;\n }", "com.google.protobuf.Timestamp getTimestamp();", "OffsetDateTime timeCreated();", "@ApiModelProperty(value = \"The timestamp that the `last_price` represents.\")\n public OffsetDateTime getTime() {\n return time;\n }", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public long getCreateTime() {\n return createTime_;\n }", "public void setRequesttime(Date requesttime) {\n this.requesttime = requesttime;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();", "public int getCreateTime() {\n return createTime_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }" ]
[ "0.6862211", "0.6237775", "0.62266433", "0.61695325", "0.60990685", "0.60972226", "0.60972226", "0.60893995", "0.6078815", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.6055824", "0.6020825", "0.60091877", "0.60091877", "0.60067695", "0.59987754", "0.59873265", "0.59873265", "0.59873265", "0.59873265", "0.59873265", "0.59723383", "0.595153", "0.5931082", "0.5928206", "0.5916059", "0.5901096", "0.58967894", "0.5895911", "0.58947", "0.58563536", "0.5855777", "0.5855777", "0.5852643", "0.5849752", "0.58449316", "0.58393747", "0.5831907", "0.58238155", "0.5813723", "0.5813723", "0.5813723", "0.5801328", "0.57940394", "0.5783561", "0.5763269", "0.5751006", "0.5742821", "0.5742055", "0.5741806", "0.57363063", "0.5728784", "0.57270056", "0.5723633", "0.5720142", "0.57121485", "0.5709514", "0.57070845", "0.57020074", "0.57012177", "0.5686845", "0.5684942", "0.5678584", "0.5677381", "0.5673478", "0.56714153", "0.56699455", "0.56632763", "0.5660532", "0.5658431", "0.56533337", "0.56533337", "0.5650431", "0.5647556", "0.5647556", "0.5645724", "0.5643661", "0.5642724", "0.5639663", "0.5639663", "0.5631543", "0.56246406", "0.56216794", "0.5618763", "0.5618494", "0.5618494" ]
0.0
-1
Timestamp; when this request should be considered invalid optional uint64 expires = 4;
@java.lang.Override public boolean hasExpires() { return ((bitField0_ & 0x00000004) != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getExpiration()\n {\n return null;\n }", "long getExpiration();", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "long getExpires();", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public long getExpiration() {\n return expiration;\n }", "long getExpirationDate();", "public String getExpiration() {\n return this.expiration;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public final int getExpiresAfter() {\n return 0;\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "private void clearExpires() {\n bitField0_ = (bitField0_ & ~0x00000004);\n expires_ = 0L;\n }", "Optional<Instant> getTokenInvalidationTimestamp();", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "public long getExpires() {\n return expires;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public int getExpiry();", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public String getExpirationDate() { return date; }", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public abstract Date getExpirationDate();", "public long getExpiresIn() {\n return expiresIn;\n }", "int getExpireTimeout();", "public long getExpirationDate() {\n return expirationDate_;\n }", "public void setExpirationDate(java.util.Date value);", "boolean expired();", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "Duration getTokenExpiredIn();", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "boolean hasExpires();", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "Date getExpiredDate();", "@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "String getSpecifiedExpiry();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@Override\n\tpublic boolean isExpired();", "public Integer getExpiry() {\n return expiry;\n }", "boolean isExpire(long currentTime);", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "com.google.type.Date getExpireDate();", "boolean hasExpirationDate();", "public int getExpiry()\n {\n return expiry;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public Timestamp getExpirationTime() {\n\t\treturn m_ExpirationTime;\n\t}", "boolean isExpired();", "String getExpiry();", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "public abstract void expire();", "LocalDateTime getExpiration(K key);", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "void setExpired(boolean expired);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "boolean hasExpired();", "public String getExpiresString() {\n return expiresString;\n }", "void setExpiredDate(Date expiredDate);", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setValidFrom (Timestamp ValidFrom);", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "public long getExpiry() {\n return this.expiry;\n }", "@POST // This has to be POST because we can't allow caching.\n @Path(\"fresh-timestamp\")\n @Produces(MediaType.APPLICATION_JSON)\n long getFreshTimestamp();", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "com.google.type.DateOrBuilder getExpireDateOrBuilder();", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }" ]
[ "0.67891645", "0.6661163", "0.6604924", "0.64927673", "0.6327019", "0.63266224", "0.6318093", "0.63153076", "0.6312198", "0.62918454", "0.6289637", "0.6287186", "0.6269921", "0.6266631", "0.6253344", "0.6225573", "0.6223293", "0.62220085", "0.61937714", "0.6186028", "0.6180702", "0.6105541", "0.6079694", "0.607779", "0.60748327", "0.60693604", "0.6060228", "0.60583794", "0.6054405", "0.6021499", "0.5993803", "0.59582806", "0.5955711", "0.59472936", "0.593714", "0.59292954", "0.59222", "0.59040695", "0.58810174", "0.5870944", "0.58709115", "0.5869898", "0.58656526", "0.58497584", "0.58429974", "0.58422744", "0.58405966", "0.5813628", "0.58075476", "0.5800359", "0.58001846", "0.5793103", "0.5793103", "0.57837594", "0.5732576", "0.57283264", "0.5725662", "0.57177544", "0.57051307", "0.56999654", "0.5691832", "0.5690619", "0.5688353", "0.56848294", "0.56613135", "0.56538945", "0.5651055", "0.5628068", "0.5605366", "0.5604357", "0.56020296", "0.55884665", "0.5559097", "0.5557003", "0.5555417", "0.55542403", "0.55484504", "0.55483603", "0.5525661", "0.5520896", "0.5504602", "0.54941607", "0.5493886", "0.54929686", "0.54889673", "0.54814184", "0.54814184", "0.54814184", "0.54792184", "0.54785866", "0.5475769", "0.5473924", "0.5473924", "0.5473924", "0.5459525", "0.545227", "0.54469967", "0.5446708", "0.54461086", "0.54458845" ]
0.6585613
3
Timestamp; when this request should be considered invalid optional uint64 expires = 4;
@java.lang.Override public long getExpires() { return expires_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getExpiration()\n {\n return null;\n }", "long getExpiration();", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "@java.lang.Override\n public boolean hasExpires() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "long getExpires();", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public long getExpiration() {\n return expiration;\n }", "long getExpirationDate();", "public String getExpiration() {\n return this.expiration;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public final int getExpiresAfter() {\n return 0;\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "Optional<Instant> getTokenInvalidationTimestamp();", "private void clearExpires() {\n bitField0_ = (bitField0_ & ~0x00000004);\n expires_ = 0L;\n }", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "public long getExpires() {\n return expires;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public int getExpiry();", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public String getExpirationDate() { return date; }", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public abstract Date getExpirationDate();", "public long getExpiresIn() {\n return expiresIn;\n }", "int getExpireTimeout();", "public long getExpirationDate() {\n return expirationDate_;\n }", "public void setExpirationDate(java.util.Date value);", "boolean expired();", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "Duration getTokenExpiredIn();", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "boolean hasExpires();", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "Date getExpiredDate();", "public int getExpiryTime() {\n return expiryTime;\n }", "@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "String getSpecifiedExpiry();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@Override\n\tpublic boolean isExpired();", "public Integer getExpiry() {\n return expiry;\n }", "boolean isExpire(long currentTime);", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "com.google.type.Date getExpireDate();", "boolean hasExpirationDate();", "public int getExpiry()\n {\n return expiry;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public Timestamp getExpirationTime() {\n\t\treturn m_ExpirationTime;\n\t}", "boolean isExpired();", "String getExpiry();", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "public abstract void expire();", "LocalDateTime getExpiration(K key);", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "void setExpired(boolean expired);", "WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "boolean hasExpired();", "public String getExpiresString() {\n return expiresString;\n }", "public void setValidFrom (Timestamp ValidFrom);", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "void setExpiredDate(Date expiredDate);", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "public long getExpiry() {\n return this.expiry;\n }", "@POST // This has to be POST because we can't allow caching.\n @Path(\"fresh-timestamp\")\n @Produces(MediaType.APPLICATION_JSON)\n long getFreshTimestamp();", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "com.google.type.DateOrBuilder getExpireDateOrBuilder();", "public Date getExpiryDate() {\n return expiryDate;\n }", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }" ]
[ "0.67888796", "0.6660935", "0.6604238", "0.6585184", "0.6491881", "0.6327738", "0.6325142", "0.6318848", "0.63155055", "0.63121146", "0.62917465", "0.62906796", "0.62862295", "0.6268857", "0.6265079", "0.6250846", "0.62256515", "0.62234604", "0.6192885", "0.6184491", "0.61802197", "0.610452", "0.60800624", "0.60764253", "0.60743946", "0.6069193", "0.6060343", "0.6058096", "0.6053689", "0.60207665", "0.59941727", "0.5958436", "0.59559447", "0.5947202", "0.5935662", "0.5927573", "0.59223235", "0.5902536", "0.5880625", "0.5870857", "0.5870229", "0.58690894", "0.5865719", "0.5848275", "0.5842838", "0.5842367", "0.58393204", "0.58148474", "0.5806569", "0.58002114", "0.5799766", "0.57928926", "0.57928926", "0.5783749", "0.5732889", "0.5728634", "0.57239485", "0.5717031", "0.5704987", "0.5699709", "0.5692588", "0.5690084", "0.5688334", "0.56848776", "0.5661313", "0.5652633", "0.5651939", "0.5627152", "0.56053185", "0.56044966", "0.5600554", "0.55874896", "0.55580676", "0.5557376", "0.5554771", "0.5554294", "0.5547755", "0.55474097", "0.552594", "0.552", "0.55027264", "0.54956883", "0.54927766", "0.5492582", "0.54870427", "0.5480368", "0.5480368", "0.5480368", "0.54797655", "0.5479616", "0.54761255", "0.5473093", "0.5473093", "0.5473093", "0.5457765", "0.5455877", "0.54472816", "0.54468054", "0.54463613", "0.5445564" ]
0.6220691
18
Timestamp; when this request should be considered invalid optional uint64 expires = 4;
private void setExpires(long value) { bitField0_ |= 0x00000004; expires_ = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getExpiration()\n {\n return null;\n }", "long getExpiration();", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "@java.lang.Override\n public boolean hasExpires() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "long getExpires();", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public long getExpiration() {\n return expiration;\n }", "long getExpirationDate();", "public String getExpiration() {\n return this.expiration;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public final int getExpiresAfter() {\n return 0;\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "private void clearExpires() {\n bitField0_ = (bitField0_ & ~0x00000004);\n expires_ = 0L;\n }", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "Optional<Instant> getTokenInvalidationTimestamp();", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "public long getExpires() {\n return expires;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public int getExpiry();", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public String getExpirationDate() { return date; }", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public abstract Date getExpirationDate();", "public long getExpiresIn() {\n return expiresIn;\n }", "int getExpireTimeout();", "public void setExpirationDate(java.util.Date value);", "public long getExpirationDate() {\n return expirationDate_;\n }", "boolean expired();", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "Duration getTokenExpiredIn();", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "boolean hasExpires();", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "Date getExpiredDate();", "@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "String getSpecifiedExpiry();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@Override\n\tpublic boolean isExpired();", "public Integer getExpiry() {\n return expiry;\n }", "boolean isExpire(long currentTime);", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "com.google.type.Date getExpireDate();", "boolean hasExpirationDate();", "public int getExpiry()\n {\n return expiry;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public Timestamp getExpirationTime() {\n\t\treturn m_ExpirationTime;\n\t}", "boolean isExpired();", "String getExpiry();", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "public abstract void expire();", "LocalDateTime getExpiration(K key);", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "void setExpired(boolean expired);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "boolean hasExpired();", "public String getExpiresString() {\n return expiresString;\n }", "void setExpiredDate(Date expiredDate);", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setValidFrom (Timestamp ValidFrom);", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "public long getExpiry() {\n return this.expiry;\n }", "@POST // This has to be POST because we can't allow caching.\n @Path(\"fresh-timestamp\")\n @Produces(MediaType.APPLICATION_JSON)\n long getFreshTimestamp();", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "com.google.type.DateOrBuilder getExpireDateOrBuilder();", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }" ]
[ "0.6788627", "0.6661481", "0.66046935", "0.65864384", "0.6493445", "0.6327424", "0.63271296", "0.6318222", "0.6315905", "0.6312126", "0.62920886", "0.6289404", "0.62868315", "0.6270749", "0.6253964", "0.62253785", "0.62227017", "0.622246", "0.6192909", "0.6186196", "0.6180339", "0.6105386", "0.60798615", "0.6078666", "0.6075323", "0.606998", "0.6060023", "0.60581714", "0.60547787", "0.60218984", "0.5993948", "0.5958133", "0.5955726", "0.5947197", "0.59373873", "0.59297335", "0.59217393", "0.59045374", "0.5882542", "0.58709097", "0.58708084", "0.58706236", "0.58663917", "0.58492494", "0.5842976", "0.5842176", "0.58419704", "0.5813309", "0.5806817", "0.5801017", "0.5800702", "0.5793005", "0.5793005", "0.5782796", "0.57328314", "0.5728184", "0.5725684", "0.571855", "0.5705634", "0.5700585", "0.5691912", "0.5690371", "0.56885076", "0.56851876", "0.56621885", "0.5654571", "0.56507546", "0.5628789", "0.5605496", "0.5602789", "0.5602621", "0.55877316", "0.55587345", "0.5556917", "0.55557823", "0.5554448", "0.5547867", "0.55476046", "0.5525912", "0.5521566", "0.55048597", "0.5493409", "0.5493243", "0.5491472", "0.54884356", "0.5481067", "0.5481067", "0.5481067", "0.54797536", "0.5477829", "0.54766953", "0.547366", "0.547366", "0.547366", "0.5459814", "0.5453333", "0.5446854", "0.54468167", "0.54463214", "0.544595" ]
0.6267154
14
Timestamp; when this request should be considered invalid optional uint64 expires = 4;
private void clearExpires() { bitField0_ = (bitField0_ & ~0x00000004); expires_ = 0L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getExpiration()\n {\n return null;\n }", "long getExpiration();", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "@java.lang.Override\n public boolean hasExpires() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "long getExpires();", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public long getExpiration() {\n return expiration;\n }", "long getExpirationDate();", "public String getExpiration() {\n return this.expiration;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public final int getExpiresAfter() {\n return 0;\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "Optional<Instant> getTokenInvalidationTimestamp();", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "public long getExpires() {\n return expires;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public int getExpiry();", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public String getExpirationDate() { return date; }", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public abstract Date getExpirationDate();", "public long getExpiresIn() {\n return expiresIn;\n }", "int getExpireTimeout();", "public long getExpirationDate() {\n return expirationDate_;\n }", "public void setExpirationDate(java.util.Date value);", "boolean expired();", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "Duration getTokenExpiredIn();", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "boolean hasExpires();", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "Date getExpiredDate();", "@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "String getSpecifiedExpiry();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@Override\n\tpublic boolean isExpired();", "public Integer getExpiry() {\n return expiry;\n }", "boolean isExpire(long currentTime);", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "com.google.type.Date getExpireDate();", "boolean hasExpirationDate();", "public int getExpiry()\n {\n return expiry;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public Timestamp getExpirationTime() {\n\t\treturn m_ExpirationTime;\n\t}", "boolean isExpired();", "String getExpiry();", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "public abstract void expire();", "LocalDateTime getExpiration(K key);", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "void setExpired(boolean expired);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "boolean hasExpired();", "public String getExpiresString() {\n return expiresString;\n }", "void setExpiredDate(Date expiredDate);", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setValidFrom (Timestamp ValidFrom);", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "public long getExpiry() {\n return this.expiry;\n }", "@POST // This has to be POST because we can't allow caching.\n @Path(\"fresh-timestamp\")\n @Produces(MediaType.APPLICATION_JSON)\n long getFreshTimestamp();", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "com.google.type.DateOrBuilder getExpireDateOrBuilder();", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }" ]
[ "0.67891645", "0.6661163", "0.6604924", "0.6585613", "0.64927673", "0.6327019", "0.63266224", "0.6318093", "0.63153076", "0.6312198", "0.62918454", "0.6289637", "0.6287186", "0.6269921", "0.6266631", "0.6253344", "0.6223293", "0.62220085", "0.61937714", "0.6186028", "0.6180702", "0.6105541", "0.6079694", "0.607779", "0.60748327", "0.60693604", "0.6060228", "0.60583794", "0.6054405", "0.6021499", "0.5993803", "0.59582806", "0.5955711", "0.59472936", "0.593714", "0.59292954", "0.59222", "0.59040695", "0.58810174", "0.5870944", "0.58709115", "0.5869898", "0.58656526", "0.58497584", "0.58429974", "0.58422744", "0.58405966", "0.5813628", "0.58075476", "0.5800359", "0.58001846", "0.5793103", "0.5793103", "0.57837594", "0.5732576", "0.57283264", "0.5725662", "0.57177544", "0.57051307", "0.56999654", "0.5691832", "0.5690619", "0.5688353", "0.56848294", "0.56613135", "0.56538945", "0.5651055", "0.5628068", "0.5605366", "0.5604357", "0.56020296", "0.55884665", "0.5559097", "0.5557003", "0.5555417", "0.55542403", "0.55484504", "0.55483603", "0.5525661", "0.5520896", "0.5504602", "0.54941607", "0.5493886", "0.54929686", "0.54889673", "0.54814184", "0.54814184", "0.54814184", "0.54792184", "0.54785866", "0.5475769", "0.5473924", "0.5473924", "0.5473924", "0.5459525", "0.545227", "0.54469967", "0.5446708", "0.54461086", "0.54458845" ]
0.6225573
16
Humanreadable description of request for the customer optional string memo = 5;
@java.lang.Override public boolean hasMemo() { return ((bitField0_ & 0x00000008) != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6589688", "0.65882015", "0.65882015", "0.65882015", "0.65787244", "0.6533798", "0.6533798", "0.6533798", "0.649377", "0.649377", "0.649377", "0.649377", "0.6492644", "0.6467307", "0.6467307", "0.6442704", "0.64249337", "0.6399231", "0.63713586", "0.62734056", "0.62734056", "0.62734056", "0.6257111", "0.6257111", "0.6257111", "0.623714", "0.60872567", "0.6080106", "0.5998886", "0.59859514", "0.5911038", "0.56384254", "0.56148666", "0.55833757", "0.5577589", "0.555418", "0.555418", "0.555418", "0.55166066", "0.55089164", "0.55089164", "0.5472554", "0.5471978", "0.5452934", "0.5452934", "0.5452934", "0.543881", "0.54271096", "0.53990626", "0.53990626", "0.53990626", "0.53582954", "0.53582954", "0.53505033", "0.5338061", "0.5334982", "0.53077877", "0.5287249", "0.5282244", "0.52816576", "0.52635056", "0.5259121", "0.52349955", "0.523448", "0.5228283", "0.5219462", "0.5202442", "0.5201326", "0.51996744", "0.51976967", "0.5195055", "0.5188149", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5181771", "0.5177549", "0.51762354", "0.51762354", "0.515185", "0.51518124", "0.5149906", "0.5148208", "0.51467", "0.51464355", "0.51464355", "0.5146117", "0.5138839", "0.5132555", "0.51322776", "0.51261646", "0.51259005", "0.5125217", "0.51092106", "0.51092106" ]
0.0
-1
Humanreadable description of request for the customer optional string memo = 5;
@java.lang.Override public java.lang.String getMemo() { return memo_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6585906", "0.65844226", "0.65844226", "0.65844226", "0.6577161", "0.6533293", "0.6533293", "0.6533293", "0.6492224", "0.6492224", "0.6492224", "0.6492224", "0.6489006", "0.6463484", "0.6463484", "0.6439395", "0.6421381", "0.63958514", "0.6367693", "0.6255467", "0.6255467", "0.6255467", "0.62359333", "0.6085406", "0.60789454", "0.5999008", "0.5986913", "0.5912662", "0.5639692", "0.56175077", "0.5584724", "0.5580113", "0.55542064", "0.55542064", "0.55542064", "0.5519726", "0.55074316", "0.55074316", "0.54742396", "0.54711825", "0.5450919", "0.5450919", "0.5450919", "0.5440557", "0.5429505", "0.5397781", "0.5397781", "0.5397781", "0.5360305", "0.5360305", "0.53522104", "0.53393465", "0.53373915", "0.5308891", "0.5289372", "0.5285602", "0.52843356", "0.5265737", "0.52620643", "0.52371997", "0.52319235", "0.5230502", "0.5220521", "0.52048594", "0.520371", "0.5201008", "0.5200531", "0.51975304", "0.5188884", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5185775", "0.5179849", "0.5179849", "0.51766956", "0.5154039", "0.51538134", "0.51504993", "0.5149471", "0.5149471", "0.5149323", "0.51492393", "0.5149173", "0.5139369", "0.51362336", "0.513503", "0.5129426", "0.512833", "0.5123045", "0.5106914", "0.5106914" ]
0.6272251
19
Humanreadable description of request for the customer optional string memo = 5;
@java.lang.Override public com.google.protobuf.ByteString getMemoBytes() { return com.google.protobuf.ByteString.copyFromUtf8(memo_); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.65865", "0.658507", "0.658507", "0.658507", "0.6577861", "0.653355", "0.653355", "0.653355", "0.64929634", "0.64929634", "0.64929634", "0.64929634", "0.648964", "0.6464222", "0.6464222", "0.6440324", "0.64222246", "0.6396784", "0.63684195", "0.6272917", "0.6272917", "0.6272917", "0.6256268", "0.6256268", "0.6256268", "0.6236819", "0.60859114", "0.6079752", "0.59998107", "0.5987238", "0.59131885", "0.5639944", "0.5617711", "0.5585964", "0.55804974", "0.55547714", "0.55547714", "0.55547714", "0.5520759", "0.55065817", "0.55065817", "0.5473957", "0.5470309", "0.5442251", "0.54305327", "0.5397151", "0.5397151", "0.5397151", "0.5361073", "0.5361073", "0.53529084", "0.53402793", "0.53380066", "0.5308963", "0.52909654", "0.52850205", "0.5284808", "0.52669215", "0.52596784", "0.5237631", "0.5232156", "0.52315414", "0.5222122", "0.5205467", "0.5204606", "0.5201995", "0.5199962", "0.5197599", "0.51898986", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.51852596", "0.5179427", "0.5179427", "0.5177919", "0.5154738", "0.5154418", "0.5152747", "0.51511395", "0.5150504", "0.5150504", "0.5149239", "0.51479316", "0.5141566", "0.51373047", "0.5136115", "0.51293695", "0.512891", "0.51220965", "0.5105976", "0.5105976" ]
0.54514706
44
Humanreadable description of request for the customer optional string memo = 5;
private void setMemo( java.lang.String value) { java.lang.Class<?> valueClass = value.getClass(); bitField0_ |= 0x00000008; memo_ = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6589688", "0.65882015", "0.65882015", "0.65882015", "0.65787244", "0.6533798", "0.6533798", "0.6533798", "0.649377", "0.649377", "0.649377", "0.649377", "0.6492644", "0.6467307", "0.6467307", "0.6442704", "0.64249337", "0.6399231", "0.63713586", "0.62734056", "0.62734056", "0.62734056", "0.6257111", "0.6257111", "0.6257111", "0.623714", "0.60872567", "0.6080106", "0.5998886", "0.59859514", "0.5911038", "0.56384254", "0.56148666", "0.55833757", "0.5577589", "0.555418", "0.555418", "0.555418", "0.55166066", "0.55089164", "0.55089164", "0.5471978", "0.5452934", "0.5452934", "0.5452934", "0.543881", "0.54271096", "0.53990626", "0.53990626", "0.53990626", "0.53582954", "0.53582954", "0.53505033", "0.5338061", "0.5334982", "0.53077877", "0.5287249", "0.5282244", "0.52816576", "0.52635056", "0.5259121", "0.52349955", "0.523448", "0.5228283", "0.5219462", "0.5202442", "0.5201326", "0.51996744", "0.51976967", "0.5195055", "0.5188149", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5181771", "0.5177549", "0.51762354", "0.51762354", "0.515185", "0.51518124", "0.5149906", "0.5148208", "0.51467", "0.51464355", "0.51464355", "0.5146117", "0.5138839", "0.5132555", "0.51322776", "0.51261646", "0.51259005", "0.5125217", "0.51092106", "0.51092106" ]
0.5472554
41
Humanreadable description of request for the customer optional string memo = 5;
private void clearMemo() { bitField0_ = (bitField0_ & ~0x00000008); memo_ = getDefaultInstance().getMemo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6589688", "0.65882015", "0.65882015", "0.65882015", "0.65787244", "0.6533798", "0.6533798", "0.6533798", "0.649377", "0.649377", "0.649377", "0.649377", "0.6492644", "0.6467307", "0.6467307", "0.6442704", "0.64249337", "0.6399231", "0.63713586", "0.62734056", "0.62734056", "0.62734056", "0.6257111", "0.6257111", "0.6257111", "0.623714", "0.60872567", "0.6080106", "0.5998886", "0.59859514", "0.5911038", "0.56384254", "0.56148666", "0.55833757", "0.5577589", "0.555418", "0.555418", "0.555418", "0.55166066", "0.55089164", "0.55089164", "0.5472554", "0.5471978", "0.5452934", "0.5452934", "0.5452934", "0.543881", "0.54271096", "0.53990626", "0.53990626", "0.53990626", "0.53582954", "0.53582954", "0.53505033", "0.5338061", "0.5334982", "0.53077877", "0.5287249", "0.5282244", "0.52816576", "0.52635056", "0.5259121", "0.52349955", "0.523448", "0.5228283", "0.5219462", "0.5202442", "0.5201326", "0.51996744", "0.51976967", "0.5195055", "0.5188149", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5181771", "0.5177549", "0.51762354", "0.51762354", "0.515185", "0.51518124", "0.5149906", "0.5148208", "0.51467", "0.51464355", "0.51464355", "0.5146117", "0.5138839", "0.5132555", "0.51322776", "0.51261646", "0.51259005", "0.5125217", "0.51092106", "0.51092106" ]
0.0
-1
Humanreadable description of request for the customer optional string memo = 5;
private void setMemoBytes( com.google.protobuf.ByteString value) { memo_ = value.toStringUtf8(); bitField0_ |= 0x00000008; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6585906", "0.65844226", "0.65844226", "0.65844226", "0.6577161", "0.6533293", "0.6533293", "0.6533293", "0.6492224", "0.6492224", "0.6492224", "0.6492224", "0.6489006", "0.6463484", "0.6463484", "0.6439395", "0.6421381", "0.63958514", "0.6367693", "0.6272251", "0.6272251", "0.6272251", "0.6255467", "0.6255467", "0.6255467", "0.62359333", "0.6085406", "0.60789454", "0.5999008", "0.5986913", "0.5912662", "0.5639692", "0.56175077", "0.5584724", "0.5580113", "0.55542064", "0.55542064", "0.55542064", "0.5519726", "0.55074316", "0.55074316", "0.54742396", "0.54711825", "0.5450919", "0.5450919", "0.5450919", "0.5440557", "0.5429505", "0.5397781", "0.5397781", "0.5397781", "0.5360305", "0.5360305", "0.53522104", "0.53393465", "0.53373915", "0.5308891", "0.5289372", "0.5285602", "0.52843356", "0.5265737", "0.52620643", "0.52371997", "0.52319235", "0.5230502", "0.5220521", "0.52048594", "0.520371", "0.5201008", "0.5200531", "0.51975304", "0.5188884", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5185775", "0.5179849", "0.5179849", "0.51766956", "0.5154039", "0.51538134", "0.51504993", "0.5149471", "0.5149471", "0.5149323", "0.51492393", "0.5149173", "0.5139369", "0.51362336", "0.513503", "0.5129426", "0.512833", "0.5106914", "0.5106914" ]
0.5123045
98
URL to send Payment and get PaymentACK optional string payment_url = 6;
@java.lang.Override public boolean hasPaymentUrl() { return ((bitField0_ & 0x00000010) != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "public void autoPay() {}", "String getPaymentInformation();", "void setPaymentMethod(PaymentMethod paymentMethod);", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.80256826", "0.6980822", "0.69090235", "0.6688548", "0.6611434", "0.65964526", "0.6565504", "0.6550355", "0.6476589", "0.6458323", "0.64513665", "0.6384907", "0.6384185", "0.6365502", "0.63613033", "0.63592046", "0.6210337", "0.6191012", "0.6185661", "0.61486834", "0.6129377", "0.60795176", "0.60771054", "0.60578895", "0.60336494", "0.59858817", "0.59428304", "0.59387314", "0.5936344", "0.5935076", "0.5932212", "0.5919778", "0.5910342", "0.59091634", "0.5886775", "0.5872107", "0.58506817", "0.5847652", "0.58168167", "0.57537925", "0.5726177", "0.57218397", "0.57147026", "0.5708963", "0.56726587", "0.56702155", "0.56696624", "0.56289005", "0.5591952", "0.55725414", "0.5568936", "0.5562204", "0.55608237", "0.5552734", "0.5545528", "0.55387807", "0.5505166", "0.5496348", "0.5494464", "0.54811656", "0.5473715", "0.5473218", "0.5455547", "0.5448536", "0.5441001", "0.54340786", "0.5429193", "0.5423579", "0.5402684", "0.54008126", "0.5397096", "0.53676176", "0.5362304", "0.5344667", "0.53353405", "0.53343356", "0.5329618", "0.5323663", "0.53142035", "0.5312862", "0.53118813", "0.53063023", "0.5305259", "0.52897644", "0.52696514", "0.52647185", "0.5262621", "0.5259405", "0.52346504", "0.523025", "0.52300835", "0.52272874", "0.5218169", "0.521555", "0.5211449", "0.5207238", "0.5202055", "0.52013713", "0.52003425", "0.519714" ]
0.5724655
41
URL to send Payment and get PaymentACK optional string payment_url = 6;
@java.lang.Override public java.lang.String getPaymentUrl() { return paymentUrl_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8026184", "0.6980227", "0.66878295", "0.66115063", "0.65975267", "0.6565925", "0.65518755", "0.64772063", "0.6457564", "0.6451593", "0.6384458", "0.6383388", "0.6366041", "0.6362245", "0.63607705", "0.6210263", "0.61898124", "0.61852676", "0.6147616", "0.6129988", "0.6080698", "0.6076927", "0.6058412", "0.6031431", "0.59856427", "0.5942277", "0.59378994", "0.5937617", "0.59362257", "0.59323347", "0.5921494", "0.5911156", "0.5909989", "0.58883506", "0.58714366", "0.585218", "0.58466995", "0.58157575", "0.5754194", "0.57259154", "0.57256687", "0.5721945", "0.5713502", "0.57079804", "0.5672102", "0.5670566", "0.56691813", "0.56296", "0.5591498", "0.55728877", "0.55688053", "0.5560611", "0.5560283", "0.5551254", "0.55446655", "0.5538667", "0.5504422", "0.5495317", "0.54945385", "0.54808444", "0.5474726", "0.5473705", "0.54555184", "0.54481065", "0.5440958", "0.5432879", "0.5428726", "0.54242593", "0.540161", "0.5400543", "0.5396257", "0.53656447", "0.53615296", "0.5343353", "0.53356403", "0.5334144", "0.5329569", "0.5323391", "0.53144985", "0.5312271", "0.5312208", "0.53051794", "0.53051496", "0.5288981", "0.52685386", "0.5264153", "0.526275", "0.5259683", "0.52343994", "0.5231375", "0.5230777", "0.522749", "0.5218384", "0.5215393", "0.52111095", "0.5206343", "0.5201812", "0.52016383", "0.5199229", "0.5196824" ]
0.69088143
2
URL to send Payment and get PaymentACK optional string payment_url = 6;
@java.lang.Override public com.google.protobuf.ByteString getPaymentUrlBytes() { return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8026184", "0.6980227", "0.69088143", "0.66115063", "0.65975267", "0.6565925", "0.65518755", "0.64772063", "0.6457564", "0.6451593", "0.6384458", "0.6383388", "0.6366041", "0.6362245", "0.63607705", "0.6210263", "0.61898124", "0.61852676", "0.6147616", "0.6129988", "0.6080698", "0.6076927", "0.6058412", "0.6031431", "0.59856427", "0.5942277", "0.59378994", "0.5937617", "0.59362257", "0.59323347", "0.5921494", "0.5911156", "0.5909989", "0.58883506", "0.58714366", "0.585218", "0.58466995", "0.58157575", "0.5754194", "0.57259154", "0.57256687", "0.5721945", "0.5713502", "0.57079804", "0.5672102", "0.5670566", "0.56691813", "0.56296", "0.5591498", "0.55728877", "0.55688053", "0.5560611", "0.5560283", "0.5551254", "0.55446655", "0.5538667", "0.5504422", "0.5495317", "0.54945385", "0.54808444", "0.5474726", "0.5473705", "0.54555184", "0.54481065", "0.5440958", "0.5432879", "0.5428726", "0.54242593", "0.540161", "0.5400543", "0.5396257", "0.53656447", "0.53615296", "0.5343353", "0.53356403", "0.5334144", "0.5329569", "0.5323391", "0.53144985", "0.5312271", "0.5312208", "0.53051794", "0.53051496", "0.5288981", "0.52685386", "0.5264153", "0.526275", "0.5259683", "0.52343994", "0.5231375", "0.5230777", "0.522749", "0.5218384", "0.5215393", "0.52111095", "0.5206343", "0.5201812", "0.52016383", "0.5199229", "0.5196824" ]
0.66878295
3
URL to send Payment and get PaymentACK optional string payment_url = 6;
private void setPaymentUrl( java.lang.String value) { java.lang.Class<?> valueClass = value.getClass(); bitField0_ |= 0x00000010; paymentUrl_ = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public void CashPayment()\n {\n }", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8025209", "0.69808245", "0.6909147", "0.66887766", "0.66115946", "0.6597593", "0.6566224", "0.6550819", "0.6476478", "0.64575464", "0.64516777", "0.63852495", "0.6383247", "0.63647765", "0.63615775", "0.6358058", "0.62098306", "0.61902875", "0.6185152", "0.6148113", "0.6129398", "0.6076773", "0.60571676", "0.6034229", "0.59857213", "0.59421957", "0.5938512", "0.59372187", "0.5936139", "0.59322566", "0.592088", "0.5911637", "0.59099406", "0.58881086", "0.5871167", "0.58505446", "0.58466744", "0.58166003", "0.57534933", "0.57270294", "0.57255065", "0.5721934", "0.5715541", "0.57083577", "0.5671765", "0.5670291", "0.56695104", "0.56280017", "0.5591089", "0.5573227", "0.5569064", "0.5562817", "0.55604416", "0.5551738", "0.5545263", "0.5539006", "0.5505022", "0.5494964", "0.5494783", "0.5480001", "0.5473815", "0.5473728", "0.54566497", "0.54469144", "0.5441003", "0.54328984", "0.5427607", "0.5422865", "0.54023117", "0.5399313", "0.53964454", "0.5367804", "0.5360618", "0.5344031", "0.5333722", "0.53335446", "0.53305507", "0.53231424", "0.53144056", "0.5312427", "0.5311861", "0.5306887", "0.5305759", "0.52889305", "0.52694356", "0.5263595", "0.5262043", "0.52589273", "0.5234413", "0.5230704", "0.5229802", "0.5227135", "0.52179486", "0.52142805", "0.5211318", "0.5207649", "0.5202001", "0.52011585", "0.5199864", "0.51964617" ]
0.6079982
21
URL to send Payment and get PaymentACK optional string payment_url = 6;
private void clearPaymentUrl() { bitField0_ = (bitField0_ & ~0x00000010); paymentUrl_ = getDefaultInstance().getPaymentUrl(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "public void autoPay() {}", "String getPaymentInformation();", "void setPaymentMethod(PaymentMethod paymentMethod);", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.80256826", "0.6980822", "0.69090235", "0.6688548", "0.6611434", "0.65964526", "0.6565504", "0.6550355", "0.6476589", "0.6458323", "0.64513665", "0.6384907", "0.6384185", "0.6365502", "0.63613033", "0.63592046", "0.6210337", "0.6191012", "0.6185661", "0.61486834", "0.6129377", "0.60795176", "0.60771054", "0.60578895", "0.60336494", "0.59858817", "0.59428304", "0.59387314", "0.5936344", "0.5935076", "0.5932212", "0.5919778", "0.59091634", "0.5886775", "0.5872107", "0.58506817", "0.5847652", "0.58168167", "0.57537925", "0.5726177", "0.5724655", "0.57218397", "0.57147026", "0.5708963", "0.56726587", "0.56702155", "0.56696624", "0.56289005", "0.5591952", "0.55725414", "0.5568936", "0.5562204", "0.55608237", "0.5552734", "0.5545528", "0.55387807", "0.5505166", "0.5496348", "0.5494464", "0.54811656", "0.5473715", "0.5473218", "0.5455547", "0.5448536", "0.5441001", "0.54340786", "0.5429193", "0.5423579", "0.5402684", "0.54008126", "0.5397096", "0.53676176", "0.5362304", "0.5344667", "0.53353405", "0.53343356", "0.5329618", "0.5323663", "0.53142035", "0.5312862", "0.53118813", "0.53063023", "0.5305259", "0.52897644", "0.52696514", "0.52647185", "0.5262621", "0.5259405", "0.52346504", "0.523025", "0.52300835", "0.52272874", "0.5218169", "0.521555", "0.5211449", "0.5207238", "0.5202055", "0.52013713", "0.52003425", "0.519714" ]
0.5910342
32
URL to send Payment and get PaymentACK optional string payment_url = 6;
private void setPaymentUrlBytes( com.google.protobuf.ByteString value) { paymentUrl_ = value.toStringUtf8(); bitField0_ |= 0x00000010; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8026184", "0.6980227", "0.69088143", "0.66878295", "0.66115063", "0.65975267", "0.6565925", "0.65518755", "0.6457564", "0.6451593", "0.6384458", "0.6383388", "0.6366041", "0.6362245", "0.63607705", "0.6210263", "0.61898124", "0.61852676", "0.6147616", "0.6129988", "0.6080698", "0.6076927", "0.6058412", "0.6031431", "0.59856427", "0.5942277", "0.59378994", "0.5937617", "0.59362257", "0.59323347", "0.5921494", "0.5911156", "0.5909989", "0.58883506", "0.58714366", "0.585218", "0.58466995", "0.58157575", "0.5754194", "0.57259154", "0.57256687", "0.5721945", "0.5713502", "0.57079804", "0.5672102", "0.5670566", "0.56691813", "0.56296", "0.5591498", "0.55728877", "0.55688053", "0.5560611", "0.5560283", "0.5551254", "0.55446655", "0.5538667", "0.5504422", "0.5495317", "0.54945385", "0.54808444", "0.5474726", "0.5473705", "0.54555184", "0.54481065", "0.5440958", "0.5432879", "0.5428726", "0.54242593", "0.540161", "0.5400543", "0.5396257", "0.53656447", "0.53615296", "0.5343353", "0.53356403", "0.5334144", "0.5329569", "0.5323391", "0.53144985", "0.5312271", "0.5312208", "0.53051794", "0.53051496", "0.5288981", "0.52685386", "0.5264153", "0.526275", "0.5259683", "0.52343994", "0.5231375", "0.5230777", "0.522749", "0.5218384", "0.5215393", "0.52111095", "0.5206343", "0.5201812", "0.52016383", "0.5199229", "0.5196824" ]
0.64772063
8
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
@java.lang.Override public boolean hasMerchantData() { return ((bitField0_ & 0x00000020) != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000020;\n merchantData_ = value;\n }", "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000020);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "void setData(byte[] data) {\n this.data = data;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public void setPayload(int data) {\n payload = data;\n }", "public String getMerchant() {\n return _merchant;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.7630618", "0.7618193", "0.7336694", "0.7336694", "0.70582145", "0.70582145", "0.63252866", "0.6265142", "0.6265142", "0.6242635", "0.6242635", "0.60854363", "0.6081552", "0.60719115", "0.5704075", "0.5608558", "0.5511907", "0.54459894", "0.54459894", "0.5416915", "0.53975123", "0.53567463", "0.53412205", "0.5330112", "0.5300584", "0.52514154", "0.52423954", "0.52256817", "0.52256817", "0.51973677", "0.51620483", "0.51604396", "0.51537323", "0.512647", "0.5122304", "0.5118093", "0.50963056", "0.50689656", "0.5065064", "0.50635993", "0.5031319", "0.50306684", "0.5028956", "0.5025612", "0.50214976", "0.5010842", "0.5003942", "0.49949604", "0.49836794", "0.49801457", "0.49750897", "0.49611008", "0.49562854", "0.49556223", "0.49546126", "0.49545336", "0.49525058", "0.49498335", "0.49485028", "0.49449828", "0.49342197", "0.49274927", "0.49191725", "0.4918797", "0.49174935", "0.49174935", "0.49174935", "0.49174935", "0.49091703", "0.49070522", "0.4905512", "0.4896595", "0.48922458", "0.4887393", "0.48823854", "0.48802504", "0.48735785", "0.4870288", "0.48691177", "0.48628128", "0.4856505", "0.48517004", "0.48400944", "0.48380598", "0.48310328", "0.48297852", "0.48271155", "0.48249313", "0.48249313", "0.48200426", "0.4815683", "0.48147708", "0.48112258", "0.48099416", "0.48070502", "0.48014605", "0.4799453", "0.47932953", "0.47926295", "0.47908127" ]
0.6389797
6
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
@java.lang.Override public com.google.protobuf.ByteString getMerchantData() { return merchantData_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000020;\n merchantData_ = value;\n }", "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000020);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "void setData(byte[] data) {\n this.data = data;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public String getMerchant() {\n return _merchant;\n }", "public void setPayload(int data) {\n payload = data;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.7631937", "0.76195043", "0.733696", "0.733696", "0.63906693", "0.63260716", "0.6267505", "0.6267505", "0.6243509", "0.6243509", "0.608402", "0.6083088", "0.60734", "0.5704557", "0.56059736", "0.5514029", "0.54480094", "0.54480094", "0.5415663", "0.5395114", "0.53570676", "0.5339678", "0.5329479", "0.5300158", "0.52505165", "0.5244725", "0.52277166", "0.52277166", "0.5198038", "0.5161542", "0.5161427", "0.5150951", "0.5127551", "0.5123566", "0.5119369", "0.5094767", "0.5068022", "0.5064682", "0.5063079", "0.5028807", "0.5028399", "0.502783", "0.5025913", "0.5023619", "0.5012664", "0.50010425", "0.4993671", "0.4982377", "0.49818653", "0.4972097", "0.49628812", "0.49549", "0.4954491", "0.49540997", "0.4953341", "0.49532455", "0.49496344", "0.49473065", "0.4947242", "0.4932948", "0.492636", "0.49199855", "0.49199855", "0.49199855", "0.49199855", "0.4919061", "0.49185425", "0.49093637", "0.49071303", "0.49043027", "0.48953164", "0.4890843", "0.48876825", "0.48849273", "0.4878451", "0.48718622", "0.4869632", "0.48680347", "0.48611084", "0.4855335", "0.48498198", "0.484321", "0.4837225", "0.4830462", "0.4830298", "0.48287177", "0.4828307", "0.4828307", "0.48188978", "0.48175278", "0.4812966", "0.48100978", "0.48092172", "0.48074073", "0.48025775", "0.47980908", "0.479339", "0.47921", "0.47903758" ]
0.70596427
5
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
private void setMerchantData(com.google.protobuf.ByteString value) { java.lang.Class<?> valueClass = value.getClass(); bitField0_ |= 0x00000020; merchantData_ = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000020);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "void setData(byte[] data) {\n this.data = data;\n }", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public String getMerchant() {\n return _merchant;\n }", "public void setPayload(int data) {\n payload = data;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.7617597", "0.73379797", "0.73379797", "0.7059095", "0.7059095", "0.6389361", "0.6324724", "0.6265656", "0.6265656", "0.6243923", "0.6243923", "0.6086128", "0.6081462", "0.60717684", "0.5706813", "0.5610246", "0.5511306", "0.5446434", "0.5446434", "0.541683", "0.53977525", "0.5355959", "0.5341446", "0.5331263", "0.5300884", "0.5252495", "0.52418417", "0.5226436", "0.5226436", "0.5199506", "0.5161985", "0.516113", "0.5153838", "0.51270026", "0.51229614", "0.51187253", "0.50945103", "0.5068383", "0.5064563", "0.50639075", "0.5030928", "0.5029941", "0.50295573", "0.5026745", "0.5022471", "0.501158", "0.5004264", "0.49950758", "0.498435", "0.49805808", "0.4975186", "0.4962245", "0.49571773", "0.4956153", "0.49555865", "0.49542344", "0.4950877", "0.49502397", "0.4946308", "0.4945857", "0.49362367", "0.49276966", "0.49187714", "0.49186146", "0.49186146", "0.49186146", "0.49186146", "0.49183324", "0.49101818", "0.49088922", "0.49033964", "0.48986474", "0.48936906", "0.48887584", "0.4883458", "0.4880903", "0.48748472", "0.48725367", "0.4870911", "0.48614663", "0.48565418", "0.48519433", "0.4841359", "0.48356745", "0.4833025", "0.48276553", "0.48271188", "0.48255527", "0.48255527", "0.48179457", "0.4816771", "0.48131406", "0.48119134", "0.48112005", "0.48089328", "0.48023614", "0.479768", "0.47946352", "0.47932565", "0.47925442" ]
0.76300323
0
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
private void clearMerchantData() { bitField0_ = (bitField0_ & ~0x00000020); merchantData_ = getDefaultInstance().getMerchantData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000020;\n merchantData_ = value;\n }", "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "void setData(byte[] data) {\n this.data = data;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public void setPayload(int data) {\n payload = data;\n }", "public String getMerchant() {\n return _merchant;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.7630618", "0.7618193", "0.7336694", "0.7336694", "0.70582145", "0.70582145", "0.6389797", "0.63252866", "0.6265142", "0.6265142", "0.6242635", "0.6242635", "0.60854363", "0.60719115", "0.5704075", "0.5608558", "0.5511907", "0.54459894", "0.54459894", "0.5416915", "0.53975123", "0.53567463", "0.53412205", "0.5330112", "0.5300584", "0.52514154", "0.52423954", "0.52256817", "0.52256817", "0.51973677", "0.51620483", "0.51604396", "0.51537323", "0.512647", "0.5122304", "0.5118093", "0.50963056", "0.50689656", "0.5065064", "0.50635993", "0.5031319", "0.50306684", "0.5028956", "0.5025612", "0.50214976", "0.5010842", "0.5003942", "0.49949604", "0.49836794", "0.49801457", "0.49750897", "0.49611008", "0.49562854", "0.49556223", "0.49546126", "0.49545336", "0.49525058", "0.49498335", "0.49485028", "0.49449828", "0.49342197", "0.49274927", "0.49191725", "0.4918797", "0.49174935", "0.49174935", "0.49174935", "0.49174935", "0.49091703", "0.49070522", "0.4905512", "0.4896595", "0.48922458", "0.4887393", "0.48823854", "0.48802504", "0.48735785", "0.4870288", "0.48691177", "0.48628128", "0.4856505", "0.48517004", "0.48400944", "0.48380598", "0.48310328", "0.48297852", "0.48271155", "0.48249313", "0.48249313", "0.48200426", "0.4815683", "0.48147708", "0.48112258", "0.48099416", "0.48070502", "0.48014605", "0.4799453", "0.47932953", "0.47926295", "0.47908127" ]
0.6081552
13
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
@java.lang.Override public boolean hasGenesis() { return instance.hasGenesis(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "Block getBlockByHash(byte[] hash);", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "int getHash();", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getClientHashLength();", "public String getHash() {\n\t\treturn hash;\n\t}", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String generateBlock(){\n return null;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public String getHash() {\n\t\treturn _hash;\n\t}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6927193", "0.667675", "0.6641989", "0.65225834", "0.6324055", "0.6300944", "0.6277257", "0.62475276", "0.6167162", "0.6026396", "0.5953146", "0.5923169", "0.57848513", "0.57848513", "0.5735895", "0.56831145", "0.568288", "0.5627883", "0.56227237", "0.5606991", "0.55866367", "0.5574322", "0.5512874", "0.550862", "0.55038023", "0.54916304", "0.54849905", "0.5450623", "0.544596", "0.5444949", "0.543169", "0.5430706", "0.5417249", "0.54157877", "0.5411514", "0.540398", "0.53841215", "0.5381501", "0.536431", "0.536431", "0.53556556", "0.5307385", "0.5304889", "0.5301996", "0.52944624", "0.5291656", "0.5272587", "0.5263168", "0.5245919", "0.5245335", "0.52389127", "0.52385837", "0.5237658", "0.5236915", "0.5195128", "0.51771903", "0.5174617", "0.5173135", "0.5165873", "0.5156301", "0.5154577", "0.5148964", "0.5135943", "0.51354545", "0.51275796", "0.5125557", "0.5125557", "0.5125557", "0.512205", "0.5110016", "0.5106049", "0.5105192", "0.50843894", "0.5083567", "0.5076644", "0.50744355", "0.50744325", "0.5058675", "0.50543207", "0.50543207", "0.5048228", "0.50374603", "0.5036848", "0.5017614", "0.5016101", "0.50148326", "0.5009116", "0.500225", "0.49885973", "0.4987867", "0.4987867", "0.49870652", "0.49850726", "0.4977891", "0.49777257", "0.49777257", "0.49683353", "0.49659717", "0.49561232", "0.49561232", "0.49505696" ]
0.0
-1
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
@java.lang.Override public java.lang.String getGenesis() { return instance.getGenesis(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "Block getBlockByHash(byte[] hash);", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "int getHash();", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getClientHashLength();", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash() {\n\t\treturn hash;\n\t}", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String generateBlock(){\n return null;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6926382", "0.66773117", "0.66424996", "0.65233874", "0.6324576", "0.63017154", "0.62788105", "0.6247794", "0.6169162", "0.6027311", "0.5923081", "0.5784323", "0.5784323", "0.57361966", "0.5683581", "0.568312", "0.56291246", "0.5623782", "0.5605472", "0.5585503", "0.5572977", "0.5512998", "0.5507533", "0.5504396", "0.5492604", "0.5486275", "0.54520786", "0.5447422", "0.54460204", "0.5433469", "0.5431714", "0.54162747", "0.5415245", "0.5411663", "0.5405281", "0.53859353", "0.5380344", "0.5363442", "0.5363442", "0.5354605", "0.5306142", "0.5303665", "0.5301465", "0.5294738", "0.5293774", "0.52724296", "0.5262588", "0.52468306", "0.5246396", "0.52383494", "0.52380025", "0.5237309", "0.52371395", "0.5195302", "0.5177193", "0.5175733", "0.5171677", "0.5165135", "0.51549035", "0.5154111", "0.5150341", "0.5137048", "0.51352364", "0.5127626", "0.51244617", "0.5124077", "0.5124077", "0.5124077", "0.5111016", "0.51055795", "0.5104613", "0.5088002", "0.5082135", "0.5078255", "0.5075151", "0.5073619", "0.50578964", "0.50569504", "0.50569504", "0.504746", "0.50407666", "0.5035865", "0.50176865", "0.50156236", "0.50155556", "0.50098497", "0.50023955", "0.49905786", "0.49905786", "0.49880874", "0.49853972", "0.49840862", "0.49766058", "0.49766058", "0.49759609", "0.4972321", "0.4968654", "0.4958243", "0.4958243", "0.49503064" ]
0.59534395
10
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
@java.lang.Override public com.google.protobuf.ByteString getGenesisBytes() { return instance.getGenesisBytes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "Block getBlockByHash(byte[] hash);", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "int getHash();", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getClientHashLength();", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash() {\n\t\treturn hash;\n\t}", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String generateBlock(){\n return null;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6927208", "0.6677202", "0.66426426", "0.65233", "0.6325492", "0.6301133", "0.6278923", "0.61684054", "0.6026342", "0.59531325", "0.59239745", "0.5783109", "0.5783109", "0.57365197", "0.5683801", "0.568366", "0.5629013", "0.5623869", "0.56038487", "0.5584258", "0.557094", "0.5512136", "0.5506202", "0.5503636", "0.54910725", "0.54842967", "0.5451885", "0.5447901", "0.5445707", "0.5433288", "0.54319334", "0.5415159", "0.54128075", "0.54121125", "0.5404796", "0.53857213", "0.5380276", "0.53621066", "0.53621066", "0.5354611", "0.53046376", "0.5303355", "0.5300909", "0.52937376", "0.529188", "0.52718467", "0.5261775", "0.5246618", "0.5245486", "0.523786", "0.52375287", "0.5236766", "0.52367544", "0.519359", "0.5175988", "0.5175348", "0.5171025", "0.51646835", "0.51542646", "0.51532006", "0.5149615", "0.51363516", "0.51337415", "0.512565", "0.5123582", "0.5123582", "0.5123582", "0.5123544", "0.5110774", "0.5104745", "0.5103525", "0.508705", "0.5082297", "0.50768715", "0.50748307", "0.5072381", "0.50574213", "0.5056443", "0.5056443", "0.50472605", "0.5039753", "0.5035076", "0.50162137", "0.50149256", "0.50142115", "0.5009398", "0.5001379", "0.49901065", "0.49901065", "0.4986799", "0.49858057", "0.49823135", "0.49757475", "0.49757475", "0.49756223", "0.4971661", "0.49678743", "0.49570286", "0.49570286", "0.4949644" ]
0.6247778
7
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
public Builder setGenesis( java.lang.String value) { copyOnWrite(); instance.setGenesis(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "Block getBlockByHash(byte[] hash);", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getHash();", "int getClientHashLength();", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash() {\n\t\treturn hash;\n\t}", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String generateBlock(){\n return null;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6927262", "0.667585", "0.6641752", "0.6522562", "0.63241553", "0.63015246", "0.62781", "0.6247412", "0.6167449", "0.6025517", "0.5952364", "0.59229356", "0.5783024", "0.5783024", "0.57362574", "0.5683724", "0.56823224", "0.5627969", "0.56225675", "0.56048673", "0.5585004", "0.55720365", "0.5512543", "0.55064183", "0.5503348", "0.5491421", "0.54832345", "0.5450458", "0.5447108", "0.54454356", "0.54323125", "0.54320747", "0.5414614", "0.5413313", "0.5411276", "0.54040694", "0.53846604", "0.53810024", "0.5362061", "0.5362061", "0.5354684", "0.530585", "0.5302721", "0.53009564", "0.5292881", "0.52921015", "0.5272396", "0.5262361", "0.5246798", "0.52458483", "0.5237289", "0.5236922", "0.5236779", "0.5193596", "0.51752645", "0.5174919", "0.51707715", "0.51638764", "0.51539963", "0.5153503", "0.5148855", "0.5135387", "0.51346236", "0.51261973", "0.5123218", "0.5123218", "0.5123218", "0.51218456", "0.5110199", "0.510511", "0.5102973", "0.50849116", "0.50831", "0.50754523", "0.50743884", "0.50737745", "0.50586647", "0.5055565", "0.5055565", "0.50467384", "0.5037671", "0.50351477", "0.50164294", "0.50150084", "0.50140494", "0.50089", "0.50022095", "0.4989217", "0.4989217", "0.49872896", "0.4986533", "0.49828473", "0.49762282", "0.4975395", "0.4975395", "0.49699154", "0.49671045", "0.49569386", "0.49569386", "0.49500513" ]
0.5237759
50
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
public Builder clearGenesis() { copyOnWrite(); instance.clearGenesis(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public Builder setGenesisBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setGenesisBytes(value);\n return this;\n }", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "Block getBlockByHash(byte[] hash);", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "int getHash();", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getClientHashLength();", "public String getHash() {\n\t\treturn hash;\n\t}", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String generateBlock(){\n return null;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public String getHash() {\n\t\treturn _hash;\n\t}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6927193", "0.667675", "0.6641989", "0.65225834", "0.6324055", "0.6300944", "0.6277257", "0.62475276", "0.6167162", "0.6026396", "0.5953146", "0.5923169", "0.57848513", "0.57848513", "0.5735895", "0.56831145", "0.568288", "0.5627883", "0.56227237", "0.5606991", "0.55866367", "0.5574322", "0.5512874", "0.550862", "0.55038023", "0.54916304", "0.54849905", "0.5450623", "0.544596", "0.5444949", "0.543169", "0.5430706", "0.5417249", "0.54157877", "0.5411514", "0.540398", "0.53841215", "0.5381501", "0.536431", "0.536431", "0.53556556", "0.5307385", "0.5304889", "0.5301996", "0.52944624", "0.5291656", "0.5272587", "0.5263168", "0.5245919", "0.5245335", "0.52389127", "0.52385837", "0.5237658", "0.5236915", "0.5195128", "0.51771903", "0.5174617", "0.5173135", "0.5165873", "0.5156301", "0.5154577", "0.5148964", "0.5135943", "0.51354545", "0.51275796", "0.5125557", "0.5125557", "0.5125557", "0.512205", "0.5110016", "0.5106049", "0.5105192", "0.50843894", "0.5083567", "0.5076644", "0.50744355", "0.50744325", "0.5058675", "0.50543207", "0.50543207", "0.5048228", "0.50374603", "0.5036848", "0.5017614", "0.5016101", "0.50148326", "0.5009116", "0.500225", "0.49885973", "0.4987867", "0.4987867", "0.49870652", "0.49850726", "0.4977891", "0.49777257", "0.49777257", "0.49683353", "0.49659717", "0.49561232", "0.49561232", "0.49505696" ]
0.0
-1
Hash of the network genesis block optional string genesis = 1 [default = "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691"];
public Builder setGenesisBytes( com.google.protobuf.ByteString value) { copyOnWrite(); instance.setGenesisBytes(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlockChainLink getGenesisLink();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return genesis_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(genesis_);\n }", "com.google.protobuf.ByteString\n getGenesisBytes();", "public GenesisConfig(long version, long timeStamp,\n BigInteger baseTarget, BigInteger cummulativeDifficulty,\n byte[] pubkey, byte[] signature, GenesisTx genesisTx) {\n\n this.version = version;\n this.timeStamp = timeStamp;\n this.baseTarget = baseTarget;\n this.cummulativeDifficulty = cummulativeDifficulty;\n this.pubkey = pubkey;\n\n // According to POT consensus,\n // generationSignature = hash(previous block generationSignature + pubkey)\n // here previous block generationSignature is null.\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = signature;\n this.genesisTx = genesisTx;\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n this.communityName = TauGenesisTransaction.CommunityName;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n }", "private void setGenesisBytes(\n com.google.protobuf.ByteString value) {\n genesis_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "@Override\n\tpublic String getBestBlockHash() throws WalletException {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getGenesisBytes() {\n return instance.getGenesisBytes();\n }", "@Test\n\tpublic void parseGenesisBlock()\n\t{\n\t\tbyte[] rawBlock = gb.toBytes(true, forDB);\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, gb.getDataLength(forDB));\n\t\t\t\n\t\tBlock parsedBlock = null;\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tparsedBlock = BlockFactory.getInstance().parse(rawBlock, forDB);\t\t\n\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\" + e);\n\t\t}\n\t\t\n\t\t//CHECK length\n\t\tassertEquals(rawBlock.length, parsedBlock.getDataLength(forDB));\n\n\t\t//CHECK SIGNATURE\n\t\tassertEquals(true, Arrays.equals(gb.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\n\t\t//CHECK BASE TARGET\n\t\tassertEquals(gb.getGeneratingBalance(db), parsedBlock.getGeneratingBalance(db));\t\n\t\t\n\t\t//CHECK FEE\n\t\tassertEquals(gb.getTotalFee(), parsedBlock.getTotalFee());\t\n\n\t\t//CHECK TRANSACTION COUNT\n\t\tassertEquals(gb.getTransactionCount(), parsedBlock.getTransactionCount());\n\n\t\t//CHECK REFERENCE\n\t\tassertEquals(true, Arrays.equals(gb.getReference(), parsedBlock.getReference()));\t\t\t\n\n\t\t//CHECK GENERATOR\n\t\tassertEquals(gb.getCreator().getAddress(), parsedBlock.getCreator().getAddress());\t\n\t\t\t\t\n\t\t//CHECK INSTANCE\n\t\t////assertEquals(true, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock, forDB);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\n\t}", "java.lang.String getGenesis();", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public GenesisConfig(String communityName,\n ArrayList<GenesisItem> genesisItems) {\n\n // First of all, get account state from TAU blockchain.\n Pair<byte[], byte[]> senderKey = AccountManager.getInstance().getKeyPair();\n\n this.communityName = communityName;\n long timeStamp = System.currentTimeMillis() / 1000;\n byte[] chainID = chainID(communityName, senderKey.first, timeStamp);\n\n // create genesis transaction\n this.genesisTx = new GenesisTx(1L, chainID, timeStamp, DefaultGenesisTxFee,\n senderKey.first, BigInteger.ZERO, genesisItems);\n this.genesisTx.signTransactionWithPriKey(senderKey.second);\n\n this.version = 1L;\n this.timeStamp = System.currentTimeMillis() / 1000;\n\n HorizontalItem item = HorizontalItem.with(this.genesisTx.getTxID());\n this.horizontalHash = item.getHash();\n\n this.baseTarget = DefaultBaseTarget;\n this.cummulativeDifficulty = DefaultCummulativeDifficulty;\n\n this.pubkey = new byte[senderKey.first.length];\n System.arraycopy(senderKey.first, 0, this.pubkey, 0, senderKey.first.length);\n\n this.generationSignature = HashUtil.sha1hash(this.pubkey);\n this.signature = null;\n\n // construct genesis block\n this.genesisBlock = new Block(this);\n this.genesisBlock.signBlock(senderKey.second);\n this.signature = this.genesisBlock.getSignature();\n }", "@java.lang.Override\n public boolean hasGenesis() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "long hash(Block block, int position);", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private void setGenesis(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n genesis_ = value;\n }", "public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "BlockChainLink getLinkBlockHeader(byte[] hash);", "public String getCurrentCommitHash() throws IOException {\n String baseCommit = git.launchCommand(\"rev-parse\", \"--verify\", \"HEAD\").trim();\n debuggingLogger.fine(String.format(\"Base commit hash%s\", baseCommit));\n return baseCommit;\n }", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }", "public BlockChain() {\n this.blockChain = new ArrayList<>();\n this.chainHash = \"\";\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public String calculateHash() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n String data = \"\";\n data += previousHash +\n Long.toString(timeStamp) +\n Integer.toString(nonce) +\n merkleRoot;\n\n data += \"\\\"transactions\\\":\";\n data += mapper.writeValueAsString(transactions);\n return Hashing.applySha256(data);\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private void clearGenesis() {\n bitField0_ = (bitField0_ & ~0x00000001);\n genesis_ = getDefaultInstance().getGenesis();\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "public String calculateHash(int nonce, String seedNodeID, int index) {\n String calculatedhash = StringUtil.applySha256( \n seedNodeID +\n Integer.toString(index) +\n Integer.toString(nonce)\n );\n return calculatedhash;\n }", "String getHash();", "String getHash();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", bversion=\").append(bversion);\n sb.append(\", blockHeight=\").append(blockHeight);\n sb.append(\", propKey=\").append(propKey);\n sb.append(\", propValue=\").append(propValue);\n sb.append(\", mptType=\").append(mptType);\n sb.append(\", hashValue=\").append(hashValue);\n sb.append(\", txid=\").append(txid);\n sb.append(\", prevHashValue=\").append(prevHashValue);\n sb.append(\", prevBlockHeight=\").append(prevBlockHeight);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public HASH256 getHash1(){return hash1;}", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "Block getBlockByHash(byte[] hash);", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "BlockChainLink getLink(byte[] hash);", "public byte[] getHashData(){\r\n byte[] hashData = Serializer.createParcel(\r\n new Object[]{\r\n getParentHash(),\r\n getNonce(),\r\n getTimeStamp(),\r\n BigInteger.valueOf(getIndex()), //Parcel encoding doesnt support longs\r\n BigInteger.valueOf(getDifficulty()), //Parcel encoding doesnt support longs\r\n getMinerAddress(),\r\n getReward(),\r\n getMerkleRoot(),\r\n getAxiomData(),\r\n getBlockData()\r\n });\r\n return hashData;\r\n }", "private BigInteger getBlockNumberOfNodeOnChain(int groupId, String nodeId) {\n SyncStatus syncStatus = frontInterface.getSyncStatus(groupId);\n if (nodeId.equals(syncStatus.getNodeId())) {\n return syncStatus.getBlockNumber();\n }\n List<PeerOfSyncStatus> peerList = syncStatus.getPeers();\n BigInteger latestNumber = peerList.stream().filter(peer -> nodeId.equals(peer.getNodeId()))\n .map(s -> s.getBlockNumber()).findFirst().orElse(BigInteger.ZERO);//blockNumber\n return latestNumber;\n }", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "public Builder setGenesis(\n java.lang.String value) {\n copyOnWrite();\n instance.setGenesis(value);\n return this;\n }", "int getHash();", "@Test\n public void testValidHashZero() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(0,8);\n\tassertEquals(result, true);\n }", "int getClientHashLength();", "java.lang.String getMasterIpv4CidrBlock();", "public String getHash() {\n\t\treturn hash;\n\t}", "public String getHash()\n {\n return hash;\n }", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public String getHash() {\n return hash;\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tArrayList<Block> blockChain = new ArrayList<Block>();\r\n\t\t\r\n\t\tString[] initialValues = {\"Linus has 700 Euro\", \"Florian has 500 Euro\"};\r\n\t\tBlock firstblock = new Block(initialValues, 0);\r\n\t\tblockChain.add(firstblock);\r\n\t\tSystem.out.println(\"Erster Block ist \" + firstblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString[] payBlock = {\"Florian gives Linus 400 Euro\", \"Thomas buy 800 Euro\"};\r\n\t\tBlock secondblock = new Block(payBlock, firstblock.getBlockHash());\r\n\t\tblockChain.add(secondblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + secondblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t\tString[] payBack = {\"Linus gives Florian 400 Euro\"};\r\n\t\tBlock thirdblock = new Block(payBack, secondblock.getBlockHash());\r\n\t\tblockChain.add(thirdblock);\r\n\t\tSystem.out.println(\"Zweiter Block ist \" + thirdblock.toString());\r\n\t\tSystem.out.println(\"Die block chain ist\" + blockChain.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}", "public String generateBlock(){\n return null;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "public byte[] hashTransaction() {\n byte[][] txIdArrays = new byte[this.getTransactions().length][];\n for (int i = 0;i < this.getTransactions().length;i++) {\n txIdArrays[i] = this.getTransactions()[i].getTxId();\n }\n return new MerkleTree(txIdArrays).getRoot().getHash();\n }", "public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "BlockChainLink getLastLink();", "phaseI.Hdfs.BlockLocations getNewBlock();", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public static Hash160 contractOwner() {\n return contractOwner;\n }", "public static String hashChest(Chest c) {\n\t\tInventory inv = c.getInventory();\n\t\tString temp = \"\";\n\t\tfor(int i = 0; i < inv.getSize(); i++) {\n\t\t\tItemStack is = inv.getItem(i);\n\t\t\tif(is != null) {\n\t\t\t\ttemp += i + \":\" + is.getType().name().charAt(0) + \":\" + is.getAmount() + \"$\";\n\t\t\t}\n\t\t}\n\t\t// TODO: debug\n\t\tBukkit.getLogger().info(\"(Debug) Chest checksum is \" + temp);\n\t\tBukkit.getLogger().info(\"(Debug) Chest hash is \" + hash(temp));\n\t\t////\n\t\treturn hash(temp);\n\t}", "com.google.protobuf.ByteString\n getSaltedHashBytes();", "public org.json.JSONObject viewBlockChainStatus() {\n org.json.JSONObject jsonString = new org.json.JSONObject().put(\"size\", getChainSize())\n .put(\"hashes\", hashesPerSecond())\n .put(\"difficulty\", getLatestBlock().getDifficulty())\n .put(\"nonce\", getLatestBlock().getNonce().toString())\n .put(\"chainHash\", chainHash);\n return jsonString;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coinTypeId=\").append(coinTypeId);\n sb.append(\", recTime=\").append(recTime);\n sb.append(\", actiontype=\").append(actiontype);\n sb.append(\", lockId=\").append(lockId);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serverIp=\").append(serverIp);\n sb.append(\", gameId=\").append(gameId);\n sb.append(\", serverName=\").append(serverName);\n sb.append(\", lockNum=\").append(lockNum);\n sb.append(\", changeNum=\").append(changeNum);\n sb.append(\", remainNum=\").append(remainNum);\n sb.append(\", otherLockNum=\").append(otherLockNum);\n sb.append(\"]\");\n return sb.toString();\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "int getBlockNumber();", "int getBlockNumber();", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.6926382", "0.66773117", "0.66424996", "0.65233874", "0.6324576", "0.63017154", "0.62788105", "0.6247794", "0.6169162", "0.6027311", "0.59534395", "0.5923081", "0.5784323", "0.5784323", "0.57361966", "0.5683581", "0.568312", "0.56291246", "0.5623782", "0.5605472", "0.5585503", "0.5572977", "0.5512998", "0.5507533", "0.5504396", "0.5492604", "0.5486275", "0.54520786", "0.5447422", "0.54460204", "0.5433469", "0.54162747", "0.5415245", "0.5411663", "0.5405281", "0.53859353", "0.5380344", "0.5363442", "0.5363442", "0.5354605", "0.5306142", "0.5303665", "0.5301465", "0.5294738", "0.5293774", "0.52724296", "0.5262588", "0.52468306", "0.5246396", "0.52383494", "0.52380025", "0.5237309", "0.52371395", "0.5195302", "0.5177193", "0.5175733", "0.5171677", "0.5165135", "0.51549035", "0.5154111", "0.5150341", "0.5137048", "0.51352364", "0.5127626", "0.51244617", "0.5124077", "0.5124077", "0.5124077", "0.5111016", "0.51055795", "0.5104613", "0.5088002", "0.5082135", "0.5078255", "0.5075151", "0.5073619", "0.50578964", "0.50569504", "0.50569504", "0.504746", "0.50407666", "0.5035865", "0.50176865", "0.50156236", "0.50155556", "0.50098497", "0.50023955", "0.49905786", "0.49905786", "0.49880874", "0.49853972", "0.49840862", "0.49766058", "0.49766058", "0.49759609", "0.4972321", "0.4968654", "0.4958243", "0.4958243", "0.49503064" ]
0.5431714
31
Where payment should be sent repeated .payments.Output outputs = 2;
@java.lang.Override public java.util.List<com.dogecoin.protocols.payments.Protos.Output> getOutputsList() { return java.util.Collections.unmodifiableList( instance.getOutputsList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "void paymentOrder(long orderId);", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "public void pay(InternalAccountOwner from, InternalAccountOwner to, BigDecimal amount) {\n PerformPaymentData data;\n try {\n data = transactionService.getPaymentData(from, to, null);\n } catch (EntityNotFoundException e) {\n System.out.println(\"Some of the users were not found. Transaction aborted.\");\n return;\n }\n\n // try to figure out the type of payment (for some reason)\n List<TransferTypeWithCurrencyVO> types = data.getPaymentTypes();\n TransferTypeWithCurrencyVO paymentType = CollectionHelper.first(types);\n if (paymentType == null) {\n System.out.println(\"There is no possible payment type.\");\n }\n\n // set up payment to be made\n PerformPaymentDTO payment = new PerformPaymentDTO();\n payment.setType(paymentType);\n payment.setFrom(from);\n payment.setTo(to);\n payment.setAmount(amount);\n\n try {\n PaymentVO result = paymentService.perform(payment);\n TransactionAuthorizationStatus authStatus = result.getAuthorizationStatus();\n if (authStatus == TransactionAuthorizationStatus.PENDING_AUTHORIZATION) {\n System.out.println(\"The payment is pending authorization.\");\n } else {\n System.out.println(\"The payment has been processed.\");\n }\n } catch (InsufficientBalanceException e) {\n System.out.println(\"Insufficient balance\");\n } catch (MaxPaymentsPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MinTimeBetweenPaymentsException e) {\n System.out.println(\"A minimum period of time should be awaited to make \"\n + \"a payment of this type\");\n } catch (MaxAmountPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (Exception e) {\n System.out.println(\"The payment couldn't be performed\");\n }\n\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}" ]
[ "0.6189728", "0.61718285", "0.5977192", "0.5939357", "0.5918659", "0.59034014", "0.5898379", "0.5881606", "0.5838093", "0.58015126", "0.57310265", "0.5721403", "0.5620485", "0.56169635", "0.55954003", "0.5573718", "0.55580556", "0.5521689", "0.5514021", "0.55125624", "0.55041355", "0.548723", "0.54501307", "0.5445418", "0.5436704", "0.54362327", "0.5433203", "0.54160416", "0.53965473", "0.5368001", "0.5354394", "0.5349159", "0.53365266", "0.5309449", "0.52962303", "0.5294125", "0.52889377", "0.52800035", "0.52336025", "0.5221407", "0.52202225", "0.52170765", "0.5211051", "0.5210623", "0.52098566", "0.5205186", "0.5199939", "0.5189992", "0.5186849", "0.51852405", "0.51693857", "0.51556146", "0.51536286", "0.51535213", "0.5144993", "0.5143303", "0.5141935", "0.5140946", "0.5140417", "0.5135174", "0.51229525", "0.51190794", "0.51132345", "0.510806", "0.5103693", "0.5101224", "0.5099772", "0.50971353", "0.5083432", "0.50826865", "0.5072962", "0.5069325", "0.506653", "0.5064391", "0.5061817", "0.50561184", "0.5052614", "0.5052424", "0.5042602", "0.5039886", "0.5038208", "0.50379044", "0.5037628", "0.5028323", "0.5024976", "0.502224", "0.501936", "0.50169206", "0.50142473", "0.50117624", "0.50066406", "0.50010026", "0.49991363", "0.49946624", "0.49910918", "0.49908563", "0.49881998", "0.4986574", "0.49841088", "0.4977202", "0.4977158" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
@java.lang.Override public int getOutputsCount() { return instance.getOutputsCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
@java.lang.Override public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) { return instance.getOutputs(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.50388545
80
Where payment should be sent repeated .payments.Output outputs = 2;
public Builder setOutputs( int index, com.dogecoin.protocols.payments.Protos.Output value) { copyOnWrite(); instance.setOutputs(index, value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}" ]
[ "0.61889356", "0.61716366", "0.59775674", "0.5939274", "0.5919283", "0.5902915", "0.58987474", "0.5882188", "0.5838648", "0.5800277", "0.5730218", "0.57213587", "0.56207657", "0.56170195", "0.55952394", "0.5572764", "0.55582607", "0.55220014", "0.5513604", "0.5511885", "0.55036163", "0.54878557", "0.54509014", "0.5445272", "0.54366237", "0.5435872", "0.5433543", "0.54156375", "0.53950316", "0.5366789", "0.5355474", "0.5347812", "0.5335905", "0.5309579", "0.52967167", "0.52933896", "0.5288708", "0.5279609", "0.52329385", "0.5220507", "0.52199197", "0.521781", "0.52107275", "0.521071", "0.5208446", "0.52054214", "0.5199339", "0.51880383", "0.51868075", "0.51841766", "0.51683265", "0.5155095", "0.51537156", "0.515283", "0.5145046", "0.51436293", "0.51409006", "0.51405925", "0.5139869", "0.513462", "0.5123272", "0.51180637", "0.5114326", "0.5107666", "0.5103886", "0.50997835", "0.50994617", "0.50991565", "0.5082842", "0.50826347", "0.50726056", "0.50690544", "0.5064763", "0.5063366", "0.50602365", "0.50563455", "0.505275", "0.5051821", "0.50416505", "0.50393885", "0.5038752", "0.50373745", "0.5036622", "0.5028214", "0.5024635", "0.5023041", "0.5018727", "0.50159854", "0.50147367", "0.5011746", "0.5005649", "0.5000691", "0.49988133", "0.4994527", "0.499186", "0.4991461", "0.4988242", "0.49862975", "0.49827713", "0.4978018", "0.49764577" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
public Builder setOutputs( int index, com.dogecoin.protocols.payments.Protos.Output.Builder builderForValue) { copyOnWrite(); instance.setOutputs(index, builderForValue.build()); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "void paymentOrder(long orderId);", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "public void pay(InternalAccountOwner from, InternalAccountOwner to, BigDecimal amount) {\n PerformPaymentData data;\n try {\n data = transactionService.getPaymentData(from, to, null);\n } catch (EntityNotFoundException e) {\n System.out.println(\"Some of the users were not found. Transaction aborted.\");\n return;\n }\n\n // try to figure out the type of payment (for some reason)\n List<TransferTypeWithCurrencyVO> types = data.getPaymentTypes();\n TransferTypeWithCurrencyVO paymentType = CollectionHelper.first(types);\n if (paymentType == null) {\n System.out.println(\"There is no possible payment type.\");\n }\n\n // set up payment to be made\n PerformPaymentDTO payment = new PerformPaymentDTO();\n payment.setType(paymentType);\n payment.setFrom(from);\n payment.setTo(to);\n payment.setAmount(amount);\n\n try {\n PaymentVO result = paymentService.perform(payment);\n TransactionAuthorizationStatus authStatus = result.getAuthorizationStatus();\n if (authStatus == TransactionAuthorizationStatus.PENDING_AUTHORIZATION) {\n System.out.println(\"The payment is pending authorization.\");\n } else {\n System.out.println(\"The payment has been processed.\");\n }\n } catch (InsufficientBalanceException e) {\n System.out.println(\"Insufficient balance\");\n } catch (MaxPaymentsPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MinTimeBetweenPaymentsException e) {\n System.out.println(\"A minimum period of time should be awaited to make \"\n + \"a payment of this type\");\n } catch (MaxAmountPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (Exception e) {\n System.out.println(\"The payment couldn't be performed\");\n }\n\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}" ]
[ "0.6189728", "0.61718285", "0.5977192", "0.5939357", "0.5918659", "0.59034014", "0.5898379", "0.5881606", "0.5838093", "0.58015126", "0.57310265", "0.5721403", "0.5620485", "0.56169635", "0.55954003", "0.5573718", "0.55580556", "0.5521689", "0.5514021", "0.55125624", "0.55041355", "0.548723", "0.54501307", "0.5445418", "0.5436704", "0.54362327", "0.5433203", "0.54160416", "0.53965473", "0.5368001", "0.5354394", "0.5349159", "0.53365266", "0.5309449", "0.52962303", "0.5294125", "0.52889377", "0.52800035", "0.52336025", "0.5221407", "0.52202225", "0.52170765", "0.5211051", "0.5210623", "0.52098566", "0.5205186", "0.5199939", "0.5189992", "0.5186849", "0.51852405", "0.51693857", "0.51556146", "0.51536286", "0.51535213", "0.5144993", "0.5143303", "0.5141935", "0.5140946", "0.5140417", "0.5135174", "0.51229525", "0.51190794", "0.51132345", "0.510806", "0.5103693", "0.5101224", "0.5099772", "0.50971353", "0.5083432", "0.50826865", "0.5072962", "0.5069325", "0.506653", "0.5064391", "0.5061817", "0.50561184", "0.5052614", "0.5052424", "0.5042602", "0.5039886", "0.5038208", "0.50379044", "0.5037628", "0.5028323", "0.5024976", "0.502224", "0.501936", "0.50169206", "0.50142473", "0.50117624", "0.50066406", "0.50010026", "0.49991363", "0.49946624", "0.49910918", "0.49908563", "0.49881998", "0.4986574", "0.49841088", "0.4977202", "0.4977158" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
public Builder addOutputs(com.dogecoin.protocols.payments.Protos.Output value) { copyOnWrite(); instance.addOutputs(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
public Builder addOutputs( int index, com.dogecoin.protocols.payments.Protos.Output value) { copyOnWrite(); instance.addOutputs(index, value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
public Builder addOutputs( com.dogecoin.protocols.payments.Protos.Output.Builder builderForValue) { copyOnWrite(); instance.addOutputs(builderForValue.build()); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}" ]
[ "0.61889356", "0.61716366", "0.59775674", "0.5939274", "0.5919283", "0.5902915", "0.58987474", "0.5882188", "0.5838648", "0.5800277", "0.5730218", "0.57213587", "0.56207657", "0.56170195", "0.55952394", "0.5572764", "0.55582607", "0.55220014", "0.5513604", "0.5511885", "0.55036163", "0.54878557", "0.54509014", "0.5445272", "0.54366237", "0.5435872", "0.5433543", "0.54156375", "0.53950316", "0.5366789", "0.5355474", "0.5347812", "0.5335905", "0.5309579", "0.52967167", "0.52933896", "0.5288708", "0.5279609", "0.52329385", "0.5220507", "0.52199197", "0.521781", "0.52107275", "0.521071", "0.5208446", "0.52054214", "0.5199339", "0.51880383", "0.51868075", "0.51841766", "0.51683265", "0.5155095", "0.51537156", "0.515283", "0.5145046", "0.51436293", "0.51409006", "0.51405925", "0.5139869", "0.513462", "0.5123272", "0.51180637", "0.5114326", "0.5107666", "0.5103886", "0.50997835", "0.50994617", "0.50991565", "0.5082842", "0.50826347", "0.50726056", "0.50690544", "0.5064763", "0.5063366", "0.50602365", "0.50563455", "0.505275", "0.5051821", "0.50416505", "0.50393885", "0.5038752", "0.50373745", "0.5036622", "0.5028214", "0.5024635", "0.5023041", "0.5018727", "0.50159854", "0.50147367", "0.5011746", "0.5005649", "0.5000691", "0.49988133", "0.4994527", "0.499186", "0.4991461", "0.4988242", "0.49862975", "0.49827713", "0.4978018", "0.49764577" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
public Builder addOutputs( int index, com.dogecoin.protocols.payments.Protos.Output.Builder builderForValue) { copyOnWrite(); instance.addOutputs(index, builderForValue.build()); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "void paymentOrder(long orderId);", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "public void pay(InternalAccountOwner from, InternalAccountOwner to, BigDecimal amount) {\n PerformPaymentData data;\n try {\n data = transactionService.getPaymentData(from, to, null);\n } catch (EntityNotFoundException e) {\n System.out.println(\"Some of the users were not found. Transaction aborted.\");\n return;\n }\n\n // try to figure out the type of payment (for some reason)\n List<TransferTypeWithCurrencyVO> types = data.getPaymentTypes();\n TransferTypeWithCurrencyVO paymentType = CollectionHelper.first(types);\n if (paymentType == null) {\n System.out.println(\"There is no possible payment type.\");\n }\n\n // set up payment to be made\n PerformPaymentDTO payment = new PerformPaymentDTO();\n payment.setType(paymentType);\n payment.setFrom(from);\n payment.setTo(to);\n payment.setAmount(amount);\n\n try {\n PaymentVO result = paymentService.perform(payment);\n TransactionAuthorizationStatus authStatus = result.getAuthorizationStatus();\n if (authStatus == TransactionAuthorizationStatus.PENDING_AUTHORIZATION) {\n System.out.println(\"The payment is pending authorization.\");\n } else {\n System.out.println(\"The payment has been processed.\");\n }\n } catch (InsufficientBalanceException e) {\n System.out.println(\"Insufficient balance\");\n } catch (MaxPaymentsPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MinTimeBetweenPaymentsException e) {\n System.out.println(\"A minimum period of time should be awaited to make \"\n + \"a payment of this type\");\n } catch (MaxAmountPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (Exception e) {\n System.out.println(\"The payment couldn't be performed\");\n }\n\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}" ]
[ "0.6189728", "0.61718285", "0.5977192", "0.5939357", "0.5918659", "0.59034014", "0.5898379", "0.5881606", "0.5838093", "0.58015126", "0.57310265", "0.5721403", "0.5620485", "0.56169635", "0.55954003", "0.5573718", "0.55580556", "0.5521689", "0.5514021", "0.55125624", "0.55041355", "0.548723", "0.54501307", "0.5445418", "0.5436704", "0.54362327", "0.5433203", "0.54160416", "0.53965473", "0.5368001", "0.5354394", "0.5349159", "0.53365266", "0.5309449", "0.52962303", "0.5294125", "0.52889377", "0.52800035", "0.52336025", "0.5221407", "0.52202225", "0.52170765", "0.5211051", "0.5210623", "0.52098566", "0.5205186", "0.5199939", "0.5189992", "0.5186849", "0.51852405", "0.51693857", "0.51556146", "0.51536286", "0.51535213", "0.5144993", "0.5143303", "0.5141935", "0.5140946", "0.5140417", "0.5135174", "0.51229525", "0.51190794", "0.51132345", "0.510806", "0.5103693", "0.5101224", "0.5099772", "0.50971353", "0.5083432", "0.50826865", "0.5072962", "0.5069325", "0.506653", "0.5064391", "0.5061817", "0.50561184", "0.5052614", "0.5052424", "0.5042602", "0.5039886", "0.5038208", "0.50379044", "0.5037628", "0.5028323", "0.5024976", "0.502224", "0.501936", "0.50169206", "0.50142473", "0.50117624", "0.50066406", "0.50010026", "0.49991363", "0.49946624", "0.49910918", "0.49908563", "0.49881998", "0.4986574", "0.49841088", "0.4977202", "0.4977158" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
public Builder addAllOutputs( java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) { copyOnWrite(); instance.addAllOutputs(values); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
public Builder clearOutputs() { copyOnWrite(); instance.clearOutputs(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public interface Payment {\n\n void pay();\n}" ]
[ "0.6190147", "0.6171904", "0.5976549", "0.5940567", "0.59199846", "0.59026307", "0.589855", "0.58829737", "0.5838494", "0.57997423", "0.5729423", "0.57223356", "0.5621013", "0.56162035", "0.5595309", "0.5573914", "0.55582", "0.5522369", "0.55132663", "0.5512875", "0.5504528", "0.5487981", "0.54521275", "0.5445172", "0.5437374", "0.54361546", "0.54338926", "0.54152477", "0.5394471", "0.5367532", "0.53558713", "0.53492147", "0.5336306", "0.5309855", "0.52971977", "0.52944875", "0.52889585", "0.5278881", "0.52323437", "0.52212566", "0.5220796", "0.5216002", "0.5210595", "0.5210065", "0.52086955", "0.5205327", "0.5199845", "0.5188978", "0.51855797", "0.51844573", "0.5169085", "0.51553386", "0.5154608", "0.51527447", "0.5144883", "0.51435935", "0.51419467", "0.51411116", "0.5140313", "0.51355636", "0.5123937", "0.511831", "0.5114985", "0.51079124", "0.51042277", "0.5100046", "0.5100013", "0.50977874", "0.50822526", "0.5081803", "0.5071876", "0.5069021", "0.50654227", "0.50630194", "0.5061102", "0.5055758", "0.50529516", "0.50521183", "0.5040626", "0.5040116", "0.50388545", "0.5037328", "0.50361216", "0.50283307", "0.50248325", "0.50230557", "0.5019318", "0.5016197", "0.50134826", "0.5012287", "0.5005478", "0.500126", "0.49985984", "0.4994473", "0.49917677", "0.49909604", "0.4989092", "0.4985053", "0.49828368", "0.497845", "0.49764162" ]
0.0
-1
Where payment should be sent repeated .payments.Output outputs = 2;
public Builder removeOutputs(int index) { copyOnWrite(); instance.removeOutputs(index); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculatePayment() {}", "void pay(Payment payment) {\n\n\t}", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}", "void pay(Order order);", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);", "public IBankTransfert payment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void runPayment(Payment payments) {\n paymentReceiver.startPaymentBundle(payments.getAccountNumber(), payments.getPaymentDate(), payments.getCurrency());\n for (PaymentLine paymentLine: payments.getPaymentLines()) {\n paymentReceiver.payment(paymentLine.getAmount(), paymentLine.getReference());\n }\n paymentReceiver.endPaymentBundle();\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\n\tpublic int makepayment(Payment payment) {\n\t\treturn paydao.doPayment(payment);\n\t}", "public double getTotalPayments(){return this.total;}", "public void autoPay() {}", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "public double calculatePayment (int hours);", "public int updatePayment2(int requestId, int amount);", "public void onOutputSpent(MoneroOutputWallet output);", "public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public FinishPaymentCommand(String parameter) {\n\t\tapPaymentIds = parameter;\n\t}", "CarPaymentMethod processPayPal();", "void payBills();", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void fixedPayerAndReceiverTest() {\n double fixedRate = 0.015;\n GeneratorAttributeIR attribute = new GeneratorAttributeIR(Period.ofYears(7));\n double notional = 1.0e8;\n ZonedDateTime date = DateUtils.getUTCDate(2013, 9, 10);\n SwapFixedIborDefinition def1 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute);\n SwapFixedIborDefinition def2 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, true);\n assertEquals(def1, def2);\n SwapFixedIborDefinition def3 = GENERATOR_FROM_INDEX.generateInstrument(date, fixedRate, notional, attribute, false);\n assertFalse(def1.equals(def3));\n int nIbor = def1.getIborLeg().getNumberOfPayments();\n int nFixed = def1.getFixedLeg().getNumberOfPayments();\n assertEquals(nIbor, def3.getIborLeg().getNumberOfPayments());\n assertEquals(nFixed, def3.getFixedLeg().getNumberOfPayments());\n assertEquals(def1.getIborLeg().getIborIndex(), def3.getIborLeg().getIborIndex());\n assertEquals(def1.getIborLeg().getCalendar(), def3.getIborLeg().getCalendar());\n assertEquals(def1.getCurrency(), def3.getIborLeg().getCurrency());\n for (int i = 0; i < nIbor; ++i) {\n CouponIborDefinition ibor1 = def1.getIborLeg().getNthPayment(i);\n CouponIborDefinition ibor3 = def3.getIborLeg().getNthPayment(i);\n assertEquals(ibor1.getNotional(), -ibor3.getNotional());\n assertEquals(ibor1.getAccrualStartDate(), ibor3.getAccrualStartDate());\n assertEquals(ibor1.getAccrualEndDate(), ibor3.getAccrualEndDate());\n assertEquals(ibor1.getFixingDate(), ibor3.getFixingDate());\n assertEquals(ibor1.getPaymentDate(), ibor3.getPaymentDate());\n assertEquals(ibor1.getPaymentYearFraction(), ibor3.getPaymentYearFraction());\n }\n for (int i = 0; i < nFixed; ++i) {\n CouponFixedDefinition fixed1 = def1.getFixedLeg().getNthPayment(i);\n CouponFixedDefinition fixed3 = def3.getFixedLeg().getNthPayment(i);\n assertEquals(fixed1.getNotional(), -fixed3.getNotional());\n assertEquals(fixed1.getAccrualStartDate(), fixed3.getAccrualStartDate());\n assertEquals(fixed1.getAccrualEndDate(), fixed3.getAccrualEndDate());\n assertEquals(fixed1.getPaymentDate(), fixed3.getPaymentDate());\n assertEquals(fixed1.getPaymentYearFraction(), fixed3.getPaymentYearFraction());\n }\n }", "private void addAllOutputs(\n java.lang.Iterable<? extends com.dogecoin.protocols.payments.Protos.Output> values) {\n ensureOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, outputs_);\n }", "void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void addOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(index, value);\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "void paymentOrder(long orderId);", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "public abstract void msgPayment(Customer customer, Cash cash);", "private void addOutputs(com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.add(value);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}", "public void CashPayment()\n {\n }", "public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }", "@Override\n public String toString() {\n return payment; \n }", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private void make_payment(int studentId)\n\t{\n\t\t\n\t\tdouble fee =0.0;\n\t\ttry\n\t\t{\n\t\t\tregistrationInterface.calculateFee(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t\tif(fee == 0.0)\n\t\t{\n\t\t\tlogger.info(\"You have not registered for any courses yet\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"Your total fee = \" + fee);\n\t\t\tlogger.info(\"Want to continue Fee Payment(y/n)\");\n\t\t\tString ch = sc.next();\n\t\t\tif(ch.equals(\"y\"))\n\t\t\t{\n\t\t\t\tlogger.info(\"Select Mode of Payment:\");\n\t\t\t\t\n\t\t\t\tint index = 1;\n\t\t\t\tfor(ModeOfPayment mode : ModeOfPayment.values())\n\t\t\t\t{\n\t\t\t\t\tlogger.info(index + \" \" + mode);\n\t\t\t\t\tindex = index + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tModeOfPayment mode = ModeOfPayment.getModeofPayment(sc.nextInt());\n\t\t\t\t\n\t\t\t\tif(mode == null)\n\t\t\t\t\tlogger.info(\"Invalid Input\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tNotification notify=null;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tnotify = registrationInterface.payFee(studentId, mode,fee);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SQLException e) \n\t\t\t\t\t{\n\n\t\t\t\t\t\tlogger.info(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Your Payment is successful\");\n\t\t\t\t\tlogger.info(\"Your transaction id : \" + notify.getReferenceId());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\r\n\tpublic void excute(BPMN_elements bpmn_elements) {\n\t\tList<SequenceFlow> sequenceFlowsList = bpmn_elements.getSequenceFlowList();\r\n\t\tList<ParallelGateway> parallelGatewaysList = bpmn_elements.getParallelGatewayList();\r\n\t\tList<IntermediateThrowEvent> intermediateThrowEventsList = bpmn_elements.getIntermediateThrowEventList();\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < intermediateThrowEventsList.size(); i++) {\r\n\t\t\tIntermediateThrowEvent wating1 = intermediateThrowEventsList.get(i);\r\n\t\t\t\r\n\t\t\tif(wating1.getOutgoing().size() >= 2) { //Wating1的输出行数大于等于2时\r\n\t\t\t\tint outgoingSize = wating1.getOutgoing().size();\r\n\t\t\t\t//1.创建并行网关\r\n\t\t\t\tParallelGateway newParallelGateway = new ParallelGateway();\r\n\t\t\t\t //定义属性\r\n\t\t\t\tnewParallelGateway.setGatewayDirection(\"Diverging\");\r\n\t\t\t\tnewParallelGateway.setName(\"Parallel Gateway\");\t\r\n\t\t\t\t\r\n\t\t\t\tString newParID = GenID.getId(); //获取网关ID\r\n\t\t\t\tnewParallelGateway.setId(newParID);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaIncoming = new ArrayList<>();//定义输入\r\n\t\t\t\tString newParIncomingID = GenID.getId(); //获取输入ID,也是序列流的ID\r\n\t\t\t\tnewParaIncoming.add(newParIncomingID);\r\n\t\t\t\tnewParallelGateway.setIncoming(newParaIncoming);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<String> newParaOutgoing = new ArrayList<>();//定义输出\r\n\t\t\t\tfor(int j = 0; j < outgoingSize; j++) {\r\n\t\t\t\t\tnewParaOutgoing.add(wating1.getOutgoing().get(j));\r\n\t\t\t\t}\r\n\t\t\t\tnewParallelGateway.setOutgoing(newParaOutgoing);\r\n\t\t\t\t\r\n\t\t\t\tparallelGatewaysList.add(newParallelGateway);\r\n\t\t\t\tbpmn_elements.getGateWayList().add(newParallelGateway);\r\n\t\t\t\t\r\n\t\t\t\t//2.更改序列流\r\n\t\t\t\tboolean mid = false;\r\n\t\t\t\tfor(int j = 0; j < sequenceFlowsList.size(); j++) {\r\n\t\t\t\t\tfor(int a = 0; a < outgoingSize; a++) {\r\n\t\t\t\t\t\tif(sequenceFlowsList.get(j).getId().equals(wating1.getOutgoing().get(a))) {\r\n\t\t\t\t\t\t\tmid =true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(mid) {\r\n\t\t\t\t\t\tsequenceFlowsList.get(j).setSourceRef(newParID);\r\n\t\t\t\t\t\tmid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//3.生成序列流\r\n\t\t\t\tSequenceFlow newSequenceFlow = new SequenceFlow();\r\n\t\t\t\tnewSequenceFlow.setId(newParIncomingID);\r\n\t\t\t\tnewSequenceFlow.setSourceRef(wating1.getId());\r\n\t\t\t\tnewSequenceFlow.setTargetRef(newParID);\r\n\t\t\t\tsequenceFlowsList.add(newSequenceFlow);\r\n\t\t\t\t\r\n\t\t\t\t//4.改变Wating1的Outgoing\r\n\t\t\t\tArrayList<String> newTasksOutgoing = new ArrayList<>();\r\n\t\t\t\tnewTasksOutgoing.add(newParID);\r\n\t\t\t\twating1.setIncoming(newTasksOutgoing);\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "@Override\n\tpublic void execute(Tuple input) {\n\t\tPaymentMessage paymentMessage=(PaymentMessage) input.getValue(0);\n\t\tlong timestamp=(paymentMessage.getCreateTime() / 1000 / 60) * 60;\n\t\tdouble payAmount=paymentMessage.getPayAmount();\n\t\tshort payPlatform= paymentMessage.getPayPlatform();\n\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\tplatformLock.lock();\n\t\t\ttry {\n\t\t\t\tif(!platformMap.containsKey(timestamp)) {\n\t\t\t\t\tplatformMap.put(timestamp, new RatioMessage());\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t // TODO: handle exception\n\t }finally {\n\t \tplatformLock.unlock();\n\t }\t\t\t\t\n\t\t}\n\t\t//LOG.info(\"INCRTIMESTAMP\"+timestamp+\" payPlatform:\"+payPlatform + \" payAmount:\" +payAmount);\n\t\tplatformMap.get(timestamp).incr(payPlatform, payAmount);\n\t\tcollector.ack(input);\n\t}", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "private void calculateOutgoings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, outgoingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allOutgoings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public abstract double pay();", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return instance.getOutputs(index);\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "public interface Payment {\n\tpublic void pay(String name, float balance);\n}", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public int makePayment(Map<String, Object> makePaymentArgs) {\n\n\t\tOffer offer = (Offer) makePaymentArgs.get(\"offer\"); // verification logic\n\t\t//log.debug(\"make payment service - \" + offer);\n\t\tint installments = offer.getInstallments();\n\t\tif (installments <= 0) {\n\t\t\tlog.info(\"Sorry, payments can't be made on this offer!\");\n\t\t\toffer.setStatus(new Status(2, \"completed\"));\n\t\t\tofferDao.update(offer);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// create a payment\n\t\tPayment payment = new Payment();\n\t\tpayment.setUser((User) makePaymentArgs.get(\"user\"));\n\t\tpayment.setOffer(offer);\n\n\t\tDouble amount = ((Double) makePaymentArgs.get(\"amount\") / installments);\n\t\tpayment.setAmount(amount);\n\t\tpayment = paymentDao.create(payment);\n\n\t\tif (payment.getPayment_id() != null) {\n\t\t\t//log.debug(\"Make Payment - Payment Id: \" + payment);\n\n\t\t\t// update number of installments left\n\t\t\tint oldInstallments = offer.getInstallments();\n\t\t\toffer.setInstallments(oldInstallments - 1);\n\t\t\tif (oldInstallments - 1 == 0) {\n\t\t\t\tStatus complete = new Status();\n\t\t\t\tcomplete.setStatus_id(2);\n\t\t\t\tcomplete.setStatus_name(\"completed\");\n\t\t\t\toffer.setStatus(complete);\n\t\t\t}\n\n\t\t\tDouble oldBalance = offer.getBalance();\n\t\t\toffer.setBalance(oldBalance - amount);\n\t\t\tofferDao.update(offer);\n\t\t\treturn payment.getPayment_id();\n\t\t} else {\n\t\t\tlog.info(\"Payment Unsuccessful\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "public void performPayment() {\n payment.executePayment(amount);\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}" ]
[ "0.61889356", "0.61716366", "0.59775674", "0.5939274", "0.5919283", "0.5902915", "0.58987474", "0.5882188", "0.5838648", "0.5800277", "0.5730218", "0.57213587", "0.56207657", "0.56170195", "0.55952394", "0.5572764", "0.55582607", "0.55220014", "0.5513604", "0.5511885", "0.55036163", "0.54878557", "0.54509014", "0.5445272", "0.54366237", "0.5435872", "0.5433543", "0.54156375", "0.53950316", "0.5366789", "0.5355474", "0.5347812", "0.5335905", "0.5309579", "0.52967167", "0.52933896", "0.5288708", "0.5279609", "0.52329385", "0.5220507", "0.52199197", "0.521781", "0.52107275", "0.521071", "0.5208446", "0.52054214", "0.5199339", "0.51880383", "0.51868075", "0.51841766", "0.51683265", "0.5155095", "0.51537156", "0.515283", "0.5145046", "0.51436293", "0.51409006", "0.51405925", "0.5139869", "0.513462", "0.5123272", "0.51180637", "0.5114326", "0.5107666", "0.5103886", "0.50997835", "0.50994617", "0.50991565", "0.5082842", "0.50826347", "0.50726056", "0.50690544", "0.5064763", "0.5063366", "0.50602365", "0.50563455", "0.505275", "0.5051821", "0.50416505", "0.50393885", "0.5038752", "0.50373745", "0.5036622", "0.5028214", "0.5024635", "0.5023041", "0.5018727", "0.50159854", "0.50147367", "0.5011746", "0.5005649", "0.5000691", "0.49988133", "0.4994527", "0.499186", "0.4991461", "0.4988242", "0.49862975", "0.49827713", "0.4978018", "0.49764577" ]
0.0
-1
Timestamp; when payment request created required uint64 time = 3;
@java.lang.Override public boolean hasTime() { return instance.hasTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigInteger getResponse_time();", "com.google.protobuf.Timestamp getSubmitTime();", "com.google.protobuf.Timestamp getSendTime();", "public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}", "double getClientTime();", "long getCreateTime();", "long getCreateTime();", "Long timestamp();", "public int getTime() { return _time; }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "long getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "int getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "int getCreateTime();", "com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder();", "@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}", "com.google.protobuf.ByteString getSignedTimeStamp();", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public abstract long now();", "com.google.protobuf.Timestamp getCurrentStateTime();", "long getRetrievedTime();", "com.google.protobuf.ByteString\n getTimeBytes();", "public Date getPayTime() {\n return payTime;\n }", "public Date getPayTime() {\n return payTime;\n }", "OffsetDateTime creationTime();", "public long getSentTime();", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();", "public long getTimeStamp() {return timeStamp;}", "long getTimeStamp();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "public Date getRequesttime() {\n return requesttime;\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "public long getTimestamp() {\n return timestamp_;\n }", "public Timestamp() {\n makeNow();\n }", "public Long getCreatetime() {\n return createtime;\n }", "com.google.protobuf.StringValue getTransactionDateTime();", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "@ApiModelProperty(example = \"1518811817\", value = \"The transaction time in seconds since epoch.\")\n public Long getTransactionTime() {\n return transactionTime;\n }", "public double getTime() {return _time;}", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantity\r\n \t\r\n \tmillis = (timeStamp >> 16) & 0x00000000ffffffffL; // this is a 32 bit quantity\r\n \t\r\n \tmicros = timeStamp & 0x0000ffffL; // this is a 16 bit quantity\r\n \t \r\n }", "public String getReqTime() {\n return reqTime;\n }", "com.google.protobuf.Timestamp getVotingStartTime();", "public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }", "UtcT time_stamp () throws BaseException;", "public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTime(){\n return this.time;\n }", "public Date getTimeCreate() {\n return timeCreate;\n }", "@Override\n public long getTime() {\n return time;\n }", "public int getTimeStamp() {\n return timeStamp;\n }", "com.google.protobuf.Timestamp getTimestamp();", "OffsetDateTime timeCreated();", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "@ApiModelProperty(value = \"The timestamp that the `last_price` represents.\")\n public OffsetDateTime getTime() {\n return time;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public long getCreateTime() {\n return createTime_;\n }", "public void setRequesttime(Date requesttime) {\n this.requesttime = requesttime;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();", "public int getCreateTime() {\n return createTime_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }" ]
[ "0.6860514", "0.6237032", "0.6225305", "0.6167018", "0.60975635", "0.6097323", "0.6097323", "0.609119", "0.6077096", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.60657287", "0.605383", "0.60223824", "0.6010532", "0.6010532", "0.600802", "0.5996654", "0.5987994", "0.5987994", "0.5987994", "0.5987994", "0.5987994", "0.5972122", "0.5950463", "0.5929831", "0.5928889", "0.59180427", "0.59020984", "0.5897282", "0.589528", "0.5892568", "0.5855115", "0.5853071", "0.5853071", "0.58529663", "0.5848157", "0.58434176", "0.5838795", "0.5832858", "0.5824928", "0.58143187", "0.58143187", "0.58143187", "0.57995135", "0.57920694", "0.57827055", "0.57634515", "0.57518494", "0.57435244", "0.5741935", "0.57414496", "0.5737626", "0.57275474", "0.572538", "0.572366", "0.5718399", "0.5712028", "0.57094455", "0.5707663", "0.5702323", "0.57019734", "0.56877583", "0.5683615", "0.56768376", "0.5676671", "0.56740946", "0.56726605", "0.5670024", "0.5661865", "0.566147", "0.56594145", "0.56543064", "0.56543064", "0.5651394", "0.56484985", "0.56484985", "0.5646807", "0.5643743", "0.5640673", "0.5640212", "0.5640212", "0.56311524", "0.5624529", "0.5622499", "0.5619785", "0.5619452", "0.5619452" ]
0.0
-1
Timestamp; when payment request created required uint64 time = 3;
@java.lang.Override public long getTime() { return instance.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigInteger getResponse_time();", "com.google.protobuf.Timestamp getSubmitTime();", "com.google.protobuf.Timestamp getSendTime();", "public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}", "double getClientTime();", "long getCreateTime();", "long getCreateTime();", "Long timestamp();", "public int getTime() { return _time; }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "long getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "int getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "int getCreateTime();", "com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder();", "@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}", "com.google.protobuf.ByteString getSignedTimeStamp();", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public abstract long now();", "com.google.protobuf.Timestamp getCurrentStateTime();", "long getRetrievedTime();", "com.google.protobuf.ByteString\n getTimeBytes();", "public Date getPayTime() {\n return payTime;\n }", "public Date getPayTime() {\n return payTime;\n }", "OffsetDateTime creationTime();", "public long getSentTime();", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();", "public long getTimeStamp() {return timeStamp;}", "long getTimeStamp();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "public Date getRequesttime() {\n return requesttime;\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "public long getTimestamp() {\n return timestamp_;\n }", "com.google.protobuf.StringValue getTransactionDateTime();", "public Timestamp() {\n makeNow();\n }", "public Long getCreatetime() {\n return createtime;\n }", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "@ApiModelProperty(example = \"1518811817\", value = \"The transaction time in seconds since epoch.\")\n public Long getTransactionTime() {\n return transactionTime;\n }", "public double getTime() {return _time;}", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantity\r\n \t\r\n \tmillis = (timeStamp >> 16) & 0x00000000ffffffffL; // this is a 32 bit quantity\r\n \t\r\n \tmicros = timeStamp & 0x0000ffffL; // this is a 16 bit quantity\r\n \t \r\n }", "public String getReqTime() {\n return reqTime;\n }", "com.google.protobuf.Timestamp getVotingStartTime();", "public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }", "UtcT time_stamp () throws BaseException;", "public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTime(){\n return this.time;\n }", "@Override\n public long getTime() {\n return time;\n }", "public Date getTimeCreate() {\n return timeCreate;\n }", "public int getTimeStamp() {\n return timeStamp;\n }", "com.google.protobuf.Timestamp getTimestamp();", "OffsetDateTime timeCreated();", "@ApiModelProperty(value = \"The timestamp that the `last_price` represents.\")\n public OffsetDateTime getTime() {\n return time;\n }", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public long getCreateTime() {\n return createTime_;\n }", "public void setRequesttime(Date requesttime) {\n this.requesttime = requesttime;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();", "public int getCreateTime() {\n return createTime_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }" ]
[ "0.6862211", "0.6237775", "0.62266433", "0.61695325", "0.60990685", "0.60972226", "0.60972226", "0.60893995", "0.6078815", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.6055824", "0.6020825", "0.60091877", "0.60091877", "0.60067695", "0.59987754", "0.59873265", "0.59873265", "0.59873265", "0.59873265", "0.59873265", "0.59723383", "0.595153", "0.5931082", "0.5928206", "0.5916059", "0.5901096", "0.58967894", "0.5895911", "0.58947", "0.58563536", "0.5855777", "0.5855777", "0.5852643", "0.5849752", "0.58449316", "0.58393747", "0.5831907", "0.58238155", "0.5813723", "0.5813723", "0.5813723", "0.5801328", "0.57940394", "0.5783561", "0.5763269", "0.5751006", "0.5742821", "0.5742055", "0.5741806", "0.57363063", "0.5728784", "0.57270056", "0.5723633", "0.5720142", "0.57121485", "0.5709514", "0.57070845", "0.57020074", "0.57012177", "0.5686845", "0.5684942", "0.5678584", "0.5677381", "0.5673478", "0.56714153", "0.56699455", "0.56632763", "0.5660532", "0.5658431", "0.56533337", "0.56533337", "0.5650431", "0.5647556", "0.5647556", "0.5645724", "0.5643661", "0.5642724", "0.5639663", "0.5639663", "0.5631543", "0.56246406", "0.56216794", "0.5618763", "0.5618494", "0.5618494" ]
0.0
-1
Timestamp; when payment request created required uint64 time = 3;
public Builder setTime(long value) { copyOnWrite(); instance.setTime(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigInteger getResponse_time();", "com.google.protobuf.Timestamp getSubmitTime();", "com.google.protobuf.Timestamp getSendTime();", "public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}", "double getClientTime();", "long getCreateTime();", "long getCreateTime();", "Long timestamp();", "public int getTime() { return _time; }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "long getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "int getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "int getCreateTime();", "com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder();", "@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}", "com.google.protobuf.ByteString getSignedTimeStamp();", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public abstract long now();", "com.google.protobuf.Timestamp getCurrentStateTime();", "long getRetrievedTime();", "com.google.protobuf.ByteString\n getTimeBytes();", "public Date getPayTime() {\n return payTime;\n }", "public Date getPayTime() {\n return payTime;\n }", "OffsetDateTime creationTime();", "public long getSentTime();", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();", "public long getTimeStamp() {return timeStamp;}", "long getTimeStamp();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "public Date getRequesttime() {\n return requesttime;\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "public long getTimestamp() {\n return timestamp_;\n }", "com.google.protobuf.StringValue getTransactionDateTime();", "public Timestamp() {\n makeNow();\n }", "public Long getCreatetime() {\n return createtime;\n }", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "@ApiModelProperty(example = \"1518811817\", value = \"The transaction time in seconds since epoch.\")\n public Long getTransactionTime() {\n return transactionTime;\n }", "public double getTime() {return _time;}", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantity\r\n \t\r\n \tmillis = (timeStamp >> 16) & 0x00000000ffffffffL; // this is a 32 bit quantity\r\n \t\r\n \tmicros = timeStamp & 0x0000ffffL; // this is a 16 bit quantity\r\n \t \r\n }", "public String getReqTime() {\n return reqTime;\n }", "com.google.protobuf.Timestamp getVotingStartTime();", "public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }", "UtcT time_stamp () throws BaseException;", "public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTime(){\n return this.time;\n }", "@Override\n public long getTime() {\n return time;\n }", "public Date getTimeCreate() {\n return timeCreate;\n }", "public int getTimeStamp() {\n return timeStamp;\n }", "com.google.protobuf.Timestamp getTimestamp();", "OffsetDateTime timeCreated();", "@ApiModelProperty(value = \"The timestamp that the `last_price` represents.\")\n public OffsetDateTime getTime() {\n return time;\n }", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public long getCreateTime() {\n return createTime_;\n }", "public void setRequesttime(Date requesttime) {\n this.requesttime = requesttime;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();", "public int getCreateTime() {\n return createTime_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }" ]
[ "0.6862211", "0.6237775", "0.62266433", "0.61695325", "0.60990685", "0.60972226", "0.60972226", "0.60893995", "0.6078815", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.60642344", "0.6055824", "0.6020825", "0.60091877", "0.60091877", "0.60067695", "0.59987754", "0.59873265", "0.59873265", "0.59873265", "0.59873265", "0.59873265", "0.59723383", "0.595153", "0.5931082", "0.5928206", "0.5916059", "0.5901096", "0.58967894", "0.5895911", "0.58947", "0.58563536", "0.5855777", "0.5855777", "0.5852643", "0.5849752", "0.58449316", "0.58393747", "0.5831907", "0.58238155", "0.5813723", "0.5813723", "0.5813723", "0.5801328", "0.57940394", "0.5783561", "0.5763269", "0.5751006", "0.5742821", "0.5742055", "0.5741806", "0.57363063", "0.5728784", "0.57270056", "0.5723633", "0.5720142", "0.57121485", "0.5709514", "0.57070845", "0.57020074", "0.57012177", "0.5686845", "0.5684942", "0.5678584", "0.5677381", "0.5673478", "0.56714153", "0.56699455", "0.56632763", "0.5660532", "0.5658431", "0.56533337", "0.56533337", "0.5650431", "0.5647556", "0.5647556", "0.5645724", "0.5643661", "0.5642724", "0.5639663", "0.5639663", "0.5631543", "0.56246406", "0.56216794", "0.5618763", "0.5618494", "0.5618494" ]
0.0
-1
Timestamp; when payment request created required uint64 time = 3;
public Builder clearTime() { copyOnWrite(); instance.clearTime(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigInteger getResponse_time();", "com.google.protobuf.Timestamp getSubmitTime();", "com.google.protobuf.Timestamp getSendTime();", "public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}", "double getClientTime();", "long getCreateTime();", "long getCreateTime();", "Long timestamp();", "public int getTime() { return _time; }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "long getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "int getTimestamp();", "public long getRequestTime() {\n return requestTime_;\n }", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "com.google.protobuf.Timestamp getCreateTime();", "int getCreateTime();", "com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder();", "com.google.protobuf.ByteString getSignedTimeStamp();", "@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public abstract long now();", "com.google.protobuf.Timestamp getCurrentStateTime();", "long getRetrievedTime();", "com.google.protobuf.ByteString\n getTimeBytes();", "public Date getPayTime() {\n return payTime;\n }", "public Date getPayTime() {\n return payTime;\n }", "OffsetDateTime creationTime();", "public long getSentTime();", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();", "public long getTimeStamp() {return timeStamp;}", "long getTimeStamp();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();", "public Date getRequesttime() {\n return requesttime;\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "public long getTimestamp() {\n return timestamp_;\n }", "public Timestamp() {\n makeNow();\n }", "public Long getCreatetime() {\n return createtime;\n }", "com.google.protobuf.StringValue getTransactionDateTime();", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "@ApiModelProperty(example = \"1518811817\", value = \"The transaction time in seconds since epoch.\")\n public Long getTransactionTime() {\n return transactionTime;\n }", "public double getTime() {return _time;}", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantity\r\n \t\r\n \tmillis = (timeStamp >> 16) & 0x00000000ffffffffL; // this is a 32 bit quantity\r\n \t\r\n \tmicros = timeStamp & 0x0000ffffL; // this is a 16 bit quantity\r\n \t \r\n }", "public String getReqTime() {\n return reqTime;\n }", "com.google.protobuf.Timestamp getVotingStartTime();", "public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }", "UtcT time_stamp () throws BaseException;", "public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTime(){\n return this.time;\n }", "@Override\n public long getTime() {\n return time;\n }", "public Date getTimeCreate() {\n return timeCreate;\n }", "public int getTimeStamp() {\n return timeStamp;\n }", "com.google.protobuf.Timestamp getTimestamp();", "OffsetDateTime timeCreated();", "@ApiModelProperty(value = \"The timestamp that the `last_price` represents.\")\n public OffsetDateTime getTime() {\n return time;\n }", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public long getCreateTime() {\n return createTime_;\n }", "public void setRequesttime(Date requesttime) {\n this.requesttime = requesttime;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "com.google.protobuf.TimestampOrBuilder getCurrentStateTimeOrBuilder();", "public int getCreateTime() {\n return createTime_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}" ]
[ "0.68621355", "0.6238935", "0.6227435", "0.6166707", "0.60987115", "0.60976493", "0.60976493", "0.6091248", "0.60792816", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.6065717", "0.60551953", "0.6022326", "0.6010585", "0.6010585", "0.60080326", "0.59980756", "0.59886926", "0.59886926", "0.59886926", "0.59886926", "0.59886926", "0.5972562", "0.59528756", "0.5929773", "0.59295505", "0.5917816", "0.59023833", "0.5896914", "0.58961976", "0.5893963", "0.5858191", "0.58535326", "0.58535326", "0.5852875", "0.58494747", "0.58441234", "0.5841095", "0.5833209", "0.582495", "0.5815562", "0.5815562", "0.5815562", "0.5800886", "0.57941383", "0.5781144", "0.57634455", "0.57520866", "0.57430893", "0.5742395", "0.57414854", "0.57376987", "0.57293177", "0.5727403", "0.57253665", "0.5719494", "0.5712719", "0.5709133", "0.57079434", "0.570333", "0.5702178", "0.5687681", "0.5686048", "0.56789744", "0.56773245", "0.5674543", "0.5673336", "0.56699896", "0.566345", "0.5662425", "0.5659543", "0.5654421", "0.5654421", "0.56515753", "0.56486255", "0.56486255", "0.5647216", "0.5643947", "0.5642213", "0.56404", "0.56404", "0.5632287", "0.5624811", "0.5622702", "0.56196266", "0.56196266", "0.5619617" ]
0.0
-1
Timestamp; when this request should be considered invalid optional uint64 expires = 4;
@java.lang.Override public boolean hasExpires() { return instance.hasExpires(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getExpiration()\n {\n return null;\n }", "long getExpiration();", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "@java.lang.Override\n public boolean hasExpires() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "long getExpires();", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public long getExpiration() {\n return expiration;\n }", "long getExpirationDate();", "public String getExpiration() {\n return this.expiration;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public final int getExpiresAfter() {\n return 0;\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "private void clearExpires() {\n bitField0_ = (bitField0_ & ~0x00000004);\n expires_ = 0L;\n }", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "Optional<Instant> getTokenInvalidationTimestamp();", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "public long getExpires() {\n return expires;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public int getExpiry();", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public String getExpirationDate() { return date; }", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public abstract Date getExpirationDate();", "public long getExpiresIn() {\n return expiresIn;\n }", "int getExpireTimeout();", "public void setExpirationDate(java.util.Date value);", "public long getExpirationDate() {\n return expirationDate_;\n }", "boolean expired();", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "Duration getTokenExpiredIn();", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "boolean hasExpires();", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "Date getExpiredDate();", "public int getExpiryTime() {\n return expiryTime;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "String getSpecifiedExpiry();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@Override\n\tpublic boolean isExpired();", "public Integer getExpiry() {\n return expiry;\n }", "boolean isExpire(long currentTime);", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "com.google.type.Date getExpireDate();", "boolean hasExpirationDate();", "public int getExpiry()\n {\n return expiry;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public Timestamp getExpirationTime() {\n\t\treturn m_ExpirationTime;\n\t}", "boolean isExpired();", "String getExpiry();", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "public abstract void expire();", "LocalDateTime getExpiration(K key);", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "void setExpired(boolean expired);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "boolean hasExpired();", "public String getExpiresString() {\n return expiresString;\n }", "void setExpiredDate(Date expiredDate);", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setValidFrom (Timestamp ValidFrom);", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "public long getExpiry() {\n return this.expiry;\n }", "@POST // This has to be POST because we can't allow caching.\n @Path(\"fresh-timestamp\")\n @Produces(MediaType.APPLICATION_JSON)\n long getFreshTimestamp();", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "com.google.type.DateOrBuilder getExpireDateOrBuilder();", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }" ]
[ "0.6788627", "0.6661481", "0.66046935", "0.65864384", "0.6493445", "0.6327424", "0.63271296", "0.6318222", "0.6315905", "0.6312126", "0.62920886", "0.6289404", "0.62868315", "0.6270749", "0.6267154", "0.6253964", "0.62253785", "0.62227017", "0.622246", "0.6192909", "0.6186196", "0.6180339", "0.6105386", "0.60798615", "0.6078666", "0.6075323", "0.606998", "0.6060023", "0.60581714", "0.60547787", "0.60218984", "0.5993948", "0.5958133", "0.5955726", "0.5947197", "0.59373873", "0.59297335", "0.59217393", "0.59045374", "0.5882542", "0.58709097", "0.58708084", "0.58706236", "0.58663917", "0.58492494", "0.5842976", "0.5842176", "0.58419704", "0.5813309", "0.5806817", "0.5800702", "0.5793005", "0.5793005", "0.5782796", "0.57328314", "0.5728184", "0.5725684", "0.571855", "0.5705634", "0.5700585", "0.5691912", "0.5690371", "0.56885076", "0.56851876", "0.56621885", "0.5654571", "0.56507546", "0.5628789", "0.5605496", "0.5602789", "0.5602621", "0.55877316", "0.55587345", "0.5556917", "0.55557823", "0.5554448", "0.5547867", "0.55476046", "0.5525912", "0.5521566", "0.55048597", "0.5493409", "0.5493243", "0.5491472", "0.54884356", "0.5481067", "0.5481067", "0.5481067", "0.54797536", "0.5477829", "0.54766953", "0.547366", "0.547366", "0.547366", "0.5459814", "0.5453333", "0.5446854", "0.54468167", "0.54463214", "0.544595" ]
0.5801017
50
Timestamp; when this request should be considered invalid optional uint64 expires = 4;
@java.lang.Override public long getExpires() { return instance.getExpires(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getExpiration()\n {\n return null;\n }", "long getExpiration();", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "@java.lang.Override\n public boolean hasExpires() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "long getExpires();", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public long getExpiration() {\n return expiration;\n }", "long getExpirationDate();", "public String getExpiration() {\n return this.expiration;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public final int getExpiresAfter() {\n return 0;\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "private void clearExpires() {\n bitField0_ = (bitField0_ & ~0x00000004);\n expires_ = 0L;\n }", "Optional<Instant> getTokenInvalidationTimestamp();", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "public long getExpires() {\n return expires;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public int getExpiry();", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public String getExpirationDate() { return date; }", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public abstract Date getExpirationDate();", "public long getExpiresIn() {\n return expiresIn;\n }", "int getExpireTimeout();", "public long getExpirationDate() {\n return expirationDate_;\n }", "public void setExpirationDate(java.util.Date value);", "boolean expired();", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "Duration getTokenExpiredIn();", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "boolean hasExpires();", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "Date getExpiredDate();", "@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "String getSpecifiedExpiry();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@Override\n\tpublic boolean isExpired();", "public Integer getExpiry() {\n return expiry;\n }", "boolean isExpire(long currentTime);", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "com.google.type.Date getExpireDate();", "boolean hasExpirationDate();", "public int getExpiry()\n {\n return expiry;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public Timestamp getExpirationTime() {\n\t\treturn m_ExpirationTime;\n\t}", "boolean isExpired();", "String getExpiry();", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "public abstract void expire();", "LocalDateTime getExpiration(K key);", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "void setExpired(boolean expired);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "boolean hasExpired();", "public String getExpiresString() {\n return expiresString;\n }", "void setExpiredDate(Date expiredDate);", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setValidFrom (Timestamp ValidFrom);", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "public long getExpiry() {\n return this.expiry;\n }", "@POST // This has to be POST because we can't allow caching.\n @Path(\"fresh-timestamp\")\n @Produces(MediaType.APPLICATION_JSON)\n long getFreshTimestamp();", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "com.google.type.DateOrBuilder getExpireDateOrBuilder();", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }" ]
[ "0.67891645", "0.6661163", "0.6604924", "0.6585613", "0.64927673", "0.6327019", "0.63266224", "0.6318093", "0.63153076", "0.6312198", "0.62918454", "0.6289637", "0.6287186", "0.6269921", "0.6266631", "0.6253344", "0.6225573", "0.6223293", "0.62220085", "0.61937714", "0.6186028", "0.6180702", "0.6105541", "0.6079694", "0.607779", "0.60748327", "0.60693604", "0.6060228", "0.60583794", "0.6054405", "0.5993803", "0.59582806", "0.5955711", "0.59472936", "0.593714", "0.59292954", "0.59222", "0.59040695", "0.58810174", "0.5870944", "0.58709115", "0.5869898", "0.58656526", "0.58497584", "0.58429974", "0.58422744", "0.58405966", "0.5813628", "0.58075476", "0.5800359", "0.58001846", "0.5793103", "0.5793103", "0.57837594", "0.5732576", "0.57283264", "0.5725662", "0.57177544", "0.57051307", "0.56999654", "0.5691832", "0.5690619", "0.5688353", "0.56848294", "0.56613135", "0.56538945", "0.5651055", "0.5628068", "0.5605366", "0.5604357", "0.56020296", "0.55884665", "0.5559097", "0.5557003", "0.5555417", "0.55542403", "0.55484504", "0.55483603", "0.5525661", "0.5520896", "0.5504602", "0.54941607", "0.5493886", "0.54929686", "0.54889673", "0.54814184", "0.54814184", "0.54814184", "0.54792184", "0.54785866", "0.5475769", "0.5473924", "0.5473924", "0.5473924", "0.5459525", "0.545227", "0.54469967", "0.5446708", "0.54461086", "0.54458845" ]
0.6021499
30
Timestamp; when this request should be considered invalid optional uint64 expires = 4;
public Builder setExpires(long value) { copyOnWrite(); instance.setExpires(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getExpiration()\n {\n return null;\n }", "long getExpiration();", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "@java.lang.Override\n public boolean hasExpires() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "long getExpires();", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public long getExpiration() {\n return expiration;\n }", "long getExpirationDate();", "public String getExpiration() {\n return this.expiration;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public final int getExpiresAfter() {\n return 0;\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "private void clearExpires() {\n bitField0_ = (bitField0_ & ~0x00000004);\n expires_ = 0L;\n }", "Optional<Instant> getTokenInvalidationTimestamp();", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "public long getExpires() {\n return expires;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public int getExpiry();", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public String getExpirationDate() { return date; }", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public abstract Date getExpirationDate();", "public long getExpiresIn() {\n return expiresIn;\n }", "int getExpireTimeout();", "public long getExpirationDate() {\n return expirationDate_;\n }", "public void setExpirationDate(java.util.Date value);", "boolean expired();", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "Duration getTokenExpiredIn();", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "boolean hasExpires();", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "Date getExpiredDate();", "@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "String getSpecifiedExpiry();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@Override\n\tpublic boolean isExpired();", "public Integer getExpiry() {\n return expiry;\n }", "boolean isExpire(long currentTime);", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "com.google.type.Date getExpireDate();", "boolean hasExpirationDate();", "public int getExpiry()\n {\n return expiry;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public Timestamp getExpirationTime() {\n\t\treturn m_ExpirationTime;\n\t}", "boolean isExpired();", "String getExpiry();", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "public abstract void expire();", "LocalDateTime getExpiration(K key);", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "void setExpired(boolean expired);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "boolean hasExpired();", "public String getExpiresString() {\n return expiresString;\n }", "void setExpiredDate(Date expiredDate);", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setValidFrom (Timestamp ValidFrom);", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "public long getExpiry() {\n return this.expiry;\n }", "@POST // This has to be POST because we can't allow caching.\n @Path(\"fresh-timestamp\")\n @Produces(MediaType.APPLICATION_JSON)\n long getFreshTimestamp();", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "com.google.type.DateOrBuilder getExpireDateOrBuilder();", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }" ]
[ "0.67891645", "0.6661163", "0.6604924", "0.6585613", "0.64927673", "0.6327019", "0.63266224", "0.6318093", "0.63153076", "0.6312198", "0.62918454", "0.6289637", "0.6287186", "0.6269921", "0.6266631", "0.6253344", "0.6225573", "0.6223293", "0.62220085", "0.61937714", "0.6186028", "0.6180702", "0.6105541", "0.6079694", "0.607779", "0.60748327", "0.60693604", "0.6060228", "0.60583794", "0.6054405", "0.6021499", "0.5993803", "0.59582806", "0.5955711", "0.59472936", "0.593714", "0.59292954", "0.59222", "0.59040695", "0.58810174", "0.5870944", "0.58709115", "0.5869898", "0.58656526", "0.58497584", "0.58429974", "0.58422744", "0.58405966", "0.5813628", "0.58075476", "0.5800359", "0.58001846", "0.5793103", "0.5793103", "0.57837594", "0.5732576", "0.57283264", "0.5725662", "0.57177544", "0.57051307", "0.56999654", "0.5691832", "0.5690619", "0.5688353", "0.56848294", "0.56613135", "0.56538945", "0.5651055", "0.5628068", "0.5605366", "0.5604357", "0.56020296", "0.55884665", "0.5559097", "0.5557003", "0.5555417", "0.55542403", "0.55484504", "0.55483603", "0.5525661", "0.5520896", "0.5504602", "0.54941607", "0.5493886", "0.54929686", "0.54889673", "0.54814184", "0.54814184", "0.54814184", "0.54792184", "0.54785866", "0.5475769", "0.5473924", "0.5473924", "0.5473924", "0.5459525", "0.545227", "0.54469967", "0.5446708", "0.54461086", "0.54458845" ]
0.0
-1
Timestamp; when this request should be considered invalid optional uint64 expires = 4;
public Builder clearExpires() { copyOnWrite(); instance.clearExpires(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getExpiration()\n {\n return null;\n }", "long getExpiration();", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "@java.lang.Override\n public boolean hasExpires() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "long getExpires();", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public long getExpiration() {\n return expiration;\n }", "long getExpirationDate();", "public String getExpiration() {\n return this.expiration;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public final int getExpiresAfter() {\n return 0;\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "Optional<Instant> getTokenInvalidationTimestamp();", "private void clearExpires() {\n bitField0_ = (bitField0_ & ~0x00000004);\n expires_ = 0L;\n }", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "public long getExpires() {\n return expires;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public int getExpiry();", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public String getExpirationDate() { return date; }", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public abstract Date getExpirationDate();", "public long getExpiresIn() {\n return expiresIn;\n }", "int getExpireTimeout();", "public long getExpirationDate() {\n return expirationDate_;\n }", "public void setExpirationDate(java.util.Date value);", "boolean expired();", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "Duration getTokenExpiredIn();", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "boolean hasExpires();", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "Date getExpiredDate();", "public int getExpiryTime() {\n return expiryTime;\n }", "@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "String getSpecifiedExpiry();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@Override\n\tpublic boolean isExpired();", "public Integer getExpiry() {\n return expiry;\n }", "boolean isExpire(long currentTime);", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "com.google.type.Date getExpireDate();", "boolean hasExpirationDate();", "public int getExpiry()\n {\n return expiry;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public Timestamp getExpirationTime() {\n\t\treturn m_ExpirationTime;\n\t}", "boolean isExpired();", "String getExpiry();", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "public abstract void expire();", "LocalDateTime getExpiration(K key);", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "void setExpired(boolean expired);", "WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "boolean hasExpired();", "public String getExpiresString() {\n return expiresString;\n }", "public void setValidFrom (Timestamp ValidFrom);", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "void setExpiredDate(Date expiredDate);", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "public long getExpiry() {\n return this.expiry;\n }", "@POST // This has to be POST because we can't allow caching.\n @Path(\"fresh-timestamp\")\n @Produces(MediaType.APPLICATION_JSON)\n long getFreshTimestamp();", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "com.google.type.DateOrBuilder getExpireDateOrBuilder();", "public Date getExpiryDate() {\n return expiryDate;\n }", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }" ]
[ "0.67888796", "0.6660935", "0.6604238", "0.6585184", "0.6491881", "0.6327738", "0.6325142", "0.6318848", "0.63155055", "0.63121146", "0.62917465", "0.62906796", "0.62862295", "0.6268857", "0.6265079", "0.6250846", "0.62256515", "0.62234604", "0.6220691", "0.6192885", "0.6184491", "0.61802197", "0.610452", "0.60800624", "0.60764253", "0.60743946", "0.6069193", "0.6060343", "0.6058096", "0.6053689", "0.60207665", "0.59941727", "0.5958436", "0.59559447", "0.5947202", "0.5935662", "0.5927573", "0.59223235", "0.5902536", "0.5880625", "0.5870857", "0.5870229", "0.58690894", "0.5865719", "0.5848275", "0.5842838", "0.5842367", "0.58393204", "0.58148474", "0.5806569", "0.58002114", "0.5799766", "0.57928926", "0.57928926", "0.5783749", "0.5732889", "0.5728634", "0.57239485", "0.5717031", "0.5704987", "0.5699709", "0.5692588", "0.5690084", "0.5688334", "0.56848776", "0.5661313", "0.5652633", "0.5651939", "0.5627152", "0.56053185", "0.56044966", "0.5600554", "0.55874896", "0.55580676", "0.5557376", "0.5554771", "0.5554294", "0.5547755", "0.55474097", "0.552594", "0.552", "0.55027264", "0.54956883", "0.54927766", "0.5492582", "0.54870427", "0.5480368", "0.5480368", "0.5480368", "0.54797655", "0.5479616", "0.54761255", "0.5473093", "0.5473093", "0.5473093", "0.5457765", "0.5455877", "0.54472816", "0.54468054", "0.54463613", "0.5445564" ]
0.0
-1
Humanreadable description of request for the customer optional string memo = 5;
@java.lang.Override public boolean hasMemo() { return instance.hasMemo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.65865", "0.658507", "0.658507", "0.658507", "0.6577861", "0.653355", "0.653355", "0.653355", "0.64929634", "0.64929634", "0.64929634", "0.64929634", "0.648964", "0.6464222", "0.6464222", "0.6440324", "0.64222246", "0.6396784", "0.63684195", "0.6272917", "0.6272917", "0.6272917", "0.6256268", "0.6256268", "0.6256268", "0.6236819", "0.60859114", "0.6079752", "0.59998107", "0.5987238", "0.59131885", "0.5639944", "0.5617711", "0.5585964", "0.55804974", "0.55547714", "0.55547714", "0.55547714", "0.5520759", "0.55065817", "0.55065817", "0.5473957", "0.5470309", "0.54514706", "0.54514706", "0.54514706", "0.5442251", "0.54305327", "0.5397151", "0.5397151", "0.5397151", "0.5361073", "0.5361073", "0.53529084", "0.53402793", "0.53380066", "0.5308963", "0.52909654", "0.52850205", "0.5284808", "0.52669215", "0.52596784", "0.5237631", "0.5232156", "0.52315414", "0.5222122", "0.5205467", "0.5204606", "0.5201995", "0.5199962", "0.5197599", "0.51898986", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.51852596", "0.5179427", "0.5179427", "0.5177919", "0.5154738", "0.5154418", "0.5152747", "0.51511395", "0.5150504", "0.5150504", "0.5149239", "0.51479316", "0.5141566", "0.51373047", "0.5136115", "0.51293695", "0.512891", "0.51220965", "0.5105976", "0.5105976" ]
0.0
-1
Humanreadable description of request for the customer optional string memo = 5;
@java.lang.Override public java.lang.String getMemo() { return instance.getMemo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6589688", "0.65882015", "0.65882015", "0.65882015", "0.65787244", "0.6533798", "0.6533798", "0.6533798", "0.649377", "0.649377", "0.649377", "0.649377", "0.6492644", "0.6467307", "0.6467307", "0.6442704", "0.64249337", "0.6399231", "0.63713586", "0.62734056", "0.62734056", "0.62734056", "0.6257111", "0.6257111", "0.6257111", "0.623714", "0.60872567", "0.6080106", "0.5998886", "0.59859514", "0.5911038", "0.56384254", "0.56148666", "0.55833757", "0.5577589", "0.55166066", "0.55089164", "0.55089164", "0.5472554", "0.5471978", "0.5452934", "0.5452934", "0.5452934", "0.543881", "0.54271096", "0.53990626", "0.53990626", "0.53990626", "0.53582954", "0.53582954", "0.53505033", "0.5338061", "0.5334982", "0.53077877", "0.5287249", "0.5282244", "0.52816576", "0.52635056", "0.5259121", "0.52349955", "0.523448", "0.5228283", "0.5219462", "0.5202442", "0.5201326", "0.51996744", "0.51976967", "0.5195055", "0.5188149", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5181771", "0.5177549", "0.51762354", "0.51762354", "0.515185", "0.51518124", "0.5149906", "0.5148208", "0.51467", "0.51464355", "0.51464355", "0.5146117", "0.5138839", "0.5132555", "0.51322776", "0.51261646", "0.51259005", "0.5125217", "0.51092106", "0.51092106" ]
0.555418
36
Humanreadable description of request for the customer optional string memo = 5;
@java.lang.Override public com.google.protobuf.ByteString getMemoBytes() { return instance.getMemoBytes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6589688", "0.65882015", "0.65882015", "0.65882015", "0.65787244", "0.6533798", "0.6533798", "0.6533798", "0.649377", "0.649377", "0.649377", "0.649377", "0.6492644", "0.6467307", "0.6467307", "0.6442704", "0.64249337", "0.6399231", "0.63713586", "0.62734056", "0.62734056", "0.62734056", "0.6257111", "0.6257111", "0.6257111", "0.623714", "0.60872567", "0.6080106", "0.5998886", "0.59859514", "0.5911038", "0.56384254", "0.56148666", "0.55833757", "0.5577589", "0.555418", "0.555418", "0.555418", "0.55166066", "0.55089164", "0.55089164", "0.5472554", "0.5471978", "0.5452934", "0.5452934", "0.5452934", "0.543881", "0.54271096", "0.53990626", "0.53990626", "0.53990626", "0.53582954", "0.53582954", "0.53505033", "0.5338061", "0.5334982", "0.53077877", "0.5287249", "0.5282244", "0.52816576", "0.52635056", "0.5259121", "0.52349955", "0.523448", "0.5228283", "0.5219462", "0.5202442", "0.5201326", "0.51996744", "0.51976967", "0.5195055", "0.5188149", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5181771", "0.5177549", "0.51762354", "0.51762354", "0.515185", "0.51518124", "0.5149906", "0.5148208", "0.51467", "0.51464355", "0.51464355", "0.5146117", "0.5138839", "0.5132555", "0.51322776", "0.51261646", "0.51259005", "0.5125217", "0.51092106", "0.51092106" ]
0.0
-1
Humanreadable description of request for the customer optional string memo = 5;
public Builder setMemo( java.lang.String value) { copyOnWrite(); instance.setMemo(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6585906", "0.65844226", "0.65844226", "0.65844226", "0.6577161", "0.6533293", "0.6533293", "0.6533293", "0.6492224", "0.6492224", "0.6492224", "0.6492224", "0.6489006", "0.6463484", "0.6463484", "0.6439395", "0.6421381", "0.63958514", "0.6367693", "0.6272251", "0.6272251", "0.6272251", "0.6255467", "0.6255467", "0.6255467", "0.62359333", "0.6085406", "0.60789454", "0.5999008", "0.5986913", "0.5912662", "0.5639692", "0.56175077", "0.5584724", "0.5580113", "0.55542064", "0.55542064", "0.55542064", "0.5519726", "0.55074316", "0.55074316", "0.54742396", "0.54711825", "0.5450919", "0.5450919", "0.5450919", "0.5440557", "0.5429505", "0.5360305", "0.5360305", "0.53522104", "0.53393465", "0.53373915", "0.5308891", "0.5289372", "0.5285602", "0.52843356", "0.5265737", "0.52620643", "0.52371997", "0.52319235", "0.5230502", "0.5220521", "0.52048594", "0.520371", "0.5201008", "0.5200531", "0.51975304", "0.5188884", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5186433", "0.5185775", "0.5179849", "0.5179849", "0.51766956", "0.5154039", "0.51538134", "0.51504993", "0.5149471", "0.5149471", "0.5149323", "0.51492393", "0.5149173", "0.5139369", "0.51362336", "0.513503", "0.5129426", "0.512833", "0.5123045", "0.5106914", "0.5106914" ]
0.5397781
50
Humanreadable description of request for the customer optional string memo = 5;
public Builder clearMemo() { copyOnWrite(); instance.clearMemo(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.65865", "0.658507", "0.658507", "0.658507", "0.6577861", "0.653355", "0.653355", "0.653355", "0.64929634", "0.64929634", "0.64929634", "0.64929634", "0.648964", "0.6464222", "0.6464222", "0.6440324", "0.64222246", "0.6396784", "0.63684195", "0.6272917", "0.6272917", "0.6272917", "0.6256268", "0.6256268", "0.6256268", "0.6236819", "0.60859114", "0.6079752", "0.59998107", "0.5987238", "0.59131885", "0.5639944", "0.5617711", "0.5585964", "0.55804974", "0.55547714", "0.55547714", "0.55547714", "0.5520759", "0.55065817", "0.55065817", "0.5473957", "0.5470309", "0.54514706", "0.54514706", "0.54514706", "0.5442251", "0.54305327", "0.5397151", "0.5397151", "0.5397151", "0.5361073", "0.5361073", "0.53529084", "0.53402793", "0.53380066", "0.5308963", "0.52909654", "0.52850205", "0.5284808", "0.52669215", "0.52596784", "0.5237631", "0.5232156", "0.52315414", "0.5222122", "0.5205467", "0.5204606", "0.5201995", "0.5199962", "0.5197599", "0.51898986", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.5186328", "0.51852596", "0.5179427", "0.5179427", "0.5177919", "0.5154738", "0.5154418", "0.5152747", "0.51511395", "0.5150504", "0.5150504", "0.5149239", "0.51479316", "0.5141566", "0.51373047", "0.5136115", "0.51293695", "0.512891", "0.51220965", "0.5105976", "0.5105976" ]
0.0
-1
Humanreadable description of request for the customer optional string memo = 5;
public Builder setMemoBytes( com.google.protobuf.ByteString value) { copyOnWrite(); instance.setMemoBytes(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public void setMemo(String memo) {\n this.memo = memo;\n }", "public String getMemo() {\n return memo;\n }", "java.lang.String getMemo();", "java.lang.String getMemo();", "java.lang.String getMemo();", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public String getMemo() {\n return memo;\n }", "public void setMemo(java.lang.String memo) {\r\n this.memo = memo;\r\n }", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo;\n\t}", "public void setMemo(String memo) {\n this.memo = memo == null ? null : memo.trim();\n }", "public void setMemo(String memo) {\n\t\tMEMO = memo;\n\t}", "public void setMemo(String memo) {\n\t\tthis.memo = memo == null ? null : memo.trim();\n\t}", "public void setMemo (java.lang.String memo) {\r\n\t\tthis.memo = memo;\r\n\t}", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return memo_;\n }", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public String getMemo() {\n\t\treturn memo;\n\t}", "public java.lang.String getMemo() {\r\n return memo;\r\n }", "public void setSMemo(String sMemo) {\n this.sMemo = sMemo;\n }", "public java.lang.String getMemo () {\r\n\t\treturn memo;\r\n\t}", "public String getSMemo() {\n return sMemo;\n }", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }", "@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "@java.lang.Override\n public java.lang.String getMemo() {\n return instance.getMemo();\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n memo_ = value;\n }", "private void setMemo(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n memo_ = value;\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getMemoBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(memo_);\n }", "String getRemark();", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "public Builder setMemo(\n java.lang.String value) {\n copyOnWrite();\n instance.setMemo(value);\n return this;\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private String createOrderSummary(String userName, int price, boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows){\n String priceMessage = \"Name: \" + userName;\n priceMessage = priceMessage + \"\\nAdd Marshmallows? \" + addMarshmallows;\n priceMessage = priceMessage + \"\\nAdd Cinnamon? \" + addCinnamon;\n priceMessage = priceMessage + \"\\nAdd Whipped Cream? \" + addWhippedCream;\n priceMessage = priceMessage + \"\\nAdd Chocolate? \" + addChocolate;\n priceMessage = priceMessage + \"\\nQuantity: \" + quantity;\n priceMessage = priceMessage + \"\\nTotal: $\" + price;\n priceMessage = priceMessage + \"\\nThank you!\";\n return priceMessage;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "@Override\n public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) {\n String account = getEasyMapValueByName(extensionRequest, \"account\");\n String name = getEasyMapValueByName(extensionRequest, \"name\");\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n if (account.substring(0, 1).equals(\"1\")) {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(\" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 500,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 15 Agustus 2018\");\n } else {\n respBuilder.append(\"Ticket Number : \" + extensionRequest.getIntent().getTicket().getTicketNumber() + \"\\n\");\n respBuilder.append(appProperties.getFormId() + \" Data Customer Account \" + account + \"\\n\");\n respBuilder.append(\"Nama: \" + name + \"\\n\");\n respBuilder.append(\"Setoran tiap bulan : Rp. 1,000,000\\n\");\n respBuilder.append(\"Jatuh tempo berikutnya : 27 Agustus 2018\");\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "public void setNeedMemoInfo(Boolean needMemoInfo) {\n this.needMemoInfo = needMemoInfo;\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "@Override\n public String getDescription() {\n\t return \"Mexican Pizza\";\n }", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "private String createOrderSummary (String name, int price, boolean addWhippedCream, boolean addChocolate) {\n String priceMessage = getString(R.string.order_summary_name, name);\n priceMessage += \"\\n\" + getString(R.string.order_summary_whipped_cream, addWhippedCream);\n priceMessage += \"\\n\" + getString(R.string.order_summary_chocolate, addChocolate);\n priceMessage += \"\\n\" + getString(R.string.order_summary_quantity, quantity);\n priceMessage += \"\\nTotal: \" + price;\n priceMessage += \"\\n\" + getString(R.string.thank_you);\n return priceMessage;\n }", "public String describe() { return new String(\"No description.\"); }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String instructions() {\n return \"To register a [ USER ] the following \"\n + \"format is used:\\n\"\n + \".../USER/{name}/{pass}/{type}\\n\"\n + \"Example: \\n\"\n + \".../USER/Lucas/Ld123/admin\\n\"\n + \".../USER/Pepe/Ld123/employee\\n\\n\\n\"\n +\n \"To register a [ SAUCER ] the following \"\n + \"format is used:\\n\"\n + \".../SAUCER/{idSaurce}/{name}/{cost}\\n\"\n + \"Example: \\n\"\n + \".../SAUCER/15/stuffed rice/3.50\\n\\n\\n\"\n +\n \"To register a [ CLIENT ] the following \"\n + \"format is used:\\n\"\n + \".../CLIENT/{id}/{firsname}/{lastname}/{telephone}/{mail}\\n\"\n + \"Example: \\n\"\n + \".../CLIENT/20/Luigi/Villarreal/0985246604/[email protected]\\n\\n\\n\"\n +\n \"To register a [ MENU ] the following \"\n + \"format is used:\\n\"\n + \".../MENU/{idMenu}/{nameMenu}\\n\"\n + \"Example: \\n\"\n + \".../MENU/B04/Oriental\\n\\n\\n\";\n }", "private String createOrderSummary(int price, boolean cream, boolean chocolate, String name){\n String orderSummary = \"Name: \"+name+\"\\n\" +\n \"Add whipped cream? \" + cream +\"\\n\"+\n \"Add chocolate? \" + chocolate + \"\\n\" +\n \"Quantity: \"+\n quantity +\n \"\\nTotal: $\" + price +\n \"\\n\" + getString(R.string.thankyou) + \"!\";\n return orderSummary;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public java.lang.String getTcinmemo()\r\n {\r\n return _tcinmemo;\r\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description one\";\n }", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void setCustomerDescriptiveName(String customerDescriptiveName) {\r\n this.customerDescriptiveName = customerDescriptiveName;\r\n }", "String getDescripcion();", "String getDescripcion();", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String getDescription() {\n return (desc);\n }", "@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "private void setMemoBytes(\n com.google.protobuf.ByteString value) {\n memo_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }" ]
[ "0.6589688", "0.65882015", "0.65882015", "0.65882015", "0.65787244", "0.6533798", "0.6533798", "0.6533798", "0.649377", "0.649377", "0.649377", "0.649377", "0.6492644", "0.6467307", "0.6467307", "0.6442704", "0.64249337", "0.6399231", "0.63713586", "0.62734056", "0.62734056", "0.62734056", "0.6257111", "0.6257111", "0.6257111", "0.623714", "0.60872567", "0.6080106", "0.5998886", "0.59859514", "0.5911038", "0.56384254", "0.56148666", "0.55833757", "0.5577589", "0.555418", "0.555418", "0.555418", "0.55166066", "0.55089164", "0.55089164", "0.5472554", "0.5471978", "0.5452934", "0.5452934", "0.5452934", "0.543881", "0.54271096", "0.53990626", "0.53990626", "0.53990626", "0.53582954", "0.53582954", "0.53505033", "0.5338061", "0.5334982", "0.53077877", "0.5287249", "0.5282244", "0.52816576", "0.52635056", "0.5259121", "0.52349955", "0.523448", "0.5228283", "0.5219462", "0.5202442", "0.5201326", "0.51996744", "0.51976967", "0.5195055", "0.5188149", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5182176", "0.5181771", "0.5177549", "0.51762354", "0.51762354", "0.515185", "0.51518124", "0.5149906", "0.5148208", "0.51467", "0.51464355", "0.51464355", "0.5146117", "0.5138839", "0.5132555", "0.51322776", "0.51261646", "0.51259005", "0.5125217", "0.51092106", "0.51092106" ]
0.0
-1
URL to send Payment and get PaymentACK optional string payment_url = 6;
@java.lang.Override public boolean hasPaymentUrl() { return instance.hasPaymentUrl(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8026184", "0.6980227", "0.69088143", "0.66878295", "0.66115063", "0.65975267", "0.6565925", "0.65518755", "0.64772063", "0.6457564", "0.6451593", "0.6384458", "0.6383388", "0.6366041", "0.6362245", "0.63607705", "0.6210263", "0.61898124", "0.61852676", "0.6147616", "0.6129988", "0.6080698", "0.6076927", "0.6058412", "0.6031431", "0.59856427", "0.5942277", "0.59378994", "0.5937617", "0.59362257", "0.59323347", "0.5921494", "0.5911156", "0.58883506", "0.58714366", "0.585218", "0.58466995", "0.58157575", "0.5754194", "0.57259154", "0.57256687", "0.5721945", "0.5713502", "0.57079804", "0.5672102", "0.5670566", "0.56691813", "0.56296", "0.5591498", "0.55728877", "0.55688053", "0.5560611", "0.5560283", "0.5551254", "0.55446655", "0.5538667", "0.5504422", "0.5495317", "0.54945385", "0.54808444", "0.5474726", "0.5473705", "0.54555184", "0.54481065", "0.5440958", "0.5432879", "0.5428726", "0.54242593", "0.540161", "0.5400543", "0.5396257", "0.53656447", "0.53615296", "0.5343353", "0.53356403", "0.5334144", "0.5329569", "0.5323391", "0.53144985", "0.5312271", "0.5312208", "0.53051794", "0.53051496", "0.5288981", "0.52685386", "0.5264153", "0.526275", "0.5259683", "0.52343994", "0.5231375", "0.5230777", "0.522749", "0.5218384", "0.5215393", "0.52111095", "0.5206343", "0.5201812", "0.52016383", "0.5199229", "0.5196824" ]
0.5909989
33
URL to send Payment and get PaymentACK optional string payment_url = 6;
@java.lang.Override public java.lang.String getPaymentUrl() { return instance.getPaymentUrl(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public void CashPayment()\n {\n }", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8025209", "0.69808245", "0.6909147", "0.66887766", "0.6597593", "0.6566224", "0.6550819", "0.6476478", "0.64575464", "0.64516777", "0.63852495", "0.6383247", "0.63647765", "0.63615775", "0.6358058", "0.62098306", "0.61902875", "0.6185152", "0.6148113", "0.6129398", "0.6079982", "0.6076773", "0.60571676", "0.6034229", "0.59857213", "0.59421957", "0.5938512", "0.59372187", "0.5936139", "0.59322566", "0.592088", "0.5911637", "0.59099406", "0.58881086", "0.5871167", "0.58505446", "0.58466744", "0.58166003", "0.57534933", "0.57270294", "0.57255065", "0.5721934", "0.5715541", "0.57083577", "0.5671765", "0.5670291", "0.56695104", "0.56280017", "0.5591089", "0.5573227", "0.5569064", "0.5562817", "0.55604416", "0.5551738", "0.5545263", "0.5539006", "0.5505022", "0.5494964", "0.5494783", "0.5480001", "0.5473815", "0.5473728", "0.54566497", "0.54469144", "0.5441003", "0.54328984", "0.5427607", "0.5422865", "0.54023117", "0.5399313", "0.53964454", "0.5367804", "0.5360618", "0.5344031", "0.5333722", "0.53335446", "0.53305507", "0.53231424", "0.53144056", "0.5312427", "0.5311861", "0.5306887", "0.5305759", "0.52889305", "0.52694356", "0.5263595", "0.5262043", "0.52589273", "0.5234413", "0.5230704", "0.5229802", "0.5227135", "0.52179486", "0.52142805", "0.5211318", "0.5207649", "0.5202001", "0.52011585", "0.5199864", "0.51964617" ]
0.66115946
4
URL to send Payment and get PaymentACK optional string payment_url = 6;
@java.lang.Override public com.google.protobuf.ByteString getPaymentUrlBytes() { return instance.getPaymentUrlBytes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "public void autoPay() {}", "String getPaymentInformation();", "void setPaymentMethod(PaymentMethod paymentMethod);", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.80256826", "0.6980822", "0.69090235", "0.6688548", "0.6611434", "0.65964526", "0.6565504", "0.6550355", "0.6476589", "0.6458323", "0.64513665", "0.6384185", "0.6365502", "0.63613033", "0.63592046", "0.6210337", "0.6191012", "0.6185661", "0.61486834", "0.6129377", "0.60795176", "0.60771054", "0.60578895", "0.60336494", "0.59858817", "0.59428304", "0.59387314", "0.5936344", "0.5935076", "0.5932212", "0.5919778", "0.5910342", "0.59091634", "0.5886775", "0.5872107", "0.58506817", "0.5847652", "0.58168167", "0.57537925", "0.5726177", "0.5724655", "0.57218397", "0.57147026", "0.5708963", "0.56726587", "0.56702155", "0.56696624", "0.56289005", "0.5591952", "0.55725414", "0.5568936", "0.5562204", "0.55608237", "0.5552734", "0.5545528", "0.55387807", "0.5505166", "0.5496348", "0.5494464", "0.54811656", "0.5473715", "0.5473218", "0.5455547", "0.5448536", "0.5441001", "0.54340786", "0.5429193", "0.5423579", "0.5402684", "0.54008126", "0.5397096", "0.53676176", "0.5362304", "0.5344667", "0.53353405", "0.53343356", "0.5329618", "0.5323663", "0.53142035", "0.5312862", "0.53118813", "0.53063023", "0.5305259", "0.52897644", "0.52696514", "0.52647185", "0.5262621", "0.5259405", "0.52346504", "0.523025", "0.52300835", "0.52272874", "0.5218169", "0.521555", "0.5211449", "0.5207238", "0.5202055", "0.52013713", "0.52003425", "0.519714" ]
0.6384907
11
URL to send Payment and get PaymentACK optional string payment_url = 6;
public Builder setPaymentUrl( java.lang.String value) { copyOnWrite(); instance.setPaymentUrl(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8026184", "0.6980227", "0.69088143", "0.66878295", "0.66115063", "0.65975267", "0.6565925", "0.65518755", "0.64772063", "0.6457564", "0.6451593", "0.6384458", "0.6383388", "0.6366041", "0.6362245", "0.63607705", "0.6210263", "0.61898124", "0.61852676", "0.6147616", "0.6129988", "0.6080698", "0.6058412", "0.6031431", "0.59856427", "0.5942277", "0.59378994", "0.5937617", "0.59362257", "0.59323347", "0.5921494", "0.5911156", "0.5909989", "0.58883506", "0.58714366", "0.585218", "0.58466995", "0.58157575", "0.5754194", "0.57259154", "0.57256687", "0.5721945", "0.5713502", "0.57079804", "0.5672102", "0.5670566", "0.56691813", "0.56296", "0.5591498", "0.55728877", "0.55688053", "0.5560611", "0.5560283", "0.5551254", "0.55446655", "0.5538667", "0.5504422", "0.5495317", "0.54945385", "0.54808444", "0.5474726", "0.5473705", "0.54555184", "0.54481065", "0.5440958", "0.5432879", "0.5428726", "0.54242593", "0.540161", "0.5400543", "0.5396257", "0.53656447", "0.53615296", "0.5343353", "0.53356403", "0.5334144", "0.5329569", "0.5323391", "0.53144985", "0.5312271", "0.5312208", "0.53051794", "0.53051496", "0.5288981", "0.52685386", "0.5264153", "0.526275", "0.5259683", "0.52343994", "0.5231375", "0.5230777", "0.522749", "0.5218384", "0.5215393", "0.52111095", "0.5206343", "0.5201812", "0.52016383", "0.5199229", "0.5196824" ]
0.6076927
22
URL to send Payment and get PaymentACK optional string payment_url = 6;
public Builder clearPaymentUrl() { copyOnWrite(); instance.clearPaymentUrl(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void CashPayment()\n {\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8026184", "0.6980227", "0.69088143", "0.66878295", "0.66115063", "0.65975267", "0.6565925", "0.65518755", "0.64772063", "0.6457564", "0.6451593", "0.6384458", "0.6383388", "0.6366041", "0.6362245", "0.63607705", "0.6210263", "0.61898124", "0.61852676", "0.6147616", "0.6129988", "0.6080698", "0.6076927", "0.6058412", "0.6031431", "0.59856427", "0.5942277", "0.59378994", "0.5937617", "0.59362257", "0.59323347", "0.5921494", "0.5911156", "0.5909989", "0.58883506", "0.58714366", "0.585218", "0.58466995", "0.58157575", "0.5754194", "0.57259154", "0.57256687", "0.5721945", "0.5713502", "0.57079804", "0.5672102", "0.5670566", "0.56691813", "0.56296", "0.5591498", "0.55728877", "0.55688053", "0.5560611", "0.5560283", "0.5551254", "0.55446655", "0.5538667", "0.5504422", "0.5495317", "0.54945385", "0.54808444", "0.5474726", "0.5473705", "0.54555184", "0.54481065", "0.5440958", "0.5432879", "0.5428726", "0.54242593", "0.540161", "0.5400543", "0.5396257", "0.53656447", "0.53615296", "0.5343353", "0.53356403", "0.5334144", "0.5323391", "0.53144985", "0.5312271", "0.5312208", "0.53051794", "0.53051496", "0.5288981", "0.52685386", "0.5264153", "0.526275", "0.5259683", "0.52343994", "0.5231375", "0.5230777", "0.522749", "0.5218384", "0.5215393", "0.52111095", "0.5206343", "0.5201812", "0.52016383", "0.5199229", "0.5196824" ]
0.5329569
77
URL to send Payment and get PaymentACK optional string payment_url = 6;
public Builder setPaymentUrlBytes( com.google.protobuf.ByteString value) { copyOnWrite(); instance.setPaymentUrlBytes(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPaymentUrl();", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public static URL getUrlForPostSetCheckout()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/payment/paypal/set-checkout\";\r\n return str2url( strUrl );\r\n }", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "boolean hasPaymentUrl();", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public String generateURL(HashMap<String, String> params) throws java.security.NoSuchAlgorithmException{\n\t\tDBA = params.get(\"merchantName\");\n\t\tRETURN_URL = params.get(\"returnURL\");\n\t\tTRANSACTION_TYPE = params.get(\"transactionType\");\n\t\tDISCOVER_IMAGE = params.get(\"acceptDiscover\").toUpperCase().startsWith(\"Y\") ? \"discvr.gif\" : \"spacer.gif\";\n\t\tAMEX_IMAGE = params.get(\"acceptAmex\").toUpperCase().startsWith(\"Y\") ? \"amex.gif\" : \"spacer.gif\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tPROTECT_AMOUNT = params.get(\"protectAmount\");\n\t\tREBILLING = params.get(\"rebilling\").toUpperCase().startsWith(\"Y\") ? \"1\" : \"0\";\n\t\tREB_PROTECT = params.get(\"rebProtect\");\n\t\tREB_AMOUNT = params.get(\"rebAmount\");\n\t\tREB_CYCLES = params.get(\"rebCycles\");\n\t\tREB_FIRST_DATE = params.get(\"rebStartDate\");\n\t\tREB_EXPR = params.get(\"rebFrequency\");\n\t\tCUSTOM_ID1 = params.get(\"customID1\");\n\t\tPROTECT_CUSTOM_ID1 = params.get(\"protectCustomID1\");\n\t\tCUSTOM_ID2 = params.get(\"customID2\");\n\t\tPROTECT_CUSTOM_ID2 = params.get(\"protectCustomID2\");\n\t\tSHPF_FORM_ID = params.get(\"paymentTemplate\");\n\t\tRECEIPT_FORM_ID = params.get(\"receiptTemplate\");\n\t\tREMOTE_URL = params.get(\"receiptTempRemoteURL\");\n\t\tCARD_TYPES = setCardTypes();\n\t\tRECEIPT_TPS_DEF = \"SHPF_ACCOUNT_ID SHPF_FORM_ID RETURN_URL DBA AMEX_IMAGE DISCOVER_IMAGE SHPF_TPS_DEF\";\n\t\tRECEIPT_TPS_STRING = setReceiptTpsString();\n\t\tRECEIPT_TAMPER_PROOF_SEAL = calcURLTps(RECEIPT_TPS_STRING);\n\t\tRECEIPT_URL = setReceiptURL();\n\t\tBP10EMU_TPS_DEF = addDefProtectedStatus(\"MERCHANT APPROVED_URL DECLINED_URL MISSING_URL MODE TRANSACTION_TYPE TPS_DEF\");\n\t\tBP10EMU_TPS_STRING = setBp10emuTpsString();\n\t\tBP10EMU_TAMPER_PROOF_SEAL = calcURLTps(BP10EMU_TPS_STRING);\n\t\tSHPF_TPS_DEF = addDefProtectedStatus(\"SHPF_FORM_ID SHPF_ACCOUNT_ID DBA TAMPER_PROOF_SEAL AMEX_IMAGE DISCOVER_IMAGE TPS_DEF SHPF_TPS_DEF\");\n\t\tSHPF_TPS_STRING = setShpfTpsString();\n\t\tSHPF_TAMPER_PROOF_SEAL = calcURLTps(SHPF_TPS_STRING);\n\t\treturn calcURLResponse();\n\t}", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\toutput = \"https://secure.bluepay.com/interfaces/shpf?SHPF_FORM_ID=\" + RECEIPT_FORM_ID +\n\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + BP_MERCHANT +\n\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(RECEIPT_TPS_DEF) +\n\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(RECEIPT_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\"&RETURN_URL=\" + encodeURL(RETURN_URL) +\n\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE);\n\t\t}\n\t\treturn output;\n\t}", "CarPaymentMethod processPayPal();", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "public void navigateToBaseActivity() {\n\n //merchantKey = \"gtKFFx\"; //Testing\n merchantKey = \"ImrH8w\"; //Live\n //merchantKey = ((EditText) findViewById(R.id.editTextMerchantKey)).getText().toString();\n // String amount = ((EditText) findViewById(R.id.editTextAmount)).getText().toString();\n // String email = ((EditText) findViewById(R.id.editTextEmail)).getText().toString();\n\n // String value = environmentSpinner.getSelectedItem().toString();\n int environment;\n // String TEST_ENVIRONMENT = getResources().getString(R.string.test);\n // if (value.equals(TEST_ENVIRONMENT))\n //environment = PayuConstants.MOBILE_STAGING_ENV;\n // else\n environment = PayuConstants.PRODUCTION_ENV;\n\n userCredentials = merchantKey + \":\" + \"[email protected]\";// + new AppPreferences(PlaceOrderActivity.this).getEmail();\n\n //TODO Below are mandatory params for hash genetation\n mPaymentParams = new PaymentParams();\n /**\n * For Test Environment, merchantKey = \"gtKFFx\"\n * For Production Environment, merchantKey should be your live key or for testing in live you can use \"0MQaQP\"\n */\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(String.valueOf(discountedAmount));\n mPaymentParams.setProductInfo(\"FarmFresh24\");\n mPaymentParams.setFirstName(new AppPreferences(PlaceOrderActivity.this).getFname());\n mPaymentParams.setEmail(new AppPreferences(PlaceOrderActivity.this).getEmail());\n\n /*\n * Transaction Id should be kept unique for each transaction.\n * */\n mPaymentParams.setTxnId(\"\" + System.currentTimeMillis());\n\n /**\n * Surl --> Success url is where the transaction response is posted by PayU on successful transaction\n * Furl --> Failre url is where the transaction response is posted by PayU on failed transaction\n */\n mPaymentParams.setSurl(\"https://payu.herokuapp.com/success\");\n mPaymentParams.setFurl(\"https://payu.herokuapp.com/failure\");\n\n /*\n * udf1 to udf5 are options params where you can pass additional information related to transaction.\n * If you don't want to use it, then send them as empty string like, udf1=\"\"\n * */\n mPaymentParams.setUdf1(\"udf1\");\n mPaymentParams.setUdf2(\"udf2\");\n mPaymentParams.setUdf3(\"udf3\");\n mPaymentParams.setUdf4(\"udf4\");\n mPaymentParams.setUdf5(\"udf5\");\n\n /**\n * These are used for store card feature. If you are not using it then user_credentials = \"default\"\n * user_credentials takes of the form like user_credentials = \"merchant_key : user_id\"\n * here merchant_key = your merchant key,\n * user_id = unique id related to user like, email, phone number, etc.\n * */\n mPaymentParams.setUserCredentials(userCredentials);\n\n //TODO Pass this param only if using offer key\n //mPaymentParams.setOfferKey(\"cardnumber@8370\");\n\n //TODO Sets the payment environment in PayuConfig object\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n\n //TODO It is recommended to generate hash from server only. Keep your key and salt in server side hash generation code.\n //generateHashFromServer(mPaymentParams);\n\n /**\n * Below approach for generating hash is not recommended. However, this approach can be used to test in PRODUCTION_ENV\n * if your server side hash generation code is not completely setup. While going live this approach for hash generation\n * should not be used.\n * */\n String salt = \"BBq8CTgS\"; //Live\n // String salt = \"eCwWELxi\"; //Test\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "private void setPaymentUrl(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n paymentUrl_ = value;\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "public IBankTransfert payment();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void navigateToBaseActivity() throws JSONException {\n\n String merchantKey = jsonObject.getString(\"merchantKey\");\n String amount = jsonObject.getString(\"amount\");\n String email = jsonObject.getString(\"email\");\n String value = jsonObject.getString(\"value\");\n String firstName = jsonObject.getString(\"firstName\");\n String phone = jsonObject.getString(\"phone\");\n String txnId = jsonObject.getString(\"txnId\");\n String sUrl = jsonObject.getString(\"sUrl\");\n String fUrl = jsonObject.getString(\"fUrl\");\n String udf1 = jsonObject.getString(\"udf1\");\n String udf2 = jsonObject.getString(\"udf2\");\n String udf3 = jsonObject.getString(\"udf3\");\n String udf4 = jsonObject.getString(\"udf4\");\n String udf5 = jsonObject.getString(\"udf5\");\n salt = jsonObject.getString(\"salt\");\n int environment;\n if (value.equals(\"test\"))\n environment = PayuConstants.STAGING_ENV;\n else\n environment = PayuConstants.PRODUCTION_ENV;\n String userCredentials = merchantKey + \":\" + email;\n mPaymentParams = new PaymentParams();\n mPaymentParams.setKey(merchantKey);\n mPaymentParams.setAmount(amount);\n mPaymentParams.setProductInfo(\"GoCharge power bank charges\");\n mPaymentParams.setFirstName(firstName);\n mPaymentParams.setEmail(email);\n mPaymentParams.setPhone(phone);\n mPaymentParams.setTxnId(txnId);\n mPaymentParams.setSurl(sUrl);\n mPaymentParams.setFurl(fUrl);\n mPaymentParams.setNotifyURL(mPaymentParams.getSurl()); //for lazy pay\n mPaymentParams.setUdf1(udf1);\n mPaymentParams.setUdf2(udf2);\n mPaymentParams.setUdf3(udf3);\n mPaymentParams.setUdf4(udf4);\n mPaymentParams.setUdf5(udf5);\n mPaymentParams.setUserCredentials(userCredentials);\n payuConfig = new PayuConfig();\n payuConfig.setEnvironment(environment);\n generateHashFromSDK(mPaymentParams, salt);\n\n }", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "void pay(Payment payment) {\n\n\t}", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void clearPaymentUrl() {\n bitField0_ = (bitField0_ & ~0x00000010);\n paymentUrl_ = getDefaultInstance().getPaymentUrl();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void launchPayUMoneyFlow(String name, String number, String description, String amt) {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Done\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"DeliveryHUB PAYMENTS\");\n\n payUmoneyConfig.disableExitConfirmation(isDisableExitConfirmation);\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(amt);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = \"SH\" + System.currentTimeMillis();\n //String txnId = \"TXNID720431525261327973\";\n String phone = number;\n String productName = description;\n String firstName = name;\n String email = \"[email protected]\";\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((BaseApplication) getActivity().getApplication()).getAppEnvironment();\n builder.setAmount(String.valueOf(amount))\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n // generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * */\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, getActivity(), R.style.AppTheme_pink, true);\n\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n // payNowButton.setEnabled(true);\n }\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "private String PayAgentPayment(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n int serviceId = Integer.parseInt(request.getParameter(CONFIG.PARAM_SERVICE_ID));\n int operationId = Integer.parseInt(request.getParameter(CONFIG.OPERATION_ID));\n String amount = request.getParameter(CONFIG.AMOUNT);\n String agentIdentifier = request.getParameter(CONFIG.PARAM_MSISDN);\n int custId = Integer.parseInt((String) request.getSession().getAttribute(CONFIG.PARAM_PIN));\n String lang = request.getSession().getAttribute(CONFIG.lang).equals(\"\") ? \"en\" : \"ar\";\n\n Donation_AgentPaymentRequestDTO agentPaymentRequestDTO = new Donation_AgentPaymentRequestDTO();\n agentPaymentRequestDTO.setSERVICE_ID(serviceId);\n agentPaymentRequestDTO.setOPERATION_ID(operationId);\n agentPaymentRequestDTO.setAMOUNT(amount);\n agentPaymentRequestDTO.setCUSTOMER_ID(custId);\n agentPaymentRequestDTO.setAGENT_IDENTIFIER(agentIdentifier);\n agentPaymentRequestDTO.setCHANNEL(\"WEB\");\n agentPaymentRequestDTO.setLANG(lang);\n String national_id = request.getParameter(\"national_ID\");\n agentPaymentRequestDTO.setNATIONAL_ID(national_id);\n\n DonationAgentPaymentRespponseDto agentPaymentRespponseDto = MasaryManager.getInstance().do_agent_payment_without_inquiry(agentPaymentRequestDTO);\n MasaryManager.logger.info(\"Error code \" + agentPaymentRespponseDto.getSTATUS_CODE());\n if (agentPaymentRespponseDto.getSTATUS_CODE().equals(\"200\")) {\n\n session.setAttribute(\"donationPaymentResponse\", agentPaymentRespponseDto);\n session.setAttribute(\"SERVICE_ID\", (String.valueOf(serviceId)));\n\n// request.setAttribute(\"Fees\", fees.trim());\n return CONFIG.PAGE_PAY_AGENTPAYMENT;\n } else {\n request.getSession().setAttribute(\"ErrorCode\", CONFIG.getBillErrorCode(request.getSession())\n .concat(agentPaymentRespponseDto.getSTATUS_CODE())\n .concat(\" \")\n .concat(agentPaymentRespponseDto.getSTATUS_MESSAGE()));\n return CONFIG.PAGE_Agent_Payment;\n\n }\n\n } catch (Exception e) {\n MasaryManager.logger.error(\"Exception\" + e.getMessage(), e);\n\n request.getSession().setAttribute(\"ErrorCode\", e.getMessage());\n return CONFIG.PAGE_Agent_Payment;\n }\n\n }", "PaymentHandler createPaymentHandler();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "PaymentMethod getPaymentMethod();", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "private void launchPayUMoneyFlow() {\n\n PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();\n\n //Use this to set your custom text on result screen button\n payUmoneyConfig.setDoneButtonText(\"Continue\");\n\n //Use this to set your custom title for the activity\n payUmoneyConfig.setPayUmoneyActivityTitle(\"VUCabs\");\n\n PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();\n\n double amount = 0;\n try {\n amount = Double.parseDouble(String.valueOf(Amount));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n String txnId = System.currentTimeMillis() + \"\";\n String phone = mobile_til.getEditText().getText().toString().trim();\n String productName = \"VUCabs\";\n String firstName = name_et.getText().toString();\n String email = email_til.getEditText().getText().toString().trim();\n String udf1 = \"\";\n String udf2 = \"\";\n String udf3 = \"\";\n String udf4 = \"\";\n String udf5 = \"\";\n String udf6 = \"\";\n String udf7 = \"\";\n String udf8 = \"\";\n String udf9 = \"\";\n String udf10 = \"\";\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n builder.setAmount(amount)\n .setTxnId(txnId)\n .setPhone(phone)\n .setProductName(productName)\n .setFirstName(firstName)\n .setEmail(email)\n .setsUrl(appEnvironment.surl())\n .setfUrl(appEnvironment.furl())\n .setUdf1(udf1)\n .setUdf2(udf2)\n .setUdf3(udf3)\n .setUdf4(udf4)\n .setUdf5(udf5)\n .setUdf6(udf6)\n .setUdf7(udf7)\n .setUdf8(udf8)\n .setUdf9(udf9)\n .setUdf10(udf10)\n .setIsDebug(appEnvironment.debug())\n .setKey(appEnvironment.merchant_Key())\n .setMerchantId(appEnvironment.merchant_ID());\n\n try {\n mPaymentParams = builder.build();\n\n /*\n * Hash should always be generated from your server side.\n * */\n generateHashFromServer(mPaymentParams);\n\n /* *//**\n * Do not use below code when going live\n * Below code is provided to generate hash from sdk.\n * It is recommended to generate hash from server side only.\n * *//*\n mPaymentParams = calculateServerSideHashAndInitiatePayment1(mPaymentParams);\n\n if (AppPreference.selectedTheme != -1) {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, AppPreference.selectedTheme,mAppPreference.isOverrideResultScreen());\n } else {\n PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams,PayUMoneyActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());\n }*/\n\n } catch (Exception e) {\n // some exception occurred\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n payNowButton.setEnabled(true);\n }\n }", "public void calculatePayment() {}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void autoPay() {}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "String getPaymentInformation();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public boolean checkoutPost() {\n\n\n\t\ttry {\n\n\t\t\tString urlParameters = settings.getCheckoutParameters();\n\t\t\tbyte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);\n\t\t\tint postDataLength = postData.length;\n\n\t\t\tHttpsURLConnection con = settings.isUsingProxy() ? (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection(proxyBuilder.getProxy())) : (HttpsURLConnection)(new URL(settings.getCheckoutLink()).openConnection());\n\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setDoOutput(true);\n\t\t\tcon.setDoInput(true);\n\t\t\tcon.setConnectTimeout(8000); //timeout after 8 seconds\n\t\t\tcon.setReadTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\tcon.setRequestProperty(\"Host\", \"www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Connection\", \"keep-alive\");\n\t\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n\t\t\tcon.setRequestProperty(\"Cache-Control\", \"max-age=0\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\n\t\t\tcon.setRequestProperty(\"Origin\", \"https://www.supremenewyork.com\");\n\t\t\tcon.setRequestProperty(\"Upgrade-Insecure-Requests\", \"1\");\n\t\t\tcon.setRequestProperty(\"User-Agent\", userAgent);\n\t\t\tcon.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\tcon.setRequestProperty(\"Referer\", \"https://www.supremenewyork.com/checkout\");\n\t\t\tcon.setRequestProperty(\"Accept-Encoding\", \"gzip, deflate\");\n\t\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.8\");\n\n\t\t\tsetCookies(con);\n\n\t\t\tDataOutputStream doStream = new DataOutputStream(con.getOutputStream());\n\t\t\tdoStream.write(postData);\n\t\t\tdoStream.flush();\n\t\t\tdoStream.close();\n\t\t\t\n\t\t\tString encoding = con.getContentEncoding();\n\t\t\t\n\t\t\tprocessor.printSys(\"Checkout Response Encoding: \" + encoding);\n\t\t\t\n\t\t\tsettings.setCheckoutServerResponse(\"gzip\".equals(encoding) ? deflateGzipStream(new GZIPInputStream(con.getInputStream())) : connectionToString(con)); //store the html response, deflate it if its compressed\n\t\t\t\n\t\t\tstoreCookies(con);\n\n\t\t\tcon.disconnect();\n\n\t\t\treturn true; //if error hasn't been thrown, everything went smoothly\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\treturn false; //error thrown\n\t}", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "public static String payWithMoMo(String transactionId, String mobile, Double amount, String email, String customerName, String returnUrl) throws Exception{\n String privateKey = PRIVATE_KEY;\n HttpURLConnection client = (HttpURLConnection) new URL(\"https://api.flutterwave.com/v3/payments\").openConnection();\n client.setRequestMethod(\"POST\");\n client.setDoOutput(true);\n client.addRequestProperty(\"Content-type\", \"application/json\");\n client.addRequestProperty(\"Authorization\", \"Bearer \"+privateKey);\n JSONObject customer = new JSONObject();\n customer.put(\"name\", customerName);\n customer.put(\"email\", email);\n JSONObject data = new JSONObject();\n data.put(\"tx_ref\", transactionId);\n data.put(\"amount\", amount);\n data.put(\"currency\", \"USD\");\n data.put(\"customer\", customer);\n data.put(\"redirect_url\", returnUrl);\n client.getOutputStream().write(data.toJSONString().getBytes());\n client.getInputStream();\n JSONParser jsonp = new JSONParser();\n String url = (String)(((JSONObject)((JSONObject)jsonp.parse(new InputStreamReader(client.getInputStream()))).get(\"data\"))).get(\"link\");\n return url;\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "private void m50394d(String str) {\n Transaction transaction;\n if (!this.f30728a.mo23620g()) {\n m50398f(false);\n mo38886a((String) null, this.f30720S.getString(C10232R.string.msg_info_internet_connection));\n return;\n }\n try {\n String str2 = \"://callback\";\n if (this.f30739j0.isChecked()) {\n CardPaymentParams cardPaymentParams = (CardPaymentParams) m50382b(str);\n cardPaymentParams.mo40949a(true);\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(str2);\n cardPaymentParams.mo40895e(sb.toString());\n transaction = new Transaction((PaymentParams) cardPaymentParams);\n } else {\n PaymentParams b = m50382b(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb2.append(str2);\n b.mo40895e(sb2.toString());\n transaction = new Transaction(b);\n }\n if (m50434z()) {\n this.f30754y0.mo41066a(transaction);\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } else {\n this.f30754y0.mo41073b(transaction);\n }\n } catch (PaymentException e) {\n m50398f(false);\n mo38886a((String) null, e.mo40774a().mo40764c());\n }\n }", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public String getPayment() {\n if(payment==null) { payment = \"\"; }\n return payment;\n }", "public io.grpc.stub.StreamObserver<lnrpc.Rpc.SendRequest> sendPayment(\n io.grpc.stub.StreamObserver<lnrpc.Rpc.SendResponse> responseObserver) {\n return asyncBidiStreamingCall(\n getChannel().newCall(getSendPaymentMethod(), getCallOptions()), responseObserver);\n }", "@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }", "@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Override\n\n public void onClick(View v) {\n\n simplify.createCardToken(cardEditor.getCard(), new CardToken.Callback() {\n\n @Override\n\n public void onSuccess(CardToken cardToken) {\n\n //Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n //finish();\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }\n\n @Override\n\n public void onError(Throwable throwable) {\n\n Toast.makeText(getBaseContext(), \"Success\", Toast.LENGTH_SHORT).show();\n\n }\n\n });\n\n\n }", "@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}", "void pay(Order order);", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Path(\"/{id_payment}\")\n\t@GET\n\tpublic Response getPayment(@PathParam(\"id_payment\") String idPayment) {\n\t\tPayment currentPayment = Database.getPayment(idPayment);\n\t\t// Proceed payment\n\t\tJSONObject result = new JSONObject();\n\t\tresult.append(\"id_payment\", currentPayment.getId());\n\t\tresult.append(\"id_command\", currentPayment.getCommandId());\n\t\tresult.append(\"numCb\", currentPayment.getNumCb());\n\t\tresult.append(\"crypto\", currentPayment.getCrypto());\n\t\tresult.append(\"dateEnd\", currentPayment.getDateEnd());\n\t\treturn Response.ok().entity(result.toString(2)).build();\n\t}", "@Override\r\n\tpublic ReturnMsgEnum pay(Payee payee) {\n\t\tString url = \"https://www.joinpay.com/payment/pay/singlePay\";\r\n\t\tJSONObject json = new JSONObject();\r\n\t\tjson.put(\"userNo\", getUserNo());\r\n\t\tjson.put(\"productCode\", getProductCode());\r\n\t\tjson.put(\"requestTime\", getRequestTime());\r\n\t\tjson.put(\"merchantOrderNo\", getMerchantOrderNo());\r\n\t\tjson.put(\"receiverAccountNoEnc\", getReceiverAccountNoEnc());\r\n\t\tjson.put(\"receiverNameEnc\", getReceiverNameEnc());\r\n\t\tjson.put(\"receiverAccountType\",getReceiverAccountType());\r\n\t\tjson.put(\"paidAmount\", getPaidAmount());\r\n\t\tjson.put(\"currency\",getCurrency());\r\n\t\tjson.put(\"isChecked\",getIsChecked());\r\n\t\tjson.put(\"paidDesc\", getPaidDesc());\r\n\t\tjson.put(\"paidUse\",getPaidUse());\r\n\t\tjson.put(\"callbackUrl\", getCallbackUrl());\r\n\t\tjson.put(\"hmac\",getHmac());\r\n\t\tlogger.info(\"汇聚代付请求参数:{}\",json.toJSONString());\r\n\t\tString result = HttpRequest.post(url).body(json.toJSONString()).charset(\"UTF-8\").execute().body();\r\n\t\tlogger.info(\"汇聚代付响应结果:{}\",result);\r\n\t\tJSONObject resp = JSONObject.parseObject(result);\r\n\t\tif (resp.getString(\"statusCode\").equals(\"2001\")){\r\n\t\t\treturn ReturnMsgEnum.success.setMsg(\"汇聚代付受理成功,等待汇聚出款\");\r\n\t\t}\r\n\t\treturn ReturnMsgEnum.error.setMsg(\"代付失败【\"+resp.getString(\"message\")+\"】\");\r\n\t}", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public void CashPayment()\n {\n }", "public String getPayMethod() {\n return payMethod;\n }", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public String createPisCommonPayment() {\n return commonPaymentServiceBaseUrl + \"/pis/common-payments/\";\n }", "private void makePayment(User user, Scanner sc, Payment payment) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayment Processing\\n\");\n\t\t\tlog.info(\"Current Payment: \" + payment + \"\\n\");\n\n\t\t\tMap<String, Object> makePaymentArgs = new HashMap<>();\n\t\t\tmakePaymentArgs.put(\"offer\", payment.getOffer());\n\t\t\tmakePaymentArgs.put(\"user\", user);\n\t\t\tmakePaymentArgs.put(\"amount\", payment.getOffer().getBalance());\n\t\t\tcService.makePayment(makePaymentArgs);\n\n\t\t\tlog.info(\"\\nPayment is complete:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the PAYMENTS DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }", "public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString hppUrl = \"https://test.adyen.com/hpp/pay.shtml\";\n\t\tString hmacKey = \"YourHmacSecretKey\";\n\n\t\t/**\n\t\t * Defining variables\n\t\t * The HPP requires certain variables to be posted in order to create a payment possibility for the shopper.\n\t\t * \n\t\t * The variables that you can post to the HPP are the following:\n\t\t * \n\t\t * <pre>\n\t\t * merchantReference : Your reference for this payment.\n\t\t * paymentAmount : The transaction amount in minor units (e.g. EUR 1,00 = 100).\n\t\t * currencyCode : The three character ISO currency code.\n\t\t * shipBeforeDate : The date by which the goods or services specifed in the order must be shipped.\n\t\t * Format: YYYY-MM-DD\n\t\t * skinCode : The code of the skin to be used for the payment.\n\t\t * merchantAccount : The merchant account for which you want to process the payment.\n\t\t * sessionValidity : The time by which a payment needs to have been made.\n\t\t * Format: YYYY-MM-DDThh:mm:ssTZD\n\t\t * shopperLocale : A combination of language code and country code used to specify the language to be\n\t\t * used in the payment session (e.g. en_GB).\n\t\t * orderData : A fragment of HTML/text that will be displayed on the HPP. (optional)\n\t\t * countryCode : Country code according to ISO_3166-1_alpha-2 standard. (optional)\n\t\t * shopperEmail : The shopper's email address. (recommended)\n\t\t * shopperReference : An ID that uniquely identifes the shopper, such as a customer id. (recommended)\n\t\t * allowedMethods : A comma-separated list of allowed payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * blockedMethods : A comma-separated list of blocked payment methods, i.e. \"ideal,mc,visa\". (optional)\n\t\t * offset : An integer that is added to the normal fraud score. (optional)\n\t\t * merchantSig : The HMAC signature used by Adyen to test the validy of the form.\n\t\t * \n\t\t * recurringContract : Can be \"ONECLICK\", \"RECURRING\" or \"ONECLICK,RECURRING\". (optional)\n\t\t * This allows you to store the payment details as a ONECLICK and/or RECURRING contract.\n\t\t * Please note that if you supply recurringContract, shopperEmail and shopperReference\n\t\t * become mandatory. Please view the recurring examples in the repository as well.\n\t\t * shopperStatement : Submit a variable shopper statement. (optional)\n\t\t * merchantReturnData : This field will be passed back as-is on the return URL when the shopper completes\n\t\t * (or abandons) the payment and returns to your shop. (optional)\n\t\t * brandCode : The payment method the shopper likes to pay with, i.e. ideal. (optional)\n\t\t * issuerId : If brandCode specifies a redirect payment method, the issuer can be defined here\n\t\t * forcing the HPP to redirect directly to the payment method. (optional)\n\t\t * </pre>\n\t\t */\n\n\t\t// Generate dates\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate currentDate = calendar.getTime(); // current date\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate sessionDate = calendar.getTime(); // current date + 1 day\n\t\tcalendar.add(Calendar.DATE, 2);\n\t\tDate shippingDate = calendar.getTime(); // current date + 3 days\n\n\t\t// Define variables\n\t\tString merchantReference = \"TEST-PAYMENT-\" + new SimpleDateFormat(\"yyyy-MM-dd-HH:mm:ss\").format(currentDate);\n\t\tString paymentAmount = \"199\";\n\t\tString currencyCode = \"EUR\";\n\t\tString shipBeforeDate = new SimpleDateFormat(\"yyyy-MM-dd\").format(shippingDate);\n\t\tString skinCode = \"YourSkinCode\";\n\t\tString merchantAccount = \"YourMerchantAccount\";\n\t\tString sessionValidity = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssXXX\").format(sessionDate);\n\t\tString shopperLocale = \"en_US\";\n\t\tString orderData = compressString(\"Orderdata to display on the HPP can be put here\");\n\t\tString countryCode = \"NL\";\n\t\tString shopperEmail = \"\";\n\t\tString shopperReference = \"\";\n\t\tString allowedMethods = \"\";\n\t\tString blockedMethods = \"\";\n\t\tString offset = \"\";\n\n\t\tString recurringContract = \"\";\n\t\tString shopperStatement = \"\";\n\t\tString merchantReturnData = \"\";\n\n\t\t// By providing the brandCode and issuerId the HPP will redirect the shopper directly to this payment method.\n\t\t// Please note: the form should be posted to https://test.adyen.com/hpp/details.shtml rather than pay.shtml,\n\t\t// change the hppUrl accordingly. While posting to details.shtml countryCode becomes a required as well.\n\t\tString brandCode = \"\";\n\t\tString issuerId = \"\";\n\n\t\t/**\n\t\t * Collecting Shopper Information\n\t\t * \n\t\t * Address Verification System (AVS) is a security feature that verifies the billing address and/or\n\t\t * delivery address and/or shopper information of the card holder. To enable AVS the Billing Address Fields\n\t\t * (AVS) field must be checked under Skin Options for each skin you wish to use. The following variables\n\t\t * can be send to the HPP:\n\t\t * \n\t\t * <pre>\n\t\t * - billingAddress.street : The street name.\n\t\t * - billingAddress.houseNumberOrName : The house number (or name).\n\t\t * - billingAddress.city : The city.\n\t\t * - billingAddress.postalCode : The postal/zip code.\n\t\t * - billingAddress.stateOrProvince : The state or province.\n\t\t * - billingAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - billingAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - billingAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - deliveryAddress.street : The street name.\n\t\t * - deliveryAddress.houseNumberOrName : The house number (or name).\n\t\t * - deliveryAddress.city : The city.\n\t\t * - deliveryAddress.postalCode : The postal/zip code.\n\t\t * - deliveryAddress.stateOrProvince : The state or province.\n\t\t * - deliveryAddress.country : The country in ISO 3166-1 alpha-2 format (e.g. NL).\n\t\t * - deliveryAddressType : Specify whether the shopper is allowed to view and/or modify these\n\t\t * personal details (see below).\n\t\t * - deliveryAddressSig : A separate merchant signature for these fields.\n\t\t * \n\t\t * - shopper.firstName : The shopper's firstname.\n\t\t * - shopper.infix : The shopper infx.\n\t\t * - shopper.lastName : The shopper's lastname.\n\t\t * - shopper.gender : The shopper's gender (MALE/FEMALE).\n\t\t * - shopper.dateOfBirthDayOfMonth : The day of the month of the shopper's birth.\n\t\t * - shopper.dateOfBirthMonth : The month of the shopper's birth.\n\t\t * - shopper.dateOfBirthYear : The year of the shopper's birth.\n\t\t * - shopper.telephoneNumber : The shopper's telephone number.\n\t\t * - shopperType : This field can be used if validation of the shopper fields is desired.\n\t\t * - shopperSig : A separate merchant signature for these fields.\n\t\t * (optional if shopperType is not supplied)\n\t\t * </pre>\n\t\t * \n\t\t * Please note: billingAddressType, deliveryAddressType and shopperType can have the following values:\n\t\t * - Not supplied: modifiable / visible\n\t\t * - 1: unmodifiable / visible\n\t\t * - 2: unmodifiable / invisible\n\t\t */\n\n\t\tString billingAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString billingAddressHouseNumberOrName = \"6-50\";\n\t\tString billingAddressCity = \"Amsterdam\";\n\t\tString billingAddressPostalCode = \"1011 DJ\";\n\t\tString billingAddressStateOrProvince = \"\";\n\t\tString billingAddressCountry = \"NL\";\n\t\tString billingAddressType = \"\";\n\n\t\tString deliveryAddressStreet = \"Simon Carmiggeltstraat\";\n\t\tString deliveryAddressHouseNumberOrName = \"6-50\";\n\t\tString deliveryAddressCity = \"Amsterdam\";\n\t\tString deliveryAddressPostalCode = \"1011 DJ\";\n\t\tString deliveryAddressStateOrProvince = \"\";\n\t\tString deliveryAddressCountry = \"NL\";\n\t\tString deliveryAddressType = \"1\";\n\n\t\tString shopperFirstName = \"John\";\n\t\tString shopperInfix = \"\";\n\t\tString shopperLastName = \"Doe\";\n\t\tString shopperGender = \"MALE\";\n\t\tString shopperDateOfBirthDayOfMonth = \"05\";\n\t\tString shopperDateOfBirthMonth = \"10\";\n\t\tString shopperDateOfBirthYear = \"1990\";\n\t\tString shopperTelephoneNumber = \"+31612345678\";\n\t\tString shopperType = \"1\";\n\n\t\t/**\n\t\t * Signing the form\n\t\t * \n\t\t * The signatures are used by Adyen to verify if the posted data is not altered by the shopper. The signatures\n\t\t * must be encrypted according to the procedures below.\n\t\t */\n\n\t\tString signingString;\n\n\t\t// Compute the merchantSig\n\t\tString merchantSig;\n\t\ttry {\n\t\t\tsigningString = paymentAmount + currencyCode + shipBeforeDate + merchantReference + skinCode\n\t\t\t\t\t+ merchantAccount + sessionValidity + shopperEmail + shopperReference + recurringContract\n\t\t\t\t\t+ allowedMethods + blockedMethods + shopperStatement + merchantReturnData + billingAddressType\n\t\t\t\t\t+ deliveryAddressType + shopperType + offset;\n\t\t\tmerchantSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the billingAddressSig\n\t\tString billingAddressSig;\n\t\ttry {\n\t\t\tsigningString = billingAddressStreet + billingAddressHouseNumberOrName + billingAddressCity\n\t\t\t\t\t+ billingAddressPostalCode + billingAddressStateOrProvince + billingAddressCountry;\n\t\t\tbillingAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the deliveryAddressSig\n\t\tString deliveryAddressSig;\n\t\ttry {\n\t\t\tsigningString = deliveryAddressStreet + deliveryAddressHouseNumberOrName + deliveryAddressCity\n\t\t\t\t\t+ deliveryAddressPostalCode + deliveryAddressStateOrProvince + deliveryAddressCountry;\n\t\t\tdeliveryAddressSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Compute the shopperSig\n\t\tString shopperSig;\n\t\ttry {\n\t\t\tsigningString = shopperFirstName + shopperInfix + shopperLastName + shopperGender\n\t\t\t\t\t+ shopperDateOfBirthDayOfMonth + shopperDateOfBirthMonth + shopperDateOfBirthYear\n\t\t\t\t\t+ shopperTelephoneNumber;\n\t\t\tshopperSig = calculateHMAC(hmacKey, signingString);\n\t\t} catch (GeneralSecurityException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\n\t\t// Set request parameters for use on the JSP page\n\t\trequest.setAttribute(\"hppUrl\", hppUrl);\n\t\trequest.setAttribute(\"merchantReference\", merchantReference);\n\t\trequest.setAttribute(\"paymentAmount\", paymentAmount);\n\t\trequest.setAttribute(\"currencyCode\", currencyCode);\n\t\trequest.setAttribute(\"shipBeforeDate\", shipBeforeDate);\n\t\trequest.setAttribute(\"skinCode\", skinCode);\n\t\trequest.setAttribute(\"merchantAccount\", merchantAccount);\n\t\trequest.setAttribute(\"sessionValidity\", sessionValidity);\n\t\trequest.setAttribute(\"shopperLocale\", shopperLocale);\n\t\trequest.setAttribute(\"orderData\", orderData);\n\t\trequest.setAttribute(\"countryCode\", countryCode);\n\t\trequest.setAttribute(\"shopperEmail\", shopperEmail);\n\t\trequest.setAttribute(\"shopperReference\", shopperReference);\n\t\trequest.setAttribute(\"recurringContract\", recurringContract);\n\t\trequest.setAttribute(\"allowedMethods\", allowedMethods);\n\t\trequest.setAttribute(\"blockedMethods\", blockedMethods);\n\t\trequest.setAttribute(\"shopperStatement\", shopperStatement);\n\t\trequest.setAttribute(\"merchantReturnData\", merchantReturnData);\n\t\trequest.setAttribute(\"offset\", offset);\n\t\trequest.setAttribute(\"brandCode\", brandCode);\n\t\trequest.setAttribute(\"issuerId\", issuerId);\n\n\t\trequest.setAttribute(\"billingAddressStreet\", billingAddressStreet);\n\t\trequest.setAttribute(\"billingAddressHouseNumberOrName\", billingAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"billingAddressCity\", billingAddressCity);\n\t\trequest.setAttribute(\"billingAddressPostalCode\", billingAddressPostalCode);\n\t\trequest.setAttribute(\"billingAddressStateOrProvince\", billingAddressStateOrProvince);\n\t\trequest.setAttribute(\"billingAddressCountry\", billingAddressCountry);\n\t\trequest.setAttribute(\"billingAddressType\", billingAddressType);\n\n\t\trequest.setAttribute(\"deliveryAddressStreet\", deliveryAddressStreet);\n\t\trequest.setAttribute(\"deliveryAddressHouseNumberOrName\", deliveryAddressHouseNumberOrName);\n\t\trequest.setAttribute(\"deliveryAddressCity\", deliveryAddressCity);\n\t\trequest.setAttribute(\"deliveryAddressPostalCode\", deliveryAddressPostalCode);\n\t\trequest.setAttribute(\"deliveryAddressStateOrProvince\", deliveryAddressStateOrProvince);\n\t\trequest.setAttribute(\"deliveryAddressCountry\", deliveryAddressCountry);\n\t\trequest.setAttribute(\"deliveryAddressType\", deliveryAddressType);\n\n\t\trequest.setAttribute(\"shopperFirstName\", shopperFirstName);\n\t\trequest.setAttribute(\"shopperInfix\", shopperInfix);\n\t\trequest.setAttribute(\"shopperLastName\", shopperLastName);\n\t\trequest.setAttribute(\"shopperGender\", shopperGender);\n\t\trequest.setAttribute(\"shopperDateOfBirthDayOfMonth\", shopperDateOfBirthDayOfMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthMonth\", shopperDateOfBirthMonth);\n\t\trequest.setAttribute(\"shopperDateOfBirthYear\", shopperDateOfBirthYear);\n\t\trequest.setAttribute(\"shopperTelephoneNumber\", shopperTelephoneNumber);\n\t\trequest.setAttribute(\"shopperType\", shopperType);\n\n\t\trequest.setAttribute(\"merchantSig\", merchantSig);\n\t\trequest.setAttribute(\"billingAddressSig\", billingAddressSig);\n\t\trequest.setAttribute(\"deliveryAddressSig\", deliveryAddressSig);\n\t\trequest.setAttribute(\"shopperSig\", shopperSig);\n\t\t\n\t\t// Set correct character encoding\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// Forward request data to corresponding JSP page\n\t\trequest.getRequestDispatcher(\"/1.HPP/create-payment-on-hpp-advanced.jsp\").forward(request, response);\n\t}", "@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Payment getPayment() {\n return payment_ == null ? com.dogecoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_;\n }", "private void returnDeposit(String paymentInfo) {\n }" ]
[ "0.8025209", "0.69808245", "0.6909147", "0.66887766", "0.66115946", "0.6597593", "0.6566224", "0.6550819", "0.6476478", "0.64575464", "0.64516777", "0.63852495", "0.6383247", "0.63647765", "0.63615775", "0.6358058", "0.62098306", "0.61902875", "0.6185152", "0.6148113", "0.6129398", "0.6079982", "0.6076773", "0.60571676", "0.6034229", "0.59857213", "0.59421957", "0.5938512", "0.59372187", "0.5936139", "0.59322566", "0.592088", "0.5911637", "0.59099406", "0.58881086", "0.5871167", "0.58505446", "0.58466744", "0.58166003", "0.57534933", "0.57270294", "0.57255065", "0.5721934", "0.5715541", "0.57083577", "0.5671765", "0.5670291", "0.56695104", "0.56280017", "0.5591089", "0.5573227", "0.5562817", "0.55604416", "0.5551738", "0.5545263", "0.5539006", "0.5505022", "0.5494964", "0.5494783", "0.5480001", "0.5473815", "0.5473728", "0.54566497", "0.54469144", "0.5441003", "0.54328984", "0.5427607", "0.5422865", "0.54023117", "0.5399313", "0.53964454", "0.5367804", "0.5360618", "0.5344031", "0.5333722", "0.53335446", "0.53305507", "0.53231424", "0.53144056", "0.5312427", "0.5311861", "0.5306887", "0.5305759", "0.52889305", "0.52694356", "0.5263595", "0.5262043", "0.52589273", "0.5234413", "0.5230704", "0.5229802", "0.5227135", "0.52179486", "0.52142805", "0.5211318", "0.5207649", "0.5202001", "0.52011585", "0.5199864", "0.51964617" ]
0.5569064
51
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
@java.lang.Override public boolean hasMerchantData() { return instance.hasMerchantData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000020;\n merchantData_ = value;\n }", "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000020);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "void setData(byte[] data) {\n this.data = data;\n }", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public String getMerchant() {\n return _merchant;\n }", "public void setPayload(int data) {\n payload = data;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.76300323", "0.7617597", "0.73379797", "0.73379797", "0.7059095", "0.7059095", "0.6389361", "0.6324724", "0.6265656", "0.6265656", "0.6243923", "0.6243923", "0.6086128", "0.6081462", "0.60717684", "0.5706813", "0.5610246", "0.5511306", "0.541683", "0.53977525", "0.5355959", "0.5341446", "0.5331263", "0.5300884", "0.5252495", "0.52418417", "0.5226436", "0.5226436", "0.5199506", "0.5161985", "0.516113", "0.5153838", "0.51270026", "0.51229614", "0.51187253", "0.50945103", "0.5068383", "0.5064563", "0.50639075", "0.5030928", "0.5029941", "0.50295573", "0.5026745", "0.5022471", "0.501158", "0.5004264", "0.49950758", "0.498435", "0.49805808", "0.4975186", "0.4962245", "0.49571773", "0.4956153", "0.49555865", "0.49542344", "0.4950877", "0.49502397", "0.4946308", "0.4945857", "0.49362367", "0.49276966", "0.49187714", "0.49186146", "0.49186146", "0.49186146", "0.49186146", "0.49183324", "0.49101818", "0.49088922", "0.49033964", "0.48986474", "0.48936906", "0.48887584", "0.4883458", "0.4880903", "0.48748472", "0.48725367", "0.4870911", "0.48614663", "0.48565418", "0.48519433", "0.4841359", "0.48356745", "0.4833025", "0.48276553", "0.48271188", "0.48255527", "0.48255527", "0.48179457", "0.4816771", "0.48131406", "0.48119134", "0.48112005", "0.48089328", "0.48023614", "0.479768", "0.47946352", "0.47932565", "0.47925442" ]
0.5446434
19
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
@java.lang.Override public com.google.protobuf.ByteString getMerchantData() { return instance.getMerchantData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000020;\n merchantData_ = value;\n }", "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000020);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "void setData(byte[] data) {\n this.data = data;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public void setPayload(int data) {\n payload = data;\n }", "public String getMerchant() {\n return _merchant;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.7630618", "0.7618193", "0.7336694", "0.7336694", "0.70582145", "0.70582145", "0.6389797", "0.63252866", "0.6265142", "0.6265142", "0.60854363", "0.6081552", "0.60719115", "0.5704075", "0.5608558", "0.5511907", "0.54459894", "0.54459894", "0.5416915", "0.53975123", "0.53567463", "0.53412205", "0.5330112", "0.5300584", "0.52514154", "0.52423954", "0.52256817", "0.52256817", "0.51973677", "0.51620483", "0.51604396", "0.51537323", "0.512647", "0.5122304", "0.5118093", "0.50963056", "0.50689656", "0.5065064", "0.50635993", "0.5031319", "0.50306684", "0.5028956", "0.5025612", "0.50214976", "0.5010842", "0.5003942", "0.49949604", "0.49836794", "0.49801457", "0.49750897", "0.49611008", "0.49562854", "0.49556223", "0.49546126", "0.49545336", "0.49525058", "0.49498335", "0.49485028", "0.49449828", "0.49342197", "0.49274927", "0.49191725", "0.4918797", "0.49174935", "0.49174935", "0.49174935", "0.49174935", "0.49091703", "0.49070522", "0.4905512", "0.4896595", "0.48922458", "0.4887393", "0.48823854", "0.48802504", "0.48735785", "0.4870288", "0.48691177", "0.48628128", "0.4856505", "0.48517004", "0.48400944", "0.48380598", "0.48310328", "0.48297852", "0.48271155", "0.48249313", "0.48249313", "0.48200426", "0.4815683", "0.48147708", "0.48112258", "0.48099416", "0.48070502", "0.48014605", "0.4799453", "0.47932953", "0.47926295", "0.47908127" ]
0.6242635
11
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
public Builder setMerchantData(com.google.protobuf.ByteString value) { copyOnWrite(); instance.setMerchantData(value); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000020;\n merchantData_ = value;\n }", "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000020);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "void setData(byte[] data) {\n this.data = data;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public void setPayload(int data) {\n payload = data;\n }", "public String getMerchant() {\n return _merchant;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.7630618", "0.7618193", "0.7336694", "0.7336694", "0.70582145", "0.70582145", "0.6389797", "0.63252866", "0.6242635", "0.6242635", "0.60854363", "0.6081552", "0.60719115", "0.5704075", "0.5608558", "0.5511907", "0.54459894", "0.54459894", "0.5416915", "0.53975123", "0.53567463", "0.53412205", "0.5330112", "0.5300584", "0.52514154", "0.52423954", "0.52256817", "0.52256817", "0.51973677", "0.51620483", "0.51604396", "0.51537323", "0.512647", "0.5122304", "0.5118093", "0.50963056", "0.50689656", "0.5065064", "0.50635993", "0.5031319", "0.50306684", "0.5028956", "0.5025612", "0.50214976", "0.5010842", "0.5003942", "0.49949604", "0.49836794", "0.49801457", "0.49750897", "0.49611008", "0.49562854", "0.49556223", "0.49546126", "0.49545336", "0.49525058", "0.49498335", "0.49485028", "0.49449828", "0.49342197", "0.49274927", "0.49191725", "0.4918797", "0.49174935", "0.49174935", "0.49174935", "0.49174935", "0.49091703", "0.49070522", "0.4905512", "0.4896595", "0.48922458", "0.4887393", "0.48823854", "0.48802504", "0.48735785", "0.4870288", "0.48691177", "0.48628128", "0.4856505", "0.48517004", "0.48400944", "0.48380598", "0.48310328", "0.48297852", "0.48271155", "0.48249313", "0.48249313", "0.48200426", "0.4815683", "0.48147708", "0.48112258", "0.48099416", "0.48070502", "0.48014605", "0.4799453", "0.47932953", "0.47926295", "0.47908127" ]
0.6265142
8
Arbitrary data to include in the Payment message optional bytes merchant_data = 7;
public Builder clearMerchantData() { copyOnWrite(); instance.clearMerchantData(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000020;\n merchantData_ = value;\n }", "private void setMerchantData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000001;\n merchantData_ = value;\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return merchantData_;\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "public Builder setMerchantData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setMerchantData(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000020);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "private void clearMerchantData() {\n bitField0_ = (bitField0_ & ~0x00000001);\n merchantData_ = getDefaultInstance().getMerchantData();\n }", "public void sendPaymentToMerchant() {\n // Check for successful send and a BIP70 Payment requirement\n if (lastBitcoinSentEvent != null && lastBitcoinSentEvent.isSendWasSuccessful()) {\n Preconditions.checkNotNull(getPaymentRequestData());\n Preconditions.checkState(getPaymentRequestData().isPresent());\n Preconditions.checkNotNull(getPaymentRequestData().get().getPaymentSessionSummary());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().isPresent());\n Preconditions.checkState(getPaymentRequestData().get().getPaymentSessionSummary().get().hasPaymentSession());\n\n PaymentSessionSummary paymentSessionSummary = getPaymentRequestData().get().getPaymentSessionSummary().get();\n\n // Send the Payment message to the merchant\n try {\n final List<Transaction> transactionsSent = Lists.newArrayList(lastBitcoinSentEvent.getTransaction().get());\n final PaymentRequestData finalPaymentRequestData = getPaymentRequestData().get();\n\n final Optional<PaymentSessionSummary.PaymentProtocolResponseDto> dto = paymentSessionSummary.sendPaymentSessionPayment(\n transactionsSent,\n lastBitcoinSentEvent.getChangeAddress(),\n getSendBitcoinEnterPaymentMemoPanelModel().getPaymentMemo());\n\n final Protos.Payment finalPayment = dto.get().getFinalPayment();\n final ListenableFuture<PaymentProtocol.Ack> future = dto.get().getFuture();\n\n if (future != null) {\n Futures.addCallback(\n future, new FutureCallback<PaymentProtocol.Ack>() {\n @Override\n public void onSuccess(PaymentProtocol.Ack result) {\n\n // Have successfully received a PaymentAck from the merchant\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Failed to communicate with the merchant\n log.error(\"Unexpected failure\", t);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{t.getClass().getCanonicalName() + \" \" + t.getMessage()}));\n }\n });\n } else {\n throw new PaymentProtocolException(\"Failed to create future from Ack\");\n }\n } catch (IOException | PaymentProtocolException e) {\n log.error(\"Unexpected failure\", e);\n CoreEvents.firePaymentSentToRequestorEvent(\n new PaymentSentToRequestorEvent(\n false,\n CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED,\n new String[]{e.getClass().getCanonicalName() + \" \" + e.getMessage()}));\n }\n } else {\n String message = \"Bitcoin not sent successfully so no payment sent to requestor\";\n log.debug(message);\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(false, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_FAILED, new String[]{message}));\n }\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "@java.lang.Override\n public boolean hasMerchantData() {\n return instance.hasMerchantData();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "public void setAdditionalBillingData(com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo additionalBillingData) {\n this.additionalBillingData = additionalBillingData;\n }", "void setPaymentInformation(String information);", "public Builder setPaymentHashBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n paymentHash_ = value;\n onChanged();\n return this;\n }", "public ThreeDSecureRequest addPaymentData(PaymentData paymentData) {\n this.paymentData = paymentData;\n return this;\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public void setMerchantCode (java.lang.String merchantCode) {\r\n\t\tthis.merchantCode = merchantCode;\r\n\t}", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Override\n\tpublic String pay(ZFTMerchantConfig merchant, ZFTOrderConfig order) throws Exception {\n\t\treturn null;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void parseParameter(byte[] data)\n {\n return; \n }", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "private MessageDraft(@NonNull final byte[] data) {\n\t\tpayload = new BinaryData(data);\n\t}", "public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }", "public java.lang.String getMerchantCode () {\r\n\t\treturn merchantCode;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "public String getMerchantTag() {\n return this.merchantTag;\n }", "byte[] getStructuredData(String messageData);", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "void setData(byte[] data) {\n this.data = data;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_CODE_PAYMENT) {\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\tPaymentConfirmation confirm = data\n\t\t\t\t\t\t.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n\t\t\t\tif (confirm != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.e(TAG, confirm.toJSONObject().toString(4));\n\t\t\t\t\t\tLog.e(TAG, confirm.getPayment().toJSONObject()\n\t\t\t\t\t\t\t\t.toString(4));\n\n\t\t\t\t\t\tString paymentId = confirm.toJSONObject()\n\t\t\t\t\t\t\t\t.getJSONObject(\"response\").getString(\"id\");\n\n\t\t\t\t\t\tString payment_client = confirm.getPayment()\n\t\t\t\t\t\t\t\t.toJSONObject().toString();\n\n\t\t\t\t\t\tLog.e(TAG, \"paymentId: \" + paymentId\n\t\t\t\t\t\t\t\t+ \", payment_json: \" + payment_client);\n\n\t\t\t\t\t\t// Now verify the payment on the server side\n\t\t\t\t\t\tverifyPaymentOnServer(paymentId, payment_client);\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tLog.e(TAG, \"an extremely unlikely failure occurred: \",\n\t\t\t\t\t\t\t\te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (resultCode == Activity.RESULT_CANCELED) {\n\t\t\t\tLog.e(TAG, \"The user canceled.\");\n\t\t\t} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"An invalid Payment or PayPalConfiguration was submitted.\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "public void setMerchantId(Long merchantId) {\n this.merchantId = merchantId;\n }", "public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public String getMerchant() {\n return _merchant;\n }", "public void setPayload(int data) {\n payload = data;\n }", "private void processPayment(ProcessPaymentEvent event) {\n try {\r\n message.setInt(\"invoiceId\", event.getInvoiceId());\r\n message.setInt(\"processId\", (event.getProcessId() == null) ? -1 : event.getProcessId());\r\n message.setInt(\"runId\", (event.getRunId() == null) ? -1 : event.getRunId());\r\n message.setStringProperty(\"type\", \"payment\");\r\n \r\n // add additional fields from the associated plug-in\r\n IAsyncPaymentParameters task = getPluggableTask(entityId, \r\n Constants.PLUGGABLE_TASK_ASYNC_PAYMENT_PARAMS);\r\n task.addParameters(message);\r\n } catch (Exception e) {\r\n throw new SessionInternalError(\"Error transforming message \", \r\n this.getClass(), e);\r\n }\r\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getMerchantId() {\n return merchantId;\n }", "public String getDeveloperPayload(){\n return developerPayload;\n }", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public abstract void msgPayment(Customer customer, Cash cash);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public Long getMerchantId()\n {\n return merchantId;\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "private static byte[] messageDataAndMetadata(Message message) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n try {\n IOHelper.writeByteArray(message.data, byteStream);\n IOHelper.writeInt(message.senderID, byteStream);\n IOHelper.writeInt(message.blockIndex, byteStream);\n IOHelper.writeInt(message.sequenceNumber, byteStream);\n IOHelper.writeLong(message.date, byteStream);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return byteStream.toByteArray();\n }", "public void generateHashFromServer(PaymentParams mPaymentParams) {\n //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.\n\n // lets create the post params\n StringBuffer postParamsBuffer = new StringBuffer();\n postParamsBuffer.append(concatParams(PayuConstants.KEY, mPaymentParams.getKey()));\n postParamsBuffer.append(concatParams(PayuConstants.AMOUNT, mPaymentParams.getAmount()));\n postParamsBuffer.append(concatParams(PayuConstants.TXNID, mPaymentParams.getTxnId()));\n postParamsBuffer.append(concatParams(PayuConstants.EMAIL, null == mPaymentParams.getEmail() ? \"\" : mPaymentParams.getEmail()));\n postParamsBuffer.append(concatParams(PayuConstants.PRODUCT_INFO, mPaymentParams.getProductInfo()));\n postParamsBuffer.append(concatParams(PayuConstants.FIRST_NAME, null == mPaymentParams.getFirstName() ? \"\" : mPaymentParams.getFirstName()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF1, mPaymentParams.getUdf1() == null ? \"\" : mPaymentParams.getUdf1()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF2, mPaymentParams.getUdf2() == null ? \"\" : mPaymentParams.getUdf2()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF3, mPaymentParams.getUdf3() == null ? \"\" : mPaymentParams.getUdf3()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF4, mPaymentParams.getUdf4() == null ? \"\" : mPaymentParams.getUdf4()));\n postParamsBuffer.append(concatParams(PayuConstants.UDF5, mPaymentParams.getUdf5() == null ? \"\" : mPaymentParams.getUdf5()));\n postParamsBuffer.append(concatParams(PayuConstants.USER_CREDENTIALS, mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials()));\n\n // for offer_key\n if (null != mPaymentParams.getOfferKey())\n postParamsBuffer.append(concatParams(PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey()));\n\n String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();\n\n // lets make an api call\n GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();\n getHashesFromServerTask.execute(postParams);\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public void setMerchantName(String merchantName) {\n this.merchantName = merchantName;\n }", "public void setData(byte data) {\n this.data = data;\n }", "public void setMerchantId (java.lang.Long merchantId) {\r\n\t\tthis.merchantId = merchantId;\r\n\t}", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setMerchantId(String merchantId) {\n this.merchantId = merchantId;\n }", "public void setData(byte[] data) {\n this.data = data;\n }", "public String getMerchantAccountCode() {\n return merchantAccountCode;\n }", "void setData(byte[] data);", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getMerchantNo();", "public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2, byte[] data) {\n this(data.length+5+4, classByte, instruction, p1, p2, data, -1); // 5 = max overhead for coding data; 4 = header bytes\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}" ]
[ "0.7631937", "0.76195043", "0.733696", "0.733696", "0.70596427", "0.70596427", "0.63906693", "0.63260716", "0.6267505", "0.6267505", "0.6243509", "0.6243509", "0.608402", "0.6083088", "0.60734", "0.5704557", "0.56059736", "0.5514029", "0.54480094", "0.54480094", "0.5415663", "0.5395114", "0.53570676", "0.5339678", "0.5329479", "0.5300158", "0.52505165", "0.5244725", "0.52277166", "0.52277166", "0.5198038", "0.5161542", "0.5161427", "0.5150951", "0.5127551", "0.5123566", "0.5119369", "0.5094767", "0.5068022", "0.5064682", "0.5063079", "0.5028807", "0.5028399", "0.502783", "0.5025913", "0.5023619", "0.5012664", "0.50010425", "0.4993671", "0.4982377", "0.49818653", "0.4972097", "0.49628812", "0.49549", "0.4954491", "0.49540997", "0.4953341", "0.49532455", "0.49496344", "0.49473065", "0.4947242", "0.4932948", "0.492636", "0.49199855", "0.49199855", "0.49199855", "0.49199855", "0.4919061", "0.49185425", "0.49093637", "0.49071303", "0.49043027", "0.48953164", "0.4890843", "0.48876825", "0.48849273", "0.4878451", "0.48718622", "0.4869632", "0.48680347", "0.48611084", "0.4855335", "0.48498198", "0.484321", "0.4837225", "0.4830462", "0.4830298", "0.48287177", "0.4828307", "0.4828307", "0.48188978", "0.48175278", "0.4812966", "0.48100978", "0.48092172", "0.48074073", "0.48025775", "0.47980908", "0.479339", "0.47921", "0.47903758" ]
0.0
-1
optional uint32 payment_details_version = 1 [default = 1];
boolean hasPaymentDetailsVersion();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getPaymentDetailsVersion();", "private void setPaymentDetailsVersion(int value) {\n bitField0_ |= 0x00000001;\n paymentDetailsVersion_ = value;\n }", "@java.lang.Override\n public int getPaymentDetailsVersion() {\n return paymentDetailsVersion_;\n }", "@java.lang.Override\n public int getPaymentDetailsVersion() {\n return instance.getPaymentDetailsVersion();\n }", "@java.lang.Override\n public boolean hasPaymentDetailsVersion() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "private void clearPaymentDetailsVersion() {\n bitField0_ = (bitField0_ & ~0x00000001);\n paymentDetailsVersion_ = 1;\n }", "@java.lang.Override\n public boolean hasPaymentDetailsVersion() {\n return instance.hasPaymentDetailsVersion();\n }", "public Builder setPaymentDetailsVersion(int value) {\n copyOnWrite();\n instance.setPaymentDetailsVersion(value);\n return this;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public CreditCard getDefaultPaymentInfo();", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "boolean hasSerializedPaymentDetails();", "String getPaymentInformation();", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public int getVersion() { return 1; }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "long getVersionNumber();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "static String m13919a(Context context, C6924p paymentStateHandler) {\n JSONObject deviceInfo = new JSONObject();\n try {\n String androidId = Secure.getString(context.getContentResolver(), \"android_id\");\n deviceInfo.put(\"deviceFingerprintVersion\", \"1.0\");\n deviceInfo.put(\"platform\", \"android\");\n deviceInfo.put(\"apiVersion\", \"4\");\n deviceInfo.put(\"osVersion\", VERSION.SDK_INT);\n deviceInfo.put(\"sdkVersion\", \"1.10.0\");\n deviceInfo.put(\"deviceIdentifier\", androidId);\n deviceInfo.put(\"locale\", C6912j.m14059a(context));\n return Base64.encodeToString(deviceInfo.toString().getBytes(Charset.forName(\"UTF-8\")), 2);\n } catch (JSONException jsonException) {\n Log.e(f12559a, \"Token could not be created\", jsonException);\n paymentStateHandler.mo22387b((Throwable) jsonException);\n return \"\";\n }\n }", "public Builder clearPaymentDetailsVersion() {\n copyOnWrite();\n instance.clearPaymentDetailsVersion();\n return this;\n }", "void setPaymentInformation(String information);", "public String getMerchantNo();", "public long getVersion(){\n return localVersion;\n }", "public void setVersion(BigDecimal version) {\r\n this.version = version;\r\n }", "public int getPaymentNum() {\n \treturn this.paymentNum;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public int getC_Payment_ID();", "public int updatePayment2(int requestId, int amount);", "@Override\n\tpublic int updatePayment(RotatePayment record) {\n\t\tList<RotatePaymentDetail> detailList = record.getDetailList();\n\t\tfor(RotatePaymentDetail detail:detailList) {\n\t\t\tif(null==detail.getId()||\"\".equals(detail.getId()))\n\t\t\t\tdetail.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\t\n\t\t}\n\t\treturn paymentDao.updatePayment(record);\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return instance.getSerializedPaymentDetails();\n }", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public long getPaymentType() {\n return paymentType;\n }", "public PaymentInformation getPaymentInformation(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.paymentinformation.v1.PaymentInformation res){\n\t\tPaymentInformation paymentInformation = new PaymentInformation();\n\t\t\n\t\tpaymentInformation.setBookingNo( res.getBookingNo() );\n\t\tif( res.getCreditCardFlag() != null ){\n\t\t\tpaymentInformation.setCreditCardFlag( res.getCreditCardFlag().charAt(0) );\n\t\t}\n\t\tif( res.getGuaranteedCheckFlag() != null ){\n\t\t\tpaymentInformation.setGuaranteedCheckFlag( res.getGuaranteedCheckFlag().charAt(0) );\n\t\t}\n\t\tif( res.getMoneyTransferFlag() != null ){\n\t\t\tpaymentInformation.setMoneyTransferFlag( res.getMoneyTransferFlag().charAt(0) );\n\t\t}\n\t\tif( res.getImApplicationInfo() != null ){\n\t\t\tpaymentInformation.setImApplicationInfo( this.getIMApplicationInfo( res.getImApplicationInfo() ) );\n\t\t}\n\t\tif( res.getGuaranteedCheck() != null ){\n\t\t\tpaymentInformation.setGuaranteedCheck( this.getGuaranteedCheck( res.getGuaranteedCheck() ) );\n\t\t}\n\t\tif( res.getMoneyTransfer() != null ){\n\t\t\tpaymentInformation.setMoneyTransfer( this.getMoneyTransfer( res.getMoneyTransfer() ) );\n\t\t}\n\t\tif( res.getCreditCard() != null ){\n\t\t\tpaymentInformation.setCreditCard( this.getCreditCard( res.getCreditCard() ) );\n\t\t}\n\t\t\n\t\treturn paymentInformation;\n\t}", "@ApiModelProperty(value = \"Software Statement version as provided by the organisation's PTC\")\n\n @Valid\n\n public BigDecimal getVersion() {\n return version;\n }", "public static String aPaymentId() {\n return \"123456\";\n }", "public void setVersion(String version){\r\n this.version = version;\r\n }", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "long getVersion();", "long getVersion();", "long getVersion();", "long getVersion();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public abstract double getVersionNumber();", "public byte[] Bldr_version() {return bldr_version;}", "public long getVersionNo() {\r\n return versionNo;\r\n }", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((BaseApplication) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "int getTcfPolicyVersion();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "Long getVersion();", "public String getVersionNumber ();", "@SuppressWarnings(\"unused\")\n private Long getVersion() {\n return version;\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "@Override\n public int getVersion() {\n return 0;\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "@Override\n public double getVersion() {\n return 0;\n }", "public String getVersion(){\r\n return version;\r\n }", "public BigDecimal getVersion() {\r\n return version;\r\n }", "int getNumberPaymentReceipt();", "private void m9894b() {\n if (this.f9489a == null) {\n throw new IllegalStateException(\"PaymentMethod not set.\");\n }\n }", "public Object getPaymentMode() {\n\t\treturn null;\n\t}", "PaymentHandler createPaymentHandler();", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return instance.hasSerializedPaymentDetails();\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "void setVersion(long version);", "void paymentOrder(long orderId);", "@Override\n\tpublic int savePayment(RotatePayment record) {\n\t\trecord.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\tDate date = Calendar.getInstance().getTime();\n\t\trecord.setReportDate(date);\n\t\tint i =(int)(Math.random()*1000);\n\t\tString serial = String.format(\"%s%s%03d\", PREFIX,date.getTime(),i);\n\t\trecord.setPaySerial(serial);\n//\t\trecord.setOperator(TokenManager.getNickname());\n\t\tList<RotatePaymentDetail> detailList = record.getDetailList();\n\t\tfor(RotatePaymentDetail detail:detailList) {\n\t\t\tdetail.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\t\t\n\t\t}\n\t\treturn paymentDao.savePayment(record);\n\t}", "long version();", "public void setVersion(String version) {\n\t\t\r\n\t}", "public short getVersion() {\n return version;\n }", "public int getVersion()\n {\n return encryptionDictionary.getInt( \"V\", 0 );\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version)\n {\n this.ver = version;\n }", "public void setC_Payment_ID (int C_Payment_ID);", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "@Override\r\n\tpublic int updatePaymentInfo(Payment payment) {\n\t\treturn session.update(\"payments.updatePayment\", payment);\r\n\t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version)\n {\n this.version = version;\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public byte getVersion() {\n return version;\n }", "@Override\n public int getVersion() {\n return 4;\n }", "public String getLBR_PartialPayment();", "public java.lang.String getPaymentHash() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n paymentHash_ = s;\n return s;\n }\n }", "public void generateHashFromSDK(PaymentParams mPaymentParams, String salt) {\n PayuHashes payuHashes = new PayuHashes();\n PostData postData = new PostData();\n\n // payment Hash;\n checksum = null;\n checksum = new PayUChecksum();\n checksum.setAmount(mPaymentParams.getAmount());\n checksum.setKey(mPaymentParams.getKey());\n checksum.setTxnid(mPaymentParams.getTxnId());\n checksum.setEmail(mPaymentParams.getEmail());\n checksum.setSalt(salt);\n checksum.setProductinfo(mPaymentParams.getProductInfo());\n checksum.setFirstname(mPaymentParams.getFirstName());\n checksum.setUdf1(mPaymentParams.getUdf1());\n checksum.setUdf2(mPaymentParams.getUdf2());\n checksum.setUdf3(mPaymentParams.getUdf3());\n checksum.setUdf4(mPaymentParams.getUdf4());\n checksum.setUdf5(mPaymentParams.getUdf5());\n\n postData = checksum.getHash();\n if (postData.getCode() == PayuErrors.NO_ERROR) {\n payuHashes.setPaymentHash(postData.getResult());\n }\n\n // checksum for payemnt related details\n // var1 should be either user credentials or default\n String var1 = mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials();\n String key = mPaymentParams.getKey();\n\n if ((postData = calculateHash(key, PayuConstants.PAYMENT_RELATED_DETAILS_FOR_MOBILE_SDK, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR) // Assign post data first then check for success\n payuHashes.setPaymentRelatedDetailsForMobileSdkHash(postData.getResult());\n //vas\n if ((postData = calculateHash(key, PayuConstants.VAS_FOR_MOBILE_SDK, PayuConstants.DEFAULT, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setVasForMobileSdkHash(postData.getResult());\n\n // getIbibocodes\n if ((postData = calculateHash(key, PayuConstants.GET_MERCHANT_IBIBO_CODES, PayuConstants.DEFAULT, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setMerchantIbiboCodesHash(postData.getResult());\n\n if (!var1.contentEquals(PayuConstants.DEFAULT)) {\n // get user card\n if ((postData = calculateHash(key, PayuConstants.GET_USER_CARDS, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR) // todo rename storedc ard\n payuHashes.setStoredCardsHash(postData.getResult());\n // save user card\n if ((postData = calculateHash(key, PayuConstants.SAVE_USER_CARD, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setSaveCardHash(postData.getResult());\n // delete user card\n if ((postData = calculateHash(key, PayuConstants.DELETE_USER_CARD, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setDeleteCardHash(postData.getResult());\n // edit user card\n if ((postData = calculateHash(key, PayuConstants.EDIT_USER_CARD, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setEditCardHash(postData.getResult());\n }\n\n if (mPaymentParams.getOfferKey() != null) {\n postData = calculateHash(key, PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey(), salt);\n if (postData.getCode() == PayuErrors.NO_ERROR) {\n payuHashes.setCheckOfferStatusHash(postData.getResult());\n }\n }\n\n if (mPaymentParams.getOfferKey() != null && (postData = calculateHash(key, PayuConstants.CHECK_OFFER_STATUS, mPaymentParams.getOfferKey(), salt)) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuHashes.setCheckOfferStatusHash(postData.getResult());\n }\n\n // we have generated all the hases now lest launch sdk's ui\n launchSdkUI(payuHashes);\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "PaymentMethod getPaymentMethod();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }" ]
[ "0.80033404", "0.76153654", "0.7087752", "0.69754475", "0.6951989", "0.6692849", "0.6600417", "0.62931544", "0.61232376", "0.61151564", "0.58272123", "0.57759625", "0.5767995", "0.56724226", "0.5670457", "0.5641753", "0.56025696", "0.55940056", "0.55900306", "0.55752903", "0.5571828", "0.55296344", "0.55157065", "0.5507845", "0.549894", "0.5485007", "0.54830855", "0.54718226", "0.5445836", "0.5445685", "0.54282063", "0.5413922", "0.5413161", "0.5411478", "0.5408061", "0.54030067", "0.5394123", "0.5390393", "0.5385908", "0.536276", "0.5358878", "0.5358878", "0.5358878", "0.5358878", "0.53573567", "0.5341767", "0.5329126", "0.5324657", "0.5323544", "0.53126985", "0.531203", "0.5310835", "0.53096783", "0.5297628", "0.5289074", "0.52851415", "0.52738047", "0.52731353", "0.5272184", "0.52671415", "0.52521473", "0.52478826", "0.5242297", "0.52420473", "0.52349424", "0.52304155", "0.52302", "0.5226005", "0.52228004", "0.5220261", "0.519926", "0.5194534", "0.5192214", "0.51874834", "0.5182522", "0.51820135", "0.51817393", "0.51817316", "0.5166491", "0.5166081", "0.51606935", "0.515869", "0.5156166", "0.5156166", "0.5154974", "0.5147997", "0.5144217", "0.5137154", "0.5137063", "0.5131639", "0.5127382", "0.5116467", "0.5116454", "0.5116454", "0.51098603", "0.51080173", "0.5107231", "0.51024103", "0.51024103", "0.51024103" ]
0.7409321
2
optional uint32 payment_details_version = 1 [default = 1];
int getPaymentDetailsVersion();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setPaymentDetailsVersion(int value) {\n bitField0_ |= 0x00000001;\n paymentDetailsVersion_ = value;\n }", "boolean hasPaymentDetailsVersion();", "@java.lang.Override\n public int getPaymentDetailsVersion() {\n return paymentDetailsVersion_;\n }", "@java.lang.Override\n public int getPaymentDetailsVersion() {\n return instance.getPaymentDetailsVersion();\n }", "@java.lang.Override\n public boolean hasPaymentDetailsVersion() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "private void clearPaymentDetailsVersion() {\n bitField0_ = (bitField0_ & ~0x00000001);\n paymentDetailsVersion_ = 1;\n }", "@java.lang.Override\n public boolean hasPaymentDetailsVersion() {\n return instance.hasPaymentDetailsVersion();\n }", "public Builder setPaymentDetailsVersion(int value) {\n copyOnWrite();\n instance.setPaymentDetailsVersion(value);\n return this;\n }", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "public CreditCard getDefaultPaymentInfo();", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "boolean hasSerializedPaymentDetails();", "String getPaymentInformation();", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public int getVersion() { return 1; }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "long getVersionNumber();", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "static String m13919a(Context context, C6924p paymentStateHandler) {\n JSONObject deviceInfo = new JSONObject();\n try {\n String androidId = Secure.getString(context.getContentResolver(), \"android_id\");\n deviceInfo.put(\"deviceFingerprintVersion\", \"1.0\");\n deviceInfo.put(\"platform\", \"android\");\n deviceInfo.put(\"apiVersion\", \"4\");\n deviceInfo.put(\"osVersion\", VERSION.SDK_INT);\n deviceInfo.put(\"sdkVersion\", \"1.10.0\");\n deviceInfo.put(\"deviceIdentifier\", androidId);\n deviceInfo.put(\"locale\", C6912j.m14059a(context));\n return Base64.encodeToString(deviceInfo.toString().getBytes(Charset.forName(\"UTF-8\")), 2);\n } catch (JSONException jsonException) {\n Log.e(f12559a, \"Token could not be created\", jsonException);\n paymentStateHandler.mo22387b((Throwable) jsonException);\n return \"\";\n }\n }", "public Builder clearPaymentDetailsVersion() {\n copyOnWrite();\n instance.clearPaymentDetailsVersion();\n return this;\n }", "void setPaymentInformation(String information);", "public String getMerchantNo();", "public long getVersion(){\n return localVersion;\n }", "public void setVersion(BigDecimal version) {\r\n this.version = version;\r\n }", "public int getPaymentNum() {\n \treturn this.paymentNum;\n }", "private void setPayment(com.dogecoin.protocols.payments.Protos.Payment value) {\n value.getClass();\n payment_ = value;\n bitField0_ |= 0x00000001;\n }", "public int getC_Payment_ID();", "public int updatePayment2(int requestId, int amount);", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return instance.getSerializedPaymentDetails();\n }", "@Override\n\tpublic int updatePayment(RotatePayment record) {\n\t\tList<RotatePaymentDetail> detailList = record.getDetailList();\n\t\tfor(RotatePaymentDetail detail:detailList) {\n\t\t\tif(null==detail.getId()||\"\".equals(detail.getId()))\n\t\t\t\tdetail.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\t\n\t\t}\n\t\treturn paymentDao.updatePayment(record);\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public long getPaymentType() {\n return paymentType;\n }", "public PaymentInformation getPaymentInformation(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.paymentinformation.v1.PaymentInformation res){\n\t\tPaymentInformation paymentInformation = new PaymentInformation();\n\t\t\n\t\tpaymentInformation.setBookingNo( res.getBookingNo() );\n\t\tif( res.getCreditCardFlag() != null ){\n\t\t\tpaymentInformation.setCreditCardFlag( res.getCreditCardFlag().charAt(0) );\n\t\t}\n\t\tif( res.getGuaranteedCheckFlag() != null ){\n\t\t\tpaymentInformation.setGuaranteedCheckFlag( res.getGuaranteedCheckFlag().charAt(0) );\n\t\t}\n\t\tif( res.getMoneyTransferFlag() != null ){\n\t\t\tpaymentInformation.setMoneyTransferFlag( res.getMoneyTransferFlag().charAt(0) );\n\t\t}\n\t\tif( res.getImApplicationInfo() != null ){\n\t\t\tpaymentInformation.setImApplicationInfo( this.getIMApplicationInfo( res.getImApplicationInfo() ) );\n\t\t}\n\t\tif( res.getGuaranteedCheck() != null ){\n\t\t\tpaymentInformation.setGuaranteedCheck( this.getGuaranteedCheck( res.getGuaranteedCheck() ) );\n\t\t}\n\t\tif( res.getMoneyTransfer() != null ){\n\t\t\tpaymentInformation.setMoneyTransfer( this.getMoneyTransfer( res.getMoneyTransfer() ) );\n\t\t}\n\t\tif( res.getCreditCard() != null ){\n\t\t\tpaymentInformation.setCreditCard( this.getCreditCard( res.getCreditCard() ) );\n\t\t}\n\t\t\n\t\treturn paymentInformation;\n\t}", "@ApiModelProperty(value = \"Software Statement version as provided by the organisation's PTC\")\n\n @Valid\n\n public BigDecimal getVersion() {\n return version;\n }", "public static String aPaymentId() {\n return \"123456\";\n }", "public void setVersion(String version){\r\n this.version = version;\r\n }", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "long getVersion();", "long getVersion();", "long getVersion();", "long getVersion();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PAYMENT) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectUpdatePayment(paymentId, rideAccept.getTotalAmount());\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n if (!utils.getPaymentStatus()) {\n showPayment();\n }\n }\n }\n\n if (requestCode == 3) {\n if (resultCode == Activity.RESULT_OK) {\n PaymentConfirmation confirm = data\n .getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);\n if (confirm != null) {\n try {\n Log.e(TAG, confirm.toJSONObject().toString(4));\n Log.e(TAG, confirm.getPayment().toJSONObject()\n .toString(4));\n\n String paymentId = confirm.toJSONObject()\n .getJSONObject(\"response\").getString(\"id\");\n\n String payment_client = confirm.getPayment()\n .toJSONObject().toString();\n\n Log.e(TAG, \"paymentId: \" + paymentId\n + \", payment_json: \" + payment_client);\n\n\n // Now verify the payment on the server side\n if (IOUtils.isNetworkAvailable(context)) {\n createJsonobjectWaitingCharge(paymentId);\n }\n utils.setPaymentStatus(true);\n\n } catch (JSONException e) {\n Log.e(TAG, \"an extremely unlikely failure occurred: \",\n e);\n }\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n Log.e(TAG, \"The user canceled.\");\n showPayment();\n\n } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {\n Log.e(TAG,\n \"An invalid Payment or PayPalConfiguration was submitted.\");\n showPayment();\n }\n }\n }", "public abstract double getVersionNumber();", "public byte[] Bldr_version() {return bldr_version;}", "public long getVersionNo() {\r\n return versionNo;\r\n }", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((BaseApplication) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }", "int getTcfPolicyVersion();", "public void setVersion(long version) {\n this.version = version;\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "Long getVersion();", "public String getVersionNumber ();", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "@SuppressWarnings(\"unused\")\n private Long getVersion() {\n return version;\n }", "@Override\n public int getVersion() {\n return 0;\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "@Override\n public double getVersion() {\n return 0;\n }", "public BigDecimal getVersion() {\r\n return version;\r\n }", "public String getVersion(){\r\n return version;\r\n }", "int getNumberPaymentReceipt();", "public Object getPaymentMode() {\n\t\treturn null;\n\t}", "private void m9894b() {\n if (this.f9489a == null) {\n throw new IllegalStateException(\"PaymentMethod not set.\");\n }\n }", "PaymentHandler createPaymentHandler();", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return instance.hasSerializedPaymentDetails();\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "void setVersion(long version);", "void paymentOrder(long orderId);", "@Override\n\tpublic int savePayment(RotatePayment record) {\n\t\trecord.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\tDate date = Calendar.getInstance().getTime();\n\t\trecord.setReportDate(date);\n\t\tint i =(int)(Math.random()*1000);\n\t\tString serial = String.format(\"%s%s%03d\", PREFIX,date.getTime(),i);\n\t\trecord.setPaySerial(serial);\n//\t\trecord.setOperator(TokenManager.getNickname());\n\t\tList<RotatePaymentDetail> detailList = record.getDetailList();\n\t\tfor(RotatePaymentDetail detail:detailList) {\n\t\t\tdetail.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\t\t\n\t\t}\n\t\treturn paymentDao.savePayment(record);\n\t}", "long version();", "public short getVersion() {\n return version;\n }", "public void setVersion(String version) {\n\t\t\r\n\t}", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion()\n {\n return encryptionDictionary.getInt( \"V\", 0 );\n }", "public void setC_Payment_ID (int C_Payment_ID);", "public void setVersion(String version)\n {\n this.ver = version;\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "@Override\r\n\tpublic int updatePaymentInfo(Payment payment) {\n\t\treturn session.update(\"payments.updatePayment\", payment);\r\n\t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version)\n {\n this.version = version;\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public byte getVersion() {\n return version;\n }", "public String getLBR_PartialPayment();", "@Override\n public int getVersion() {\n return 4;\n }", "public java.lang.String getPaymentHash() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n paymentHash_ = s;\n return s;\n }\n }", "public void generateHashFromSDK(PaymentParams mPaymentParams, String salt) {\n PayuHashes payuHashes = new PayuHashes();\n PostData postData = new PostData();\n\n // payment Hash;\n checksum = null;\n checksum = new PayUChecksum();\n checksum.setAmount(mPaymentParams.getAmount());\n checksum.setKey(mPaymentParams.getKey());\n checksum.setTxnid(mPaymentParams.getTxnId());\n checksum.setEmail(mPaymentParams.getEmail());\n checksum.setSalt(salt);\n checksum.setProductinfo(mPaymentParams.getProductInfo());\n checksum.setFirstname(mPaymentParams.getFirstName());\n checksum.setUdf1(mPaymentParams.getUdf1());\n checksum.setUdf2(mPaymentParams.getUdf2());\n checksum.setUdf3(mPaymentParams.getUdf3());\n checksum.setUdf4(mPaymentParams.getUdf4());\n checksum.setUdf5(mPaymentParams.getUdf5());\n\n postData = checksum.getHash();\n if (postData.getCode() == PayuErrors.NO_ERROR) {\n payuHashes.setPaymentHash(postData.getResult());\n }\n\n // checksum for payemnt related details\n // var1 should be either user credentials or default\n String var1 = mPaymentParams.getUserCredentials() == null ? PayuConstants.DEFAULT : mPaymentParams.getUserCredentials();\n String key = mPaymentParams.getKey();\n\n if ((postData = calculateHash(key, PayuConstants.PAYMENT_RELATED_DETAILS_FOR_MOBILE_SDK, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR) // Assign post data first then check for success\n payuHashes.setPaymentRelatedDetailsForMobileSdkHash(postData.getResult());\n //vas\n if ((postData = calculateHash(key, PayuConstants.VAS_FOR_MOBILE_SDK, PayuConstants.DEFAULT, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setVasForMobileSdkHash(postData.getResult());\n\n // getIbibocodes\n if ((postData = calculateHash(key, PayuConstants.GET_MERCHANT_IBIBO_CODES, PayuConstants.DEFAULT, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setMerchantIbiboCodesHash(postData.getResult());\n\n if (!var1.contentEquals(PayuConstants.DEFAULT)) {\n // get user card\n if ((postData = calculateHash(key, PayuConstants.GET_USER_CARDS, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR) // todo rename storedc ard\n payuHashes.setStoredCardsHash(postData.getResult());\n // save user card\n if ((postData = calculateHash(key, PayuConstants.SAVE_USER_CARD, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setSaveCardHash(postData.getResult());\n // delete user card\n if ((postData = calculateHash(key, PayuConstants.DELETE_USER_CARD, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setDeleteCardHash(postData.getResult());\n // edit user card\n if ((postData = calculateHash(key, PayuConstants.EDIT_USER_CARD, var1, salt)) != null && postData.getCode() == PayuErrors.NO_ERROR)\n payuHashes.setEditCardHash(postData.getResult());\n }\n\n if (mPaymentParams.getOfferKey() != null) {\n postData = calculateHash(key, PayuConstants.OFFER_KEY, mPaymentParams.getOfferKey(), salt);\n if (postData.getCode() == PayuErrors.NO_ERROR) {\n payuHashes.setCheckOfferStatusHash(postData.getResult());\n }\n }\n\n if (mPaymentParams.getOfferKey() != null && (postData = calculateHash(key, PayuConstants.CHECK_OFFER_STATUS, mPaymentParams.getOfferKey(), salt)) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuHashes.setCheckOfferStatusHash(postData.getResult());\n }\n\n // we have generated all the hases now lest launch sdk's ui\n launchSdkUI(payuHashes);\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "PaymentMethod getPaymentMethod();", "public Version version()\n/* */ {\n/* 518 */ return PackageVersion.VERSION;\n/* */ }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }" ]
[ "0.7615326", "0.7410622", "0.7088494", "0.6975793", "0.6953307", "0.66936916", "0.6601788", "0.62917477", "0.6124444", "0.61168504", "0.582807", "0.5777196", "0.57698876", "0.5674107", "0.5671132", "0.5642232", "0.56046927", "0.5595802", "0.55893826", "0.55744565", "0.5571356", "0.55305934", "0.55155885", "0.55086255", "0.54994094", "0.548515", "0.54823804", "0.54722375", "0.5446413", "0.5446033", "0.5426635", "0.54149896", "0.54134554", "0.54114383", "0.5409497", "0.5403855", "0.5394232", "0.53908634", "0.5384754", "0.53627515", "0.5358914", "0.5358914", "0.5358914", "0.5358914", "0.53581226", "0.53411514", "0.5329674", "0.5324385", "0.5322615", "0.531181", "0.53107846", "0.5310316", "0.5308829", "0.5297846", "0.5289529", "0.5285155", "0.5273382", "0.52730614", "0.5272987", "0.52676976", "0.5253469", "0.52482396", "0.52424824", "0.5242384", "0.5233856", "0.5232086", "0.52307016", "0.5226022", "0.52247953", "0.52215016", "0.5198114", "0.51938814", "0.51917595", "0.51878035", "0.51814425", "0.51811916", "0.5180288", "0.518016", "0.5166862", "0.5165169", "0.5160813", "0.51585674", "0.51547694", "0.51547694", "0.51535845", "0.5148061", "0.51435596", "0.51385784", "0.5137289", "0.51326686", "0.51273745", "0.51149565", "0.51147026", "0.51147026", "0.5109668", "0.5108239", "0.5107287", "0.51018167", "0.51009524", "0.51009524" ]
0.80034465
0
none / x509+sha256 / x509+sha1 optional string pki_type = 2 [default = "none"];
boolean hasPkiType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPkiType();", "private void setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n pkiType_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "@java.lang.Override\n public java.lang.String getPkiType() {\n return pkiType_;\n }", "private void setPkiType(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n pkiType_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(pkiType_);\n }", "com.google.protobuf.ByteString\n getPkiTypeBytes();", "@java.lang.Override\n public java.lang.String getPkiType() {\n return instance.getPkiType();\n }", "private void clearPkiType() {\n bitField0_ = (bitField0_ & ~0x00000002);\n pkiType_ = getDefaultInstance().getPkiType();\n }", "public Builder setPkiType(\n java.lang.String value) {\n copyOnWrite();\n instance.setPkiType(value);\n return this;\n }", "@java.lang.Override\n public boolean hasPkiType() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return instance.getPkiTypeBytes();\n }", "com.google.protobuf.ByteString getPkiData();", "private void setPkiData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000004;\n pkiData_ = value;\n }", "@java.lang.Override\n public boolean hasPkiType() {\n return instance.hasPkiType();\n }", "public static void main(String[] args) throws IcbcApiException {\n\t\tUiIcbcClient client = new UiIcbcClient(APP_ID,IcbcConstants.SIGN_TYPE_RSA,\n\t\t\t\t\"MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJCoQe/O+uqpOtyE/2CUjD7wosZw8jI1AlLNJCllOmlX+obA6h97b0JsEL0SjMCAR3xJyw7MKLqkcy5qQ/bBgw2XSrodmjzOVqfT1OXRii0xw0HiVkHR4cEWnEAAdfo0lDc4iuzCIQrnT5gM0+U+qeSV6JFfwVRjgYzBdHQRPCf1AgMBAAECgYAdQUoEe7GXH5591o/nMmOinvvscg8pRDsyD7bOgGBtyZMrCXzP3SDFKCHCeyvoColqg2oDlhpulK+OpYMVNlGQcO4eubOJp9MUc3m4A9RxkVr3dsVrmygM5czPfWHAPVQ4dECDruBJn9zoo1ci0myRTh4KSCq6SxpCE0Pbf3j7iQJBAOdMPFRfOkSQ1hsN9Mg4jd9on8r7+mF8gFPhkNI6qvEKw/prmU3obUWvZL42vRlLOQyyB92mBF24PStR/B6CjR8CQQCgGz0VoqCplurSCapGdgX3D7bNSDtMUmaLJYJxih8v+zghP0YtVgDeV3NjogVjOlz8/9Rebo0PoFcqyJnNA1RrAkEAul3dBoasZm7ldWsrXuDiv66HgoDB4Cb3J59Kl3oaHpp0CqUEI5gx48JNRE7K00SfNTGF0Pxh7Dn1X6Bxqwu6NQJADrdyPfLc4bnFi9jnleJzWepP2z6wdKt+UXv5KYaQp1BoMGYohTJKkiVnrdjOtfg/Y+IAG03+GVmbqYsW2AleUQJBANYQklohKtsmq8ptX3as6hjcuXcTpc2DSpVeOnCueNv107+dDJ+K14tbiVYzF3tkHBNMRkGtr6EuGKJ+A63sJ00=\",\n\t\t\t\tIcbcConstants.CHARSET_UTF8,IcbcConstants.ENCRYPT_TYPE_AES, \"xMh0xFsG7G80ziePFdnT8g==\");\n\t\tEaccountManageRequestV1 request = new EaccountManageRequestV1();\t\t\n\t\trequest.setServiceUrl(\"http://122.64.61.111:8081/ui/eaccount/manage/V1\");///\n\t\tEaccountManageRequestBizV1 bizContent = new EaccountManageRequestBizV1();\n\t\tbizContent.setMobileNo(\"13703878410\");//选输,手机号\n\t\tbizContent.setIdcode(\"128440810108044\");//选输,身份证号\n\t\tbizContent.setName(URLEncoder.encode(\"芡悠\"));//选输,用户姓名\n\t\tbizContent.setUserId(\"128440810108044\");//必输,需控制不能为空,用户唯一标识,送身份证号\n\t\tbizContent.setBacAddr(URLEncoder.encode(\"http://www.test.com\"));//选输,回调地址\n\t\tbizContent.setEpayflag(\"0\");//选输,工银e支付标志,0-短信、1-静态密码,集成客户端SDK的方式能送0-短信或1-静态密码,非APP方式只能送0-短信,不送默认为0-短信\n\t\t\n\t\tbizContent.setCorpAppid(APP_ID);//外公司合作方送APP_ID的值,行内应用如e支付等送外公司合作方的APPID\n\t\tlong systime = System.currentTimeMillis(); // 现时间戳\t\t\n\t\tString orderTimeStamp=new Long(systime).toString();\n\t\t\n\t\tSystem.out.println(\"orderTimeStamp:\"+orderTimeStamp);\n\t\tbizContent.setOrderTimeStamp(orderTimeStamp);//生成请求的时间,必输\n\t\t\n\t\tbizContent.setZoneno(\"00200\");//地区号号,选输,5位数字,上送值联系对接分行提供\n\t\tbizContent.setBrno(\"00260\");//网点号,选输,5位数字,上送值联系对接分行提供\n\t\t\n\t\trequest.setBizContent(bizContent);\n\t\tSystem.out.println(client.buildPostForm(request));// 实际调用时的相关返回结果及异常处理,请自行添加\n\t}", "dkk mo4509g();", "private void generatePrivacyKeyPair(boolean clientMode) throws IOException, UnsupportedEncodingException, NoSuchAlgorithmException, SaslException {\n byte[] ccmagic = CLIENT_CONF_MAGIC.getBytes(encoding);\n byte[] scmagic = SVR_CONF_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n int n;\n if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_40])) {\n n = 5;\n } else if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_56])) {\n n = 7;\n } else {\n n = 16;\n }\n byte[] keyBuffer = new byte[n + ccmagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, n);\n System.arraycopy(ccmagic, 0, keyBuffer, n, ccmagic.length);\n md5.update(keyBuffer);\n byte[] Kcc = md5.digest();\n System.arraycopy(scmagic, 0, keyBuffer, n, scmagic.length);\n md5.update(keyBuffer);\n byte[] Kcs = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST24:Kcc: \", Kcc);\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST25:Kcs: \", Kcs);\n }\n byte[] myKc;\n byte[] peerKc;\n if (clientMode) {\n myKc = Kcc;\n peerKc = Kcs;\n } else {\n myKc = Kcs;\n peerKc = Kcc;\n }\n try {\n SecretKey encKey;\n SecretKey decKey;\n if (negotiatedCipher.indexOf(CIPHER_TOKENS[RC4]) > -1) {\n encCipher = Cipher.getInstance(\"RC4\");\n decCipher = Cipher.getInstance(\"RC4\");\n encKey = new SecretKeySpec(myKc, \"RC4\");\n decKey = new SecretKeySpec(peerKc, \"RC4\");\n encCipher.init(Cipher.ENCRYPT_MODE, encKey);\n decCipher.init(Cipher.DECRYPT_MODE, decKey);\n } else if ((negotiatedCipher.equals(CIPHER_TOKENS[DES])) || (negotiatedCipher.equals(CIPHER_TOKENS[DES3]))) {\n String cipherFullname, cipherShortname;\n if (negotiatedCipher.equals(CIPHER_TOKENS[DES])) {\n cipherFullname = \"DES/CBC/NoPadding\";\n cipherShortname = \"des\";\n } else {\n cipherFullname = \"DESede/CBC/NoPadding\";\n cipherShortname = \"desede\";\n }\n encCipher = Cipher.getInstance(cipherFullname);\n decCipher = Cipher.getInstance(cipherFullname);\n encKey = makeDesKeys(myKc, cipherShortname);\n decKey = makeDesKeys(peerKc, cipherShortname);\n IvParameterSpec encIv = new IvParameterSpec(myKc, 8, 8);\n IvParameterSpec decIv = new IvParameterSpec(peerKc, 8, 8);\n encCipher.init(Cipher.ENCRYPT_MODE, encKey, encIv);\n decCipher.init(Cipher.DECRYPT_MODE, decKey, decIv);\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST26:\" + negotiatedCipher + \" IVcc: \", encIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST27:\" + negotiatedCipher + \" IVcs: \", decIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST28:\" + negotiatedCipher + \" encryption key: \", encKey.getEncoded());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST29:\" + negotiatedCipher + \" decryption key: \", decKey.getEncoded());\n }\n }\n } catch (InvalidKeySpecException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported key \" + \"specification used.\", e);\n } catch (InvalidAlgorithmParameterException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid cipher \" + \"algorithem parameter used to create cipher instance\", e);\n } catch (NoSuchPaddingException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported \" + \"padding used for chosen cipher\", e);\n } catch (InvalidKeyException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid data \" + \"used to initialize keys\", e);\n }\n }", "public Builder setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPkiTypeBytes(value);\n return this;\n }", "java.lang.String getPublicEciesKey();", "OpenSSLKey mo134201a();", "public abstract String getSigAlgOID();", "private void generateIntegrityKeyPair(boolean clientMode) throws UnsupportedEncodingException, IOException, NoSuchAlgorithmException {\n byte[] cimagic = CLIENT_INT_MAGIC.getBytes(encoding);\n byte[] simagic = SVR_INT_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n byte[] keyBuffer = new byte[H_A1.length + cimagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, H_A1.length);\n System.arraycopy(cimagic, 0, keyBuffer, H_A1.length, cimagic.length);\n md5.update(keyBuffer);\n byte[] Kic = md5.digest();\n System.arraycopy(simagic, 0, keyBuffer, H_A1.length, simagic.length);\n md5.update(keyBuffer);\n byte[] Kis = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST12:Kic: \", Kic);\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST13:Kis: \", Kis);\n }\n if (clientMode) {\n myKi = Kic;\n peerKi = Kis;\n } else {\n myKi = Kis;\n peerKi = Kic;\n }\n }", "public final String mo1957a() {\n return \"type.googleapis.com/google.crypto.tink.EciesAeadHkdfPublicKey\";\n }", "private native String native_ks(long cookie, byte[] userKey);", "@Override\n public ConcurrentContentSigner newSigner(\n String type, SignerConf conf, X509Cert[] certificateChain)\n throws ObjectCreationException {\n type = type.toLowerCase(Locale.ROOT);\n if (!types.contains(type)) {\n throw new ObjectCreationException(\"unknown signer type \" + type);\n }\n\n String str = conf.getConfValue(\"parallelism\");\n int parallelism = 20;\n if (str != null) {\n try {\n parallelism = Integer.parseInt(str);\n } catch (NumberFormatException ex) {\n throw new ObjectCreationException(\"invalid parallelism \" + str);\n }\n\n if (parallelism < 1) {\n throw new ObjectCreationException(\"invalid parallelism \" + str);\n }\n }\n\n str = conf.getConfValue(\"alias\");\n if (str == null) {\n throw new ObjectCreationException(\"alias is not specified\");\n }\n int keyId = Integer.parseInt(str);\n\n String algoName = conf.getConfValue(\"algo\");\n if (algoName == null) {\n throw new ObjectCreationException(\"algo is not specified\");\n }\n\n try {\n InitStatus initStatus = init(type);\n if (initStatus.status.get() != 1) {\n throw new ObjectCreationException(initStatus.details);\n }\n\n SignAlgo algo = SignAlgo.getInstance(algoName);\n String keyAlgoName;\n String bcKeyAlgoName;\n if (algo.isSM2SigAlgo()) {\n keyAlgoName = \"SM2\";\n bcKeyAlgoName = \"EC\";\n } else if (algo.isRSAPkcs1SigAlgo() || algo.isRSAPSSSigAlgo()) {\n keyAlgoName = \"RSA\";\n bcKeyAlgoName = \"RSA\";\n } else if (algo.isECDSASigAlgo() || algo.isPlainECDSASigAlgo()) {\n keyAlgoName = \"EC\";\n bcKeyAlgoName = \"EC\";\n } else {\n throw new ObjectCreationException(\"unsupported algo \" + algoName);\n }\n\n Provider provider = providerMap.get(type);\n\n // Method to read create PrivateKey and PublicKey object.\n // SANSEC use KeyPairGenerator.generateKeyPair to read the keypair-\n // No new keypair will be generated here.\n KeyPairGenerator kpGen = KeyPairGenerator.getInstance(keyAlgoName, provider);\n kpGen.initialize(keyId << 16);\n KeyPair kp = kpGen.generateKeyPair();\n\n PublicKey publicKey = KeyFactory.getInstance(bcKeyAlgoName, \"BC\")\n .generatePublic(new X509EncodedKeySpec(kp.getPublic().getEncoded()));\n\n return new JceSignerBuilder(kp.getPrivate(), publicKey, certificateChain, provider)\n .createSigner(algo, parallelism);\n } catch (GeneralSecurityException | XiSecurityException ex) {\n throw new ObjectCreationException(ex.getMessage(), ex);\n }\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv xgetCryptProviderType();", "liubaninc.m0.pki.CertificatesOuterClass.CertificatesOrBuilder getCertificatesOrBuilder();", "liubaninc.m0.pki.CertificatesOuterClass.CertificatesOrBuilder getCertificatesOrBuilder();", "boolean hasPkiData();", "@java.lang.Override\n public com.google.protobuf.ByteString getPkiData() {\n return pkiData_;\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public interface PublicKey {\n\n /**\n * Returns id of the public key.\n *\n * @return id of key\n */\n String getId();\n\n /**\n * Returns ids from gpg sub keys.\n *\n * @return sub key ids\n * @since 2.19.0\n */\n default Set<String> getSubkeys() {\n return Collections.emptySet();\n }\n\n /**\n * Returns the username of the owner or an empty optional.\n *\n * @return owner or empty optional\n */\n Optional<String> getOwner();\n\n /**\n * Returns raw of the public key.\n *\n * @return raw of key\n */\n String getRaw();\n\n /**\n * Returns the contacts of the publickey.\n *\n * @return owner or empty optional\n */\n Set<Person> getContacts();\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param stream stream of data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n boolean verify(InputStream stream, byte[] signature);\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param data data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n default boolean verify(byte[] data, byte[] signature) {\n return verify(new ByteArrayInputStream(data), signature);\n }\n}", "public String mo34971a() {\n return \"SHA-384\";\n }", "public interface JsonKey {\n\n String CLASS = \"class\";\n String DATA = \"data\";\n String EKS = \"eks\";\n String ID = \"id\";\n String LEVEL = \"level\";\n String MESSAGE = \"message\";\n String METHOD = \"method\";\n String REQUEST_MESSAGE_ID = \"msgId\";\n String STACKTRACE = \"stacktrace\";\n String VER = \"ver\";\n String OK = \"ok\";\n String LOG_LEVEL = \"logLevel\";\n String ERROR = \"error\";\n String EMPTY_STRING = \"\";\n String RESPONSE = \"response\";\n String ADDRESS = \"address\";\n String KEY = \"key\";\n String ERROR_MSG = \"error_msg\";\n String ATTRIBUTE = \"attribute\";\n String ERRORS = \"errors\";\n String SUCCESS = \"success\";\n\n String CERTIFICATE = \"certificate\";\n String RECIPIENT_NAME = \"recipientName\";\n String COURSE_NAME = \"courseName\";\n String NAME = \"name\";\n String HTML_TEMPLATE = \"htmlTemplate\";\n String TAG = \"tag\";\n String ISSUER = \"issuer\";\n String URL = \"url\";\n String SIGNATORY_LIST = \"signatoryList\";\n String DESIGNATION = \"designation\";\n String SIGNATORY_IMAGE = \"image\";\n\n String DOMAIN_URL = \"sunbird_cert_domain_url\";\n String ASSESSED_DOMAIN = \"ASSESSED_DOMAIN\";\n String BADGE_URL = \"BADGE_URL\";\n String ISSUER_URL = \"ISSUER_URL\";\n String TEMPLATE_URL = \"TEMPLATE_URL\";\n String CONTEXT = \"CONTEXT\";\n String VERIFICATION_TYPE = \"VERIFICATION_TYPE\";\n String SIGNATORY_EXTENSION = \"SIGNATORY_EXTENSION\";\n String RECIPIENT_EMAIl = \"recipientEmail\";\n String RECIPIENT_PHONE = \"recipientPhone\";\n String RECIPIENT_ID = \"recipientId\";\n String VALID_FROM = \"validFrom\";\n String EXPIRY = \"expiry\";\n String OLD_ID = \"oldId\";\n String PUBLIC_KEY = \"publicKey\";\n String DESCRIPTION = \"description\";\n String LOGO = \"logo\";\n String ISSUE_DATE = \"issueDate\";\n String USER = \"user\";\n String CERTIFICATE_NAME = \"name\";\n\n String CONTAINER_NAME = \"CONTAINER_NAME\";\n String CLOUD_STORAGE_TYPE = \"CLOUD_STORAGE_TYPE\";\n String CLOUD_UPLOAD_RETRY_COUNT = \"CLOUD_UPLOAD_RETRY_COUNT\";\n String AZURE_STORAGE_SECRET = \"AZURE_STORAGE_SECRET\";\n String AZURE_STORAGE_KEY = \"AZURE_STORAGE_KEY\";\n String ACCESS_CODE_LENGTH = \"ACCESS_CODE_LENGTH\";\n String ORG_ID = \"orgId\";\n String KEYS = \"keys\";\n String ENC_SERVICE_URL = \"sunbird_cert_enc_service_url\";\n String SIGN_HEALTH_CHECK_URL = \"SIGN_HEALTH_CHECK_URL\";\n String SIGN_URL = \"SIGN_URL\";\n String SIGN_VERIFY_URL = \"SIGN_VERIFY_URL\";\n String SIGN_CREATOR = \"SIGN_CREATOR\";\n String SIGN = \"sign\";\n String VERIFY = \"verify\";\n String KEY_ID = \"keyId\";\n String JSON_URL = \"jsonUrl\";\n String PDF_URL = \"pdfUrl\";\n String UNIQUE_ID = \"id\";\n String GENERATE_CERT = \"generateCert\";\n String PUBLIC_KEY_URL = \"PUBLIC_KEY_URL\";\n String GET_SIGN_URL = \"getSignUrl\";\n String SIGNED_URL = \"signedUrl\";\n\n String ACCESS_CODE = \"accessCode\";\n String JSON_DATA = \"jsonData\";\n String SLUG = \"sunbird_cert_slug\";\n}", "liubaninc.m0.pki.CertificatesOuterClass.Certificates getCertificates();", "liubaninc.m0.pki.CertificatesOuterClass.Certificates getCertificates();", "BigInteger getCEP();", "java.lang.String getPubkey();", "public void setCertiType(java.lang.String certiType) {\n this.certiType = certiType;\n }", "public abstract String getSigAlgName();", "@Schema(required = true, description = \"Contract type (KIP-7, KIP-17, ERC-20, ERC-721)\")\n public String getType() {\n return type;\n }", "public ProfileKey getProfileKey(String username, String type) throws ProfileKeyManagerPersistenceException {\n ParameterHelpers.checkParameter(username, \"username\");\n\n boolean registered = checkType(type);\n\n Connection connection = getConnection();\n\n try {\n return getProfileKey(connection, username, type, registered);\n } finally {\n closeConnection(connection);\n }\n }", "protected CryptoProvider() {\n\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public Builder clearPkiType() {\n copyOnWrite();\n instance.clearPkiType();\n return this;\n }", "private X509Certificate generateSelfSignedCertificateWithFakeSignature(PublicKey publicKey) throws IOException, CertificateParsingException {\n byte[] signature;\n AlgorithmIdentifier sigAlgId;\n V3TBSCertificateGenerator tbsGenerator = new V3TBSCertificateGenerator();\n int i = this.mKeymasterAlgorithm;\n if (i == 1) {\n signature = new byte[1];\n sigAlgId = new AlgorithmIdentifier(PKCSObjectIdentifiers.sha256WithRSAEncryption, DERNull.INSTANCE);\n } else if (i == 3) {\n sigAlgId = new AlgorithmIdentifier(X9ObjectIdentifiers.ecdsa_with_SHA256);\n ASN1EncodableVector v = new ASN1EncodableVector();\n v.add(new DERInteger(0));\n v.add(new DERInteger(0));\n signature = new DERSequence().getEncoded();\n } else {\n throw new ProviderException(\"Unsupported key algorithm: \" + this.mKeymasterAlgorithm);\n }\n byte[] signature2 = signature;\n ASN1InputStream publicKeyInfoIn = new ASN1InputStream(publicKey.getEncoded());\n tbsGenerator.setSubjectPublicKeyInfo(SubjectPublicKeyInfo.getInstance(publicKeyInfoIn.readObject()));\n publicKeyInfoIn.close();\n tbsGenerator.setSerialNumber(new ASN1Integer(this.mSpec.getCertificateSerialNumber()));\n X509Principal subject = new X509Principal(this.mSpec.getCertificateSubject().getEncoded());\n tbsGenerator.setSubject(subject);\n tbsGenerator.setIssuer(subject);\n tbsGenerator.setStartDate(new Time(this.mSpec.getCertificateNotBefore()));\n tbsGenerator.setEndDate(new Time(this.mSpec.getCertificateNotAfter()));\n tbsGenerator.setSignature(sigAlgId);\n TBSCertificate tbsCertificate = tbsGenerator.generateTBSCertificate();\n ASN1EncodableVector result = new ASN1EncodableVector();\n result.add(tbsCertificate);\n result.add(sigAlgId);\n result.add(new DERBitString(signature2));\n return new X509CertificateObject(Certificate.getInstance(new DERSequence(result)));\n throw result;\n }", "public interface Key {\n\n String SHARE_KEY = \"userIndo\";//用户信息\n String SHARE_USER_ID = \"userId\";//用户账号\n\n}", "private byte[] getKey(KeyType keytype) {\n byte[] key = new byte[1];\n key[0] = (byte) keytype.ordinal();\n return key;\n }", "@ParameterizedTest\n @EnumSource(KeyType.class)\n void testMissingJWTPublicKey(KeyType keyType) throws NoSuchAlgorithmException {\n final Pair<String, PrivateKey> keyPair = generateKeypair(keyType);\n\n final String jwt = Jwts.builder()\n .setHeaderParam(\"kid\", UUID.randomUUID())\n .setAudience(String.format(\"%sToken/auth\", \"here\"))\n .setIssuer(\"macaroon\")\n .setSubject(\"macaroon\")\n .setId(UUID.randomUUID().toString())\n .setExpiration(Date.from(Instant.now().plus(5, ChronoUnit.MINUTES)))\n .signWith(keyPair.getRight(), APIAuthHelpers.getSigningAlgorithm(keyType))\n .compact();\n\n // Submit the JWT\n Response response = RESOURCE.target(\"/v1/Token/auth\")\n .queryParam(\"scope\", \"system/*.*\")\n .queryParam(\"grant_type\", \"client_credentials\")\n .queryParam(\"client_assertion_type\", TokenResource.CLIENT_ASSERTION_TYPE)\n .queryParam(\"client_assertion\", jwt)\n .request()\n .post(Entity.entity(\"\", MediaType.APPLICATION_FORM_URLENCODED));\n\n assertEquals(401, response.getStatus(), \"Should be unauthorized\");\n assertTrue(response.readEntity(String.class).contains(\"Cannot find public key\"), \"Should have correct exception\");\n }", "liubaninc.m0.pki.CertificateOuterClass.Certificate getCertificate();", "public ECP getPublicKGCKey(){return pkS;}", "@Override\n public byte[] generateKey() throws ProtocolException, IOException {\n BigInteger p, q, n, e, d;\n Polynomial pol;\n do {\n // we want e such that GCD(e, phi(p*q))=1. as e is actually fixed\n // below, then we need to search for suitable p and q\n p = generateCofactor();\n q = generateCofactor();\n n = computeModulus(p, q);\n e = generatePublicExponent(p, q);\n } while (!verifyCofactors(p, q, e));\n d = computePrivateExponent(p, q, e);\n pol = generatePolynomial(p, q, d);\n BigInteger[] shares = ProtocolUtil.generateShares(pol, tparams.getParties());\n RSAPrivateCrtKey[] packedShares = packShares(e, shares, n);\n try {\n storeShares(packedShares);\n } catch (SmartCardException ex) {\n throw new ProtocolException(\n \"Error while communicating with smart card: \" + ex.toString());\n }\n\n RSAPublicKey pk = SignatureUtil.RSA.paramsToRSAPublicKey(e, n);\n return pk.getEncoded();\n }", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public String getTlsKey();", "@Test\n\tpublic void testSecuirtyConfigsOperations() throws NoSuchAlgorithmException {\n\t\t// Generate and store keys for the first time\n\t\tServerKeyPairs serverKeyPairs1 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair1 = serverKeyPairs1.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair1 = serverKeyPairs1.getSignatureKeyPair();\n\n\t\t// Initialize a new serverKeyPairs to test that it will only read\n\t\t// previously generated keys\n\t\tServerKeyPairs serverKeyPairs2 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair2 = serverKeyPairs2.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair2 = serverKeyPairs2.getSignatureKeyPair();\n\n\t\tassertEquals(\"Wrong loaded encryption public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded encryption private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getPrivateExponent());\n\n\t\tassertEquals(\"Wrong loaded signature public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded signature private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getPrivateExponent());\n\t}", "org.openxmlformats.schemas.presentationml.x2006.main.STAlgType.Enum getCryptAlgorithmType();", "public PIEBankPlatinumKey() {\n\tsuper();\n}", "private KeyPair generateKeyPair() {\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n keyGen.initialize(2048, random);\n return keyGen.generateKeyPair();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n return null;\n }", "private void setSignatureType(byte type) \r\n \t //@ requires signatureType |-> ?theSignatureType &*& theSignatureType != null &*& theSignatureType.length == 1 &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(?ta) &*& foreachp(ta, transient_byte_array);\r\n \t //@ ensures signatureType |-> theSignatureType &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(ta) &*& foreachp(ta, transient_byte_array);\r\n\t{\r\n\t\t//@ transient_byte_arrays_mem(theSignatureType);\r\n\t\t//@ foreachp_remove(theSignatureType, ta);\r\n\t\t//@ open transient_byte_array(theSignatureType);\r\n\t\tsignatureType[0] = type;\r\n\t\t//@ close transient_byte_array(theSignatureType);\r\n\t\t//@ foreachp_unremove(theSignatureType, ta);\r\n\t}", "public static void main(String[] args) {\n KeyPairGenerator keygen = null;\n try {\n keygen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secrand = new SecureRandom();\n // secrand.setSeed(\"17\".getBytes());//初始化随机产生器\n keygen.initialize(2048, secrand);\n KeyPair keys = keygen.genKeyPair();\n PublicKey publicKey = keys.getPublic();\n PrivateKey privateKey = keys.getPrivate();\n String pubKey = Base64.encode(publicKey.getEncoded());\n String priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n System.out.println(\"priKey = \" + new String(priKey));\n\n/*\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(pubkey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n pubKey = Base64.encode(publicKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n*/\n\n/*\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(prikey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = keyFactory.generatePrivate(keySpec);\n priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"priKey = \" + new String(priKey));\n*/\n //(N,e)是公钥\n RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;\n System.out.println(\"RSAPublicKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPublicKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPublicKey.getModulus().toString());//n\n System.out.println(\"PublicExponent.length=\" +\n rsaPublicKey.getPublicExponent().bitLength());\n System.out.println(\"PublicExponent=\" + rsaPublicKey.getPublicExponent().toString());//e\n\n\n //(N,d)是私钥\n RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;\n System.out.println(\"RSAPrivateKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPrivateKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPrivateKey.getModulus().toString());//n\n System.out.println(\"PrivateExponent.length=\" +\n rsaPrivateKey.getPrivateExponent().bitLength());\n System.out.println(\"PrivateExponent=\" + rsaPrivateKey.getPrivateExponent().toString());//d\n\n String encodeData = encode(\" public static String encode(String toEncode,String D, String N) {\\n\" +\n \" // BigInteger var2 = new BigInteger(\\\"17369712262290647732768133445861332449863405383733306695896586821166245382729380222118948668590047591903813382253186640467063376463309880263824085810383552963627855603429835060435976633955217307266714318344160886538360012623239010786668755679438900124601074924850696725233212494777766999123952653273738958617798460338184668049410136792403729341479373919634041235053823478242208651592611582439749292909499663165109004083820192135244694907138372731716013807836312280426304459316963033144149631900633817073029029413556757588486052978078614048837784810650766996280232645714319416096306667876390555673421669667406990886847\\\");\\n\" +\n \" // BigInteger var3 = new BigInteger(\\\"65537\\\");\\n\" +\n \" int MAX_ENCRYPT_BLOCK = 128;\\n\" +\n \" int offSet = 0;\\n\" +\n \" byte[] cache;\\n\" +\n \" int i = 0;\\n\" +\n \" ByteArrayOutputStream out = new ByteArrayOutputStream();\\n\" +\n \" try {\\n\" +\n \" RSAPrivateKeySpec rsaPrivateKeySpec = new java.security.spec.RSAPrivateKeySpec(new BigInteger(N),new BigInteger(D));\\n\" +\n \" KeyFactory keyFactory = java.security.KeyFactory.getInstance(\\\"RSA\\\");\\n\" +\n \" PrivateKey privateKey = keyFactory.generatePrivate(rsaPrivateKeySpec);\\n\" +\n \" Cipher cipher = javax.crypto.Cipher.getInstance(\\\"RSA\\\");\\n\" +\n \" cipher.init(Cipher.ENCRYPT_MODE,privateKey);\\n\" +\n \"\\n\" +\n \" byte[] data = toEncode.getBytes(StandardCharsets.UTF_8);\\n\" +\n \" int inputLen = data.length;\\n\" +\n \" // 对数据分段加密\\n\" +\n \" while (inputLen - offSet > 0) {\\n\" +\n \" if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {\\n\" +\n \" cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);\\n\" +\n \" } else {\\n\" +\n \" cache = cipher.doFinal(data, offSet, inputLen - offSet);\\n\" +\n \" }\\n\" +\n \" out.write(cache, 0, cache.length);\\n\" +\n \" i++;\\n\" +\n \" offSet = i * MAX_ENCRYPT_BLOCK;\\n\" +\n \" }\\n\" +\n \" byte[] datas = out.toByteArray();\\n\" +\n \" out.close();\\n\" +\n \"\\n\" +\n \" //byte[] datas = datas = cipher.doFinal(toEncode.getBytes());\\n\" +\n \" datas = org.apache.commons.codec.binary.Base64.encodeBase64(datas);\\n\" +\n \" return new String(datas,StandardCharsets.UTF_8);\\n\" +\n \" } catch (NoSuchAlgorithmException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeySpecException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (NoSuchPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeyException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (BadPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IllegalBlockSizeException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IOException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" }\\n\" +\n \" return null;\\n\" +\n \" }\",rsaPrivateKey.getPrivateExponent().toString(),rsaPrivateKey.getModulus().toString());\n String decodeData = decode(encodeData,rsaPublicKey.getPublicExponent().toString(),rsaPublicKey.getModulus().toString());\n\n System.out.println(encodeData);\n System.out.println(decodeData);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }/* catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }*/\n }", "public MEKeyTool() {\n keystore = new PublicKeyStoreBuilderBase();\n }", "public PrivateKeyType getPivateKeyType() {\n return PrivateKeyType.SAPLING_EXTENED_SPEND_KEY;\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STAlgType xgetCryptAlgorithmType();", "public final KeyPair generateKeyPair() {\n\t\tif (SECURE_RANDOM == null) {\n\t\t\tSECURE_RANDOM = new SecureRandom();\n\t\t}\n\t\t// for p and q we divide the bits length by 2 , as they create n, \n\t\t// which is the modulus and actual key size is depend on it\n\t\tBigInteger p = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\tBigInteger q;\n\t\tdo {\n\t\t\tq = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\t} while (q.compareTo(p) == 0);\n\n\t\t// lambda = lcm(p-1, q-1) = (p-1)*(q-1)/gcd(p-1, q-1)\n\t\tBigInteger lambda = p.subtract(BigInteger.ONE).multiply(q\n\t\t\t\t.subtract(BigInteger.ONE)).divide(p.subtract(BigInteger.ONE)\n\t\t\t\t.gcd(q.subtract(BigInteger.ONE)));\n\n\t\tBigInteger n = p.multiply(q); // n = p*q\n\t\tBigInteger nsquare = n.multiply(n); // nsquare = n*n\n\t\tBigInteger g;\n\t\tdo {\n\t\t\t// generate g, a random integer in Z*_{n^2}\n\t\t\tdo {\n\t\t\t\tg = new BigInteger(STRENGTH, 64, SECURE_RANDOM);\n\t\t\t} while (g.compareTo(nsquare) >= 0\n\t\t\t\t\t|| g.gcd(nsquare).intValue() != 1);\n\n\t\t\t// verify g, the following must hold: gcd(L(g^lambda mod n^2), n) =\n\t\t\t// 1,\n\t\t\t// where L(u) = (u-1)/n\n\t\t} while (g.modPow(lambda, nsquare).subtract(BigInteger.ONE).divide(n)\n\t\t\t\t.gcd(n).intValue() != 1);\n\n\t\t// mu = (L(g^lambda mod n^2))^{-1} mod n, where L(u) = (u-1)/n\n\t\tBigInteger mu = g.modPow(lambda, nsquare).subtract(BigInteger.ONE)\n\t\t\t\t.divide(n).modInverse(n);\n\n\t\tPaillierPublicKey publicKey = new PaillierPublicKey(n, g, nsquare);\n\t\tPaillierPrivateKey privateKey = new PaillierPrivateKey(lambda, mu,\n\t\t\t\tnsquare, n);\n\n\t\treturn new KeyPair(publicKey, privateKey);\n\t}", "public void setPrincipalType(String principalType){\n this.principalType = principalType;\n //Update hashMap value..\n hashMap.put(\"principalType\", principalType);\n }", "public static void main(String[] args) {\n String keyFile = \"D:\\\\data\\\\kms\\\\liweigang.idc\";\n String message = \"dksf3r38324hrewjrh3r&^%djfdsjkek\";\n String pubmatrix = \"D:\\\\data\\\\kms\\\\sm2cpk.cn.pkm\";\n\n byte[] keycard = Tool.ReadFile(keyFile);\n System.out.println(\"keyCard:\" + Tool.Bytes2Hex(keycard));\n\n //得到私钥\n byte[] priKey = GMJni.GetPriKey(keycard);\n String priKeyHex = Tool.Bytes2Hex(priKey);\n System.out.println(\"private key:\" + priKeyHex);\n\n //得到密钥标识\n byte[] keyId = GMJni.GetKeyId(keycard);\n System.out.println(\"keyId:\" + Tool.Bytes2String(keyId));\n\n //得到公钥\n byte[] pubKey = GMJni.CalPubKey(Tool.String2Bytes(pubmatrix), keyId);\n System.out.println(\"public key:\" + Tool.Bytes2Hex(pubKey));\n\n //1000个不同message\n List<String> msgList = new ArrayList<>(12);\n for (int i = 0; i < 1000; i++) {\n //message基础上字符串长度+10\n msgList.add(message + RandomUtil.randomString(10));\n }\n long start = System.currentTimeMillis();\n //签名结果\n int rv = 0;\n //缓存\n MapCache cache = new MapCache();\n //命中缓存次数\n int count = 0;\n int count2 = 0;\n for (int i = 0; i < 100000; i++) {\n System.out.println(\"模拟请求第\" + i + \"次数\");\n\n //计算E值\n //30种不同的message,即仅30个不走缓存\n byte[] E = GMJni.SM2GetE(keyId, pubKey, Tool.String2Bytes(msgList.get(new Random().nextInt(30))));\n String hexE = Tool.Bytes2Hex(E);\n// System.out.println(\"E:\" + hexE);\n\n //SM2签名\n byte[] sig = GMJni.SM2Sign(priKey, E);\n// System.out.println(\"private key:\" + Tool.Bytes2Hex(priKey));\n// System.out.println(\"sign value:\" + Tool.Bytes2Hex(sig));\n\n // SM2签名验证\n // 引入Map缓存 E,sig的16进制的MD5值\n String hex = hexE + priKeyHex;\n// System.out.println(\"finalStr:\" + hex);\n String md5 = SecureUtil.md5(hex);\n if (null != cache.get(md5)) {\n count++;\n// System.out.println(\"命中缓存\" + (++count));\n } else {\n rv += GMJni.SM2Verify(pubKey, E, sig);\n count2++;\n cache.add(md5, (byte) 1, 50 * 1000);\n }\n }\n long end = System.currentTimeMillis();\n double v = (end - start) / 1000.0;\n System.out.println(\"time consuming:\" + v + \" sec\");\n System.out.println(Math.round(100000 / v) + \" times/sec\");\n System.out.println(\"命中缓存\" + (count));\n System.out.println(\"未命中\" + (count2));\n if (rv != 0) {\n System.out.println(\"Verify signature fail, error code is \" + String.valueOf(rv));\n } else {\n System.out.println(\"Verify signature success.\");\n }\n }", "private static String generateServerKey(Poi poi) {\n LonLat viewPoint = poi.getViewPosition();\n int lon = viewPoint.getLonInt();\n int lat = viewPoint.getLatInt();\n int alt = viewPoint.getAltInt();\n return generateServerKey(poi.getName(), poi.getAddress(), lon, lat, alt);\n }", "private String createTypeKey(int type, String key) {\r\n\t\treturn type + \"-\" + key;\r\n\t}", "public static void registerDefaultAlgorithms() {\n/* 390 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#dsa-sha1\", SignatureDSA.class);\n/* */ \n/* */ \n/* 393 */ algorithmHash.put(\"http://www.w3.org/2009/xmldsig11#dsa-sha256\", SignatureDSA.SHA256.class);\n/* */ \n/* */ \n/* 396 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\", SignatureBaseRSA.SignatureRSASHA1.class);\n/* */ \n/* */ \n/* 399 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#hmac-sha1\", IntegrityHmac.IntegrityHmacSHA1.class);\n/* */ \n/* */ \n/* 402 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-md5\", SignatureBaseRSA.SignatureRSAMD5.class);\n/* */ \n/* */ \n/* */ \n/* 406 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160\", SignatureBaseRSA.SignatureRSARIPEMD160.class);\n/* */ \n/* */ \n/* */ \n/* 410 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\", SignatureBaseRSA.SignatureRSASHA256.class);\n/* */ \n/* */ \n/* 413 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha384\", SignatureBaseRSA.SignatureRSASHA384.class);\n/* */ \n/* */ \n/* 416 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512\", SignatureBaseRSA.SignatureRSASHA512.class);\n/* */ \n/* */ \n/* 419 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1\", SignatureECDSA.SignatureECDSASHA1.class);\n/* */ \n/* */ \n/* 422 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256\", SignatureECDSA.SignatureECDSASHA256.class);\n/* */ \n/* */ \n/* 425 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384\", SignatureECDSA.SignatureECDSASHA384.class);\n/* */ \n/* */ \n/* 428 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512\", SignatureECDSA.SignatureECDSASHA512.class);\n/* */ \n/* */ \n/* 431 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-md5\", IntegrityHmac.IntegrityHmacMD5.class);\n/* */ \n/* */ \n/* 434 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160\", IntegrityHmac.IntegrityHmacRIPEMD160.class);\n/* */ \n/* */ \n/* 437 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha256\", IntegrityHmac.IntegrityHmacSHA256.class);\n/* */ \n/* */ \n/* 440 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha384\", IntegrityHmac.IntegrityHmacSHA384.class);\n/* */ \n/* */ \n/* 443 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha512\", IntegrityHmac.IntegrityHmacSHA512.class);\n/* */ }", "public java.lang.String getCertiType() {\n return certiType;\n }", "java.lang.String getServerSecret();", "public static void main(String[] args) {\n\t\tString algorithm = SignatureAlgorithm.HS256.getJcaName();\r\n\t\tSystem.out.println(algorithm);\r\n\r\n\t\t// set secret key\r\n\t\tString secret = \"this+is+my+scret+key+AAAAAAAAAAAAAAAAAAAAAAAAA\";\r\n\r\n\t\t// background information\r\n\t\t// =============================================================\r\n\t\t/*\r\n\t\t * the bytes of the secret key will be used by the signature algorithm - must be\r\n\t\t * in base 64 format\r\n\t\t */\r\n//\t\tbyte[] scretKeyEncoded = secret.getBytes(); // java encoding\r\n//\t\tbyte[] scretKeyDecoded = Base64.getDecoder().decode(secret); // base64\r\n//\t\tSystem.out.println(Arrays.toString(scretKeyEncoded));\r\n//\t\tSystem.out.println(Arrays.toString(scretKeyDecoded));\r\n\t\t// =====================================================================================\r\n\r\n\t\t// create the key from the decoded secret\r\n\t\tKey key = new SecretKeySpec(Base64.getDecoder().decode(secret), algorithm);\r\n\r\n\t\tInstant now = Instant.now();\r\n\r\n\t\t// create a JWT instance\r\n\t\tString jwt = Jwts.builder()\r\n\r\n\t\t\t\t.signWith(key)\r\n\r\n\t\t\t\t.setIssuedAt(Date.from(now))\r\n\r\n\t\t\t\t// will be valid for 10 seconds\r\n\t\t\t\t.setExpiration(Date.from(now.plus(10, ChronoUnit.SECONDS)))\r\n\r\n\t\t\t\t.setSubject(\"aaa@mail\")\r\n\r\n\t\t\t\t.claim(\"First name\", \"Dan\")\r\n\r\n\t\t\t\t.claim(\"Last name\", \"Levi\")\r\n\r\n\t\t\t\t.compact();\r\n\r\n\t\tSystem.out.println(jwt);\r\n\r\n\t\t// ==================================================\r\n\t\t// parse the JWS to get the expanded JWT\r\n//\t\tJWS - JSON Web Signature [aaaa.bbbb.cccc]\r\n//\t\tJWT - JSON Web Token [aaaa.bbbb.cccc]\r\n\r\n\t\tSystem.out.println(\"====================\");\r\n\t\tSystem.out.println(\"parsing the JWS to get a JWT\");\r\n\t\tJwtParser jwtParser = Jwts.parserBuilder().setSigningKey(key).build();\r\n\t\t// to demonstrate expiration paste an old JWS\r\n\t\tjwt = \"eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjA2Mzk1MTEsImV4cCI6MTYyMDYzOTUyMSwic3ViIjoiYWFhQG1haWwiLCJGaXJzdCBuYW1lIjoiRGFuIiwiTGFzdCBuYW1lIjoiTGV2aSJ9.cefEbBejjebKVILgOzca0LJZfd0F3qjezegeCaxOrfE\";\r\n\t\tSystem.out.println(jwtParser.parse(jwt));\r\n\t\tSystem.out.println(jwtParser.parse(jwt).getHeader());\r\n\t\tSystem.out.println(jwtParser.parse(jwt).getBody());\r\n\r\n\t}", "private String getSignatureString(Type type)\r\n {\r\n if(type instanceof CompoundType)\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n CompoundType cType = (CompoundType)type;\r\n //find key and value types\r\n String keyType = getSignatureString(cType.keyType);\r\n sb.append(\"Ljava/util/HashMap\");\r\n sb.append(\"<\");\r\n sb.append(keyType);\r\n sb.append(getSignatureString(cType.valType));\r\n sb.append(\">;\");\r\n return sb.toString();\r\n }\r\n else if(type instanceof SimpleType)\r\n {\r\n switch(((SimpleType)type).type)\r\n {\r\n case INT:\r\n return \"Ljava/lang/Integer;\";\r\n case BOOLEAN:\r\n return \"Ljava/lang/Boolean;\";\r\n case STRING:\r\n return \"Ljava/lang/String;\";\r\n }\r\n }\r\n return null;\r\n }", "public static void main(String[] args) throws Exception {\n KeyPairGenerator kpGen = KeyPairGenerator.getInstance(\"RSA\"); //create RSA KeyPairGenerator \n kpGen.initialize(2048, new SecureRandom()); //Choose key strength\n KeyPair keyPair = kpGen.generateKeyPair(); //Generate private and public keys\n PublicKey RSAPubKey = keyPair.getPublic();\n PrivateKey RSAPrivateKey = keyPair.getPrivate();\n\n //Information for Certificate\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\"); \n X500Name issuer = new X500Name(\"CN=\" + \"ExampleIssuer\"); // Issuer/Common Name\n X500Name subject = new X500Name(\"CN=\" + \"Client\"); //Subject\n Date notBefore = new Date(); //The date which the certificate becomes effective. \n long expiryDate = 1672437600000L; // expires 31 December 2022\n Date notAfter = new Date(expiryDate); //The date the certificate expires. \n BigInteger serialNumber = BigInteger.valueOf(Math.abs(random.nextInt())); //Cert Serial Number\n\n //Define the generator\n X509v3CertificateBuilder certGenerator \n = new JcaX509v3CertificateBuilder(\n issuer, \n serialNumber, \n notBefore,\n notAfter,\n subject,\n RSAPubKey\n );\n\n //Define how the certificate will be signed.\n //Usually with a hash algorithm and the Certificate Authority's private key. \n //Change argument x in .build(x) to not self-sign the cert.\n final ContentSigner contentSigner = new JcaContentSignerBuilder(\"SHA1WithRSAEncryption\").build(keyPair.getPrivate());\n\n //Generate a X.509 cert.\n X509CertificateHolder certificate = certGenerator.build(contentSigner);\n\n //Encode the certificate and write to a file. On Mac, you can open it with KeyChain Access\n //to confirm that it worked. \n byte[] encodedCert = certificate.getEncoded();\n FileOutputStream fos = new FileOutputStream(\"Example.cert\"); //Filename\n fos.write(encodedCert);\n fos.close();\n\n }", "public CryptographyKeysCreator() {\n Random random = new Random();\n BigInteger prime1 = BigInteger.probablePrime(256, random);\n BigInteger prime2 = BigInteger.probablePrime(256, random);\n primesMultiplied = prime1.multiply(prime2);\n BigInteger phi = prime1.subtract(BigInteger.ONE).multiply(prime2.subtract(BigInteger.ONE));\n encryptingBigInt = BigInteger.probablePrime(256, random);\n\n while (phi.gcd(encryptingBigInt).compareTo(BigInteger.ONE) > 0 && encryptingBigInt.compareTo(phi) < 0) {\n encryptingBigInt = encryptingBigInt.add(BigInteger.ONE);\n }\n\n decryptingBigInt = encryptingBigInt.modInverse(phi);\n }", "public String getJCEProviderName() {\n/* 196 */ return this.signatureAlgorithm.engineGetJCEProviderName();\n/* */ }", "public String getJCEAlgorithmString() {\n/* 187 */ return this.signatureAlgorithm.engineGetJCEAlgorithmString();\n/* */ }", "private void clearPkiData() {\n bitField0_ = (bitField0_ & ~0x00000004);\n pkiData_ = getDefaultInstance().getPkiData();\n }", "com.google.protobuf.ByteString getPublicEciesKeyBytes();", "@Test\r\n public void testVerifyCryptoType() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n byte[] sign = instance.sign(data, keys);\r\n boolean result = instance.verify(data, sign, keys);\r\n assertTrue(result);\r\n }", "public static String getKeyTypeName(KeyType type)\n {\n // TODO: should be moved to DBProvider ...\n // MySQL : key identifier\n // SQLServer : key identifier\n // Derby : key identifier\n // PostgreSQL: key identifier\n switch (type) {\n // MySQL: key types ...\n case PRIMARY : return \"PRIMARY KEY\"; // table\n case UNIQUE : return \"UNIQUE\"; // table\n case INDEX : return \"INDEX\"; // table/index\n case UNIQUE_INDEX : return \"UNIQUE INDEX\"; // table/index\n default : return \"UNKNOWN\";\n }\n }", "long getCryptProviderTypeExt();", "@PostMapping(\"/createKeyPair\")\n public String createKeyPair() {\n \n AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();\n \n return \"Private uid: \"+ priuid +\"\\nPublic uid: \" + pubuid +\"\\n\";\n }", "long getCryptAlgorithmSid();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private KeyStore askForPin() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {\n char newPin[] = PinDialog.getPIN(this.providerDesc);\n try {\n KeyStore ks = getKeyStore(newPin);\n pin = newPin;\n return ks;\n } catch (IOException e2) {\n e2.printStackTrace();\n if (e2.getCause() instanceof LoginException) {\n JOptionPane.showMessageDialog(null, \"Wrong PIN\", \"Cryptographic card\", JOptionPane.WARNING_MESSAGE);\n }\n throw e2;\n }\n }", "public String getTlsKeyPath();", "public byte[] getUserKey() throws IOException\n {\n byte[] u = null;\n COSString user = (COSString)encryptionDictionary.getDictionaryObject( COSName.getPDFName( \"U\" ) );\n if( user != null )\n {\n u = user.getBytes();\n }\n return u;\n }", "@Override\n public String getProviderName() {\n return \"SimpleEncryptionKeyStoreProvider\";\n }", "public interface SKey {\n\n String FAIL_STORE = \"job.fail.store\";\n\n String LOADBALANCE = \"loadbalance\";\n\n String EVENT_CENTER = \"event.center\";\n\n String REMOTING = \"lts.remoting\";\n\n String REMOTING_SERIALIZABLE_DFT = \"lts.remoting.serializable.default\";\n\n String ZK_CLIENT_KEY = \"zk.client\";\n\n String JOB_ID_GENERATOR = \"id.generator\";\n\n String JOB_LOGGER = \"job.logger\";\n\n String JOB_QUEUE = \"job.queue\";\n}", "private void getKeyType(final PdfObject pdfObject, final int i, final byte[] raw, final int length, final int keyLength, final int keyStart, final int type) {\n if(debugFastCode)//used in debug\n {\n PDFkey = PdfDictionary.getKey(keyStart, keyLength, raw);\n }\n \n PDFkeyInt=PdfDictionary.getIntKey(keyStart,keyLength,raw);\n \n //correct mapping\n if(PDFkeyInt==PdfDictionary.Indexed && (type==PdfDictionary.MK ||type==PdfDictionary.Form || type==PdfDictionary.Linearized || type==PdfDictionary.Group)) {\n PDFkeyInt = PdfDictionary.I;\n }\n \n if(isInlineImage) {\n PDFkeyInt = PdfObjectFactory.getInlineID(PDFkeyInt);\n }\n \n final int id=pdfObject.getID();\n \n if(type==PdfDictionary.Resources && (PDFkeyInt==PdfDictionary.ColorSpace\n || PDFkeyInt==PdfDictionary.ExtGState || PDFkeyInt==PdfDictionary.Shading\n || PDFkeyInt==PdfDictionary.XObject || PDFkeyInt==PdfDictionary.Font|| PDFkeyInt==PdfDictionary.Pattern)){\n pdfKeyType=PdfDictionary.VALUE_IS_DICTIONARY_PAIRS;\n //}else if (type==PdfDictionary.Form && id== PdfDictionary.AA && PDFkeyInt== PdfDictionary.K){\n // pdfKeyType= PdfDictionary.VALUE_IS_UNREAD_DICTIONARY;\n }else if (type==PdfDictionary.Outlines && PDFkeyInt== PdfDictionary.D){\n PDFkeyInt= PdfDictionary.Dest;\n pdfKeyType= PdfDictionary.VALUE_IS_MIXED_ARRAY;\n }else if ((type==PdfDictionary.Form || type==PdfDictionary.MK) && PDFkeyInt== PdfDictionary.D){\n if(id==PdfDictionary.AP || id==PdfDictionary.AA){\n pdfKeyType= PdfDictionary.VALUE_IS_VARIOUS;\n }else if(id==PdfDictionary.Win){\n pdfKeyType= PdfDictionary.VALUE_IS_TEXTSTREAM;\n }else{\n PDFkeyInt= PdfDictionary.Dest;\n pdfKeyType= PdfDictionary.VALUE_IS_MIXED_ARRAY;\n }\n }else if ((type==PdfDictionary.Form || type==PdfDictionary.MK) && (id==PdfDictionary.AP || id==PdfDictionary.AA) && PDFkeyInt== PdfDictionary.A){\n pdfKeyType= PdfDictionary.VALUE_IS_VARIOUS;\n }else if (PDFkeyInt== PdfDictionary.Order && type==PdfDictionary.OCProperties){\n pdfKeyType= PdfDictionary. VALUE_IS_OBJECT_ARRAY;\n }else if (PDFkeyInt== PdfDictionary.Name && type==PdfDictionary.OCProperties){\n pdfKeyType= PdfDictionary.VALUE_IS_TEXTSTREAM;\n }else if ((type==PdfDictionary.ColorSpace || type==PdfDictionary.Function) && PDFkeyInt== PdfDictionary.N){\n pdfKeyType= PdfDictionary.VALUE_IS_FLOAT;\n }else if(PDFkeyInt==PdfDictionary.Gamma && type==PdfDictionary.ColorSpace &&\n pdfObject.getParameterConstant(PdfDictionary.ColorSpace)== ColorSpaces.CalGray){ //its a number not an array\n pdfKeyType= PdfDictionary.VALUE_IS_FLOAT;\n }else if(id==PdfDictionary.Win && pdfObject.getObjectType()==PdfDictionary.Form &&\n (PDFkeyInt==PdfDictionary.P || PDFkeyInt==PdfDictionary.O)){\n pdfKeyType= PdfDictionary.VALUE_IS_TEXTSTREAM;\n }else if (isInlineImage && PDFkeyInt==PdfDictionary.ColorSpace){\n pdfKeyType= PdfDictionary.VALUE_IS_DICTIONARY;\n }else {\n pdfKeyType = PdfDictionary.getKeyType(PDFkeyInt, type);\n }\n \n \n //handle array of Function in Shading by using keyArray\n if(id==PdfDictionary.Shading && PDFkeyInt==PdfDictionary.Function){\n \n //get next non number/char value\n int ptr=i;\n while((raw[ptr]>=48 && raw[ptr]<58) || raw[ptr]==32){\n ptr++;\n }\n \n if(raw[ptr]=='['){\n pdfKeyType=PdfDictionary.VALUE_IS_KEY_ARRAY;\n }\n }\n \n //allow for other values in D,N,R definitions\n if(pdfKeyType==-1 && id== PdfDictionary.ClassMap){\n pdfKeyType = Dictionary.getPairedValues(pdfObject, i, raw, pdfKeyType, length, keyLength, keyStart);\n }else\n //allow for other values in D,N,R definitions as key pairs\n if(((((id==PdfDictionary.N || id==PdfDictionary.D || id==PdfDictionary.R))) &&\n pdfObject.getParentID()==PdfDictionary.AP &&\n pdfObject.getObjectType()==PdfDictionary.Form\n && raw[i]!='[' )){\n \n //get next non number/char value\n int ptr=i;\n while((raw[ptr]>=48 && raw[ptr]<58) || raw[ptr]==32){\n ptr++;\n }\n \n //decide if pair\n if(raw[keyStart]=='L' && raw[keyStart+1]=='e' && raw[keyStart+2]=='n' && raw[keyStart+3]=='g' && raw[keyStart+4]=='t' && raw[keyStart+5]=='h'){\n }else if(raw[keyStart]=='O' && raw[keyStart+1]=='n'){\n }else if(raw[keyStart]=='O' && raw[keyStart+1]=='f' && raw[keyStart+2]=='f'){\n }else\n if(raw[ptr]=='R'){\n pdfKeyType = Dictionary.getPairedValues(pdfObject, i, raw, pdfKeyType, length, keyLength, keyStart);\n \n if(debugFastCode) {\n System.out.println(\"new Returns \" + pdfKeyType + \" i=\" + i);\n }\n }\n }\n \n /**/\n \n //DecodeParms can be an array as well as a dictionary so check next char and alter if so\n if(PDFkeyInt==PdfDictionary.DecodeParms) {\n pdfKeyType = setTypeForDecodeParams(i, raw, length, pdfKeyType);\n }\n \n if(debugFastCode && pdfKeyType==-1 && pdfObject.getObjectType()!=PdfDictionary.Page){\n System.out.println(id+\" \"+type);\n System.out.println(padding +PDFkey+\" NO type setting for \"+PdfDictionary.getKey(keyStart,keyLength,raw)+\" id=\"+i);\n }\n }", "public void setP_type(String p_type) {\n this.p_type = p_type;\n }", "public PaymentRecordKey() {\n super();\n }", "private PasskeyContract() {}", "public RSAKeyPairGenerator() {\n }", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((BaseApplication) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv.Enum getCryptProviderType();", "java.lang.String getSignatureProviderId();", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }" ]
[ "0.6727689", "0.66767913", "0.6510369", "0.65033424", "0.6262288", "0.6251234", "0.58891505", "0.5814989", "0.5750624", "0.57413155", "0.5544094", "0.5496116", "0.547445", "0.52937627", "0.5266566", "0.524678", "0.52335155", "0.51767373", "0.50153226", "0.5006655", "0.4962356", "0.49499023", "0.49411032", "0.49168855", "0.49020067", "0.4888426", "0.48494777", "0.48494777", "0.48460793", "0.48377907", "0.4832051", "0.4832051", "0.4832051", "0.48257953", "0.4821702", "0.48194492", "0.4819314", "0.4819314", "0.47991663", "0.4781225", "0.47571105", "0.4756231", "0.47555733", "0.47499835", "0.47289437", "0.47254056", "0.47212568", "0.47066334", "0.47023937", "0.47019845", "0.46989855", "0.46851024", "0.46719837", "0.46639642", "0.46222693", "0.46156308", "0.46136636", "0.4612661", "0.46108755", "0.46063787", "0.46033537", "0.4599115", "0.45910728", "0.45881075", "0.45822087", "0.4581919", "0.45753542", "0.45734766", "0.45711392", "0.45614913", "0.45610267", "0.45608622", "0.45530447", "0.4550199", "0.4548751", "0.45359287", "0.45348635", "0.45301956", "0.45298547", "0.45289811", "0.45227852", "0.45182446", "0.45164904", "0.45110202", "0.45109597", "0.4506969", "0.44993004", "0.44970086", "0.4493643", "0.4493612", "0.44934398", "0.4490861", "0.44874617", "0.44862193", "0.44837305", "0.44832504", "0.44770813", "0.44753104", "0.44724855", "0.44717774" ]
0.6101008
6
none / x509+sha256 / x509+sha1 optional string pki_type = 2 [default = "none"];
java.lang.String getPkiType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n pkiType_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "@java.lang.Override\n public java.lang.String getPkiType() {\n return pkiType_;\n }", "private void setPkiType(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n pkiType_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(pkiType_);\n }", "com.google.protobuf.ByteString\n getPkiTypeBytes();", "boolean hasPkiType();", "@java.lang.Override\n public java.lang.String getPkiType() {\n return instance.getPkiType();\n }", "private void clearPkiType() {\n bitField0_ = (bitField0_ & ~0x00000002);\n pkiType_ = getDefaultInstance().getPkiType();\n }", "public Builder setPkiType(\n java.lang.String value) {\n copyOnWrite();\n instance.setPkiType(value);\n return this;\n }", "@java.lang.Override\n public boolean hasPkiType() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return instance.getPkiTypeBytes();\n }", "com.google.protobuf.ByteString getPkiData();", "private void setPkiData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000004;\n pkiData_ = value;\n }", "@java.lang.Override\n public boolean hasPkiType() {\n return instance.hasPkiType();\n }", "public static void main(String[] args) throws IcbcApiException {\n\t\tUiIcbcClient client = new UiIcbcClient(APP_ID,IcbcConstants.SIGN_TYPE_RSA,\n\t\t\t\t\"MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJCoQe/O+uqpOtyE/2CUjD7wosZw8jI1AlLNJCllOmlX+obA6h97b0JsEL0SjMCAR3xJyw7MKLqkcy5qQ/bBgw2XSrodmjzOVqfT1OXRii0xw0HiVkHR4cEWnEAAdfo0lDc4iuzCIQrnT5gM0+U+qeSV6JFfwVRjgYzBdHQRPCf1AgMBAAECgYAdQUoEe7GXH5591o/nMmOinvvscg8pRDsyD7bOgGBtyZMrCXzP3SDFKCHCeyvoColqg2oDlhpulK+OpYMVNlGQcO4eubOJp9MUc3m4A9RxkVr3dsVrmygM5czPfWHAPVQ4dECDruBJn9zoo1ci0myRTh4KSCq6SxpCE0Pbf3j7iQJBAOdMPFRfOkSQ1hsN9Mg4jd9on8r7+mF8gFPhkNI6qvEKw/prmU3obUWvZL42vRlLOQyyB92mBF24PStR/B6CjR8CQQCgGz0VoqCplurSCapGdgX3D7bNSDtMUmaLJYJxih8v+zghP0YtVgDeV3NjogVjOlz8/9Rebo0PoFcqyJnNA1RrAkEAul3dBoasZm7ldWsrXuDiv66HgoDB4Cb3J59Kl3oaHpp0CqUEI5gx48JNRE7K00SfNTGF0Pxh7Dn1X6Bxqwu6NQJADrdyPfLc4bnFi9jnleJzWepP2z6wdKt+UXv5KYaQp1BoMGYohTJKkiVnrdjOtfg/Y+IAG03+GVmbqYsW2AleUQJBANYQklohKtsmq8ptX3as6hjcuXcTpc2DSpVeOnCueNv107+dDJ+K14tbiVYzF3tkHBNMRkGtr6EuGKJ+A63sJ00=\",\n\t\t\t\tIcbcConstants.CHARSET_UTF8,IcbcConstants.ENCRYPT_TYPE_AES, \"xMh0xFsG7G80ziePFdnT8g==\");\n\t\tEaccountManageRequestV1 request = new EaccountManageRequestV1();\t\t\n\t\trequest.setServiceUrl(\"http://122.64.61.111:8081/ui/eaccount/manage/V1\");///\n\t\tEaccountManageRequestBizV1 bizContent = new EaccountManageRequestBizV1();\n\t\tbizContent.setMobileNo(\"13703878410\");//选输,手机号\n\t\tbizContent.setIdcode(\"128440810108044\");//选输,身份证号\n\t\tbizContent.setName(URLEncoder.encode(\"芡悠\"));//选输,用户姓名\n\t\tbizContent.setUserId(\"128440810108044\");//必输,需控制不能为空,用户唯一标识,送身份证号\n\t\tbizContent.setBacAddr(URLEncoder.encode(\"http://www.test.com\"));//选输,回调地址\n\t\tbizContent.setEpayflag(\"0\");//选输,工银e支付标志,0-短信、1-静态密码,集成客户端SDK的方式能送0-短信或1-静态密码,非APP方式只能送0-短信,不送默认为0-短信\n\t\t\n\t\tbizContent.setCorpAppid(APP_ID);//外公司合作方送APP_ID的值,行内应用如e支付等送外公司合作方的APPID\n\t\tlong systime = System.currentTimeMillis(); // 现时间戳\t\t\n\t\tString orderTimeStamp=new Long(systime).toString();\n\t\t\n\t\tSystem.out.println(\"orderTimeStamp:\"+orderTimeStamp);\n\t\tbizContent.setOrderTimeStamp(orderTimeStamp);//生成请求的时间,必输\n\t\t\n\t\tbizContent.setZoneno(\"00200\");//地区号号,选输,5位数字,上送值联系对接分行提供\n\t\tbizContent.setBrno(\"00260\");//网点号,选输,5位数字,上送值联系对接分行提供\n\t\t\n\t\trequest.setBizContent(bizContent);\n\t\tSystem.out.println(client.buildPostForm(request));// 实际调用时的相关返回结果及异常处理,请自行添加\n\t}", "dkk mo4509g();", "private void generatePrivacyKeyPair(boolean clientMode) throws IOException, UnsupportedEncodingException, NoSuchAlgorithmException, SaslException {\n byte[] ccmagic = CLIENT_CONF_MAGIC.getBytes(encoding);\n byte[] scmagic = SVR_CONF_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n int n;\n if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_40])) {\n n = 5;\n } else if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_56])) {\n n = 7;\n } else {\n n = 16;\n }\n byte[] keyBuffer = new byte[n + ccmagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, n);\n System.arraycopy(ccmagic, 0, keyBuffer, n, ccmagic.length);\n md5.update(keyBuffer);\n byte[] Kcc = md5.digest();\n System.arraycopy(scmagic, 0, keyBuffer, n, scmagic.length);\n md5.update(keyBuffer);\n byte[] Kcs = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST24:Kcc: \", Kcc);\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST25:Kcs: \", Kcs);\n }\n byte[] myKc;\n byte[] peerKc;\n if (clientMode) {\n myKc = Kcc;\n peerKc = Kcs;\n } else {\n myKc = Kcs;\n peerKc = Kcc;\n }\n try {\n SecretKey encKey;\n SecretKey decKey;\n if (negotiatedCipher.indexOf(CIPHER_TOKENS[RC4]) > -1) {\n encCipher = Cipher.getInstance(\"RC4\");\n decCipher = Cipher.getInstance(\"RC4\");\n encKey = new SecretKeySpec(myKc, \"RC4\");\n decKey = new SecretKeySpec(peerKc, \"RC4\");\n encCipher.init(Cipher.ENCRYPT_MODE, encKey);\n decCipher.init(Cipher.DECRYPT_MODE, decKey);\n } else if ((negotiatedCipher.equals(CIPHER_TOKENS[DES])) || (negotiatedCipher.equals(CIPHER_TOKENS[DES3]))) {\n String cipherFullname, cipherShortname;\n if (negotiatedCipher.equals(CIPHER_TOKENS[DES])) {\n cipherFullname = \"DES/CBC/NoPadding\";\n cipherShortname = \"des\";\n } else {\n cipherFullname = \"DESede/CBC/NoPadding\";\n cipherShortname = \"desede\";\n }\n encCipher = Cipher.getInstance(cipherFullname);\n decCipher = Cipher.getInstance(cipherFullname);\n encKey = makeDesKeys(myKc, cipherShortname);\n decKey = makeDesKeys(peerKc, cipherShortname);\n IvParameterSpec encIv = new IvParameterSpec(myKc, 8, 8);\n IvParameterSpec decIv = new IvParameterSpec(peerKc, 8, 8);\n encCipher.init(Cipher.ENCRYPT_MODE, encKey, encIv);\n decCipher.init(Cipher.DECRYPT_MODE, decKey, decIv);\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST26:\" + negotiatedCipher + \" IVcc: \", encIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST27:\" + negotiatedCipher + \" IVcs: \", decIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST28:\" + negotiatedCipher + \" encryption key: \", encKey.getEncoded());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST29:\" + negotiatedCipher + \" decryption key: \", decKey.getEncoded());\n }\n }\n } catch (InvalidKeySpecException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported key \" + \"specification used.\", e);\n } catch (InvalidAlgorithmParameterException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid cipher \" + \"algorithem parameter used to create cipher instance\", e);\n } catch (NoSuchPaddingException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported \" + \"padding used for chosen cipher\", e);\n } catch (InvalidKeyException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid data \" + \"used to initialize keys\", e);\n }\n }", "public Builder setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPkiTypeBytes(value);\n return this;\n }", "java.lang.String getPublicEciesKey();", "OpenSSLKey mo134201a();", "public abstract String getSigAlgOID();", "private void generateIntegrityKeyPair(boolean clientMode) throws UnsupportedEncodingException, IOException, NoSuchAlgorithmException {\n byte[] cimagic = CLIENT_INT_MAGIC.getBytes(encoding);\n byte[] simagic = SVR_INT_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n byte[] keyBuffer = new byte[H_A1.length + cimagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, H_A1.length);\n System.arraycopy(cimagic, 0, keyBuffer, H_A1.length, cimagic.length);\n md5.update(keyBuffer);\n byte[] Kic = md5.digest();\n System.arraycopy(simagic, 0, keyBuffer, H_A1.length, simagic.length);\n md5.update(keyBuffer);\n byte[] Kis = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST12:Kic: \", Kic);\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST13:Kis: \", Kis);\n }\n if (clientMode) {\n myKi = Kic;\n peerKi = Kis;\n } else {\n myKi = Kis;\n peerKi = Kic;\n }\n }", "public final String mo1957a() {\n return \"type.googleapis.com/google.crypto.tink.EciesAeadHkdfPublicKey\";\n }", "private native String native_ks(long cookie, byte[] userKey);", "@Override\n public ConcurrentContentSigner newSigner(\n String type, SignerConf conf, X509Cert[] certificateChain)\n throws ObjectCreationException {\n type = type.toLowerCase(Locale.ROOT);\n if (!types.contains(type)) {\n throw new ObjectCreationException(\"unknown signer type \" + type);\n }\n\n String str = conf.getConfValue(\"parallelism\");\n int parallelism = 20;\n if (str != null) {\n try {\n parallelism = Integer.parseInt(str);\n } catch (NumberFormatException ex) {\n throw new ObjectCreationException(\"invalid parallelism \" + str);\n }\n\n if (parallelism < 1) {\n throw new ObjectCreationException(\"invalid parallelism \" + str);\n }\n }\n\n str = conf.getConfValue(\"alias\");\n if (str == null) {\n throw new ObjectCreationException(\"alias is not specified\");\n }\n int keyId = Integer.parseInt(str);\n\n String algoName = conf.getConfValue(\"algo\");\n if (algoName == null) {\n throw new ObjectCreationException(\"algo is not specified\");\n }\n\n try {\n InitStatus initStatus = init(type);\n if (initStatus.status.get() != 1) {\n throw new ObjectCreationException(initStatus.details);\n }\n\n SignAlgo algo = SignAlgo.getInstance(algoName);\n String keyAlgoName;\n String bcKeyAlgoName;\n if (algo.isSM2SigAlgo()) {\n keyAlgoName = \"SM2\";\n bcKeyAlgoName = \"EC\";\n } else if (algo.isRSAPkcs1SigAlgo() || algo.isRSAPSSSigAlgo()) {\n keyAlgoName = \"RSA\";\n bcKeyAlgoName = \"RSA\";\n } else if (algo.isECDSASigAlgo() || algo.isPlainECDSASigAlgo()) {\n keyAlgoName = \"EC\";\n bcKeyAlgoName = \"EC\";\n } else {\n throw new ObjectCreationException(\"unsupported algo \" + algoName);\n }\n\n Provider provider = providerMap.get(type);\n\n // Method to read create PrivateKey and PublicKey object.\n // SANSEC use KeyPairGenerator.generateKeyPair to read the keypair-\n // No new keypair will be generated here.\n KeyPairGenerator kpGen = KeyPairGenerator.getInstance(keyAlgoName, provider);\n kpGen.initialize(keyId << 16);\n KeyPair kp = kpGen.generateKeyPair();\n\n PublicKey publicKey = KeyFactory.getInstance(bcKeyAlgoName, \"BC\")\n .generatePublic(new X509EncodedKeySpec(kp.getPublic().getEncoded()));\n\n return new JceSignerBuilder(kp.getPrivate(), publicKey, certificateChain, provider)\n .createSigner(algo, parallelism);\n } catch (GeneralSecurityException | XiSecurityException ex) {\n throw new ObjectCreationException(ex.getMessage(), ex);\n }\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv xgetCryptProviderType();", "liubaninc.m0.pki.CertificatesOuterClass.CertificatesOrBuilder getCertificatesOrBuilder();", "liubaninc.m0.pki.CertificatesOuterClass.CertificatesOrBuilder getCertificatesOrBuilder();", "boolean hasPkiData();", "@java.lang.Override\n public com.google.protobuf.ByteString getPkiData() {\n return pkiData_;\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public interface PublicKey {\n\n /**\n * Returns id of the public key.\n *\n * @return id of key\n */\n String getId();\n\n /**\n * Returns ids from gpg sub keys.\n *\n * @return sub key ids\n * @since 2.19.0\n */\n default Set<String> getSubkeys() {\n return Collections.emptySet();\n }\n\n /**\n * Returns the username of the owner or an empty optional.\n *\n * @return owner or empty optional\n */\n Optional<String> getOwner();\n\n /**\n * Returns raw of the public key.\n *\n * @return raw of key\n */\n String getRaw();\n\n /**\n * Returns the contacts of the publickey.\n *\n * @return owner or empty optional\n */\n Set<Person> getContacts();\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param stream stream of data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n boolean verify(InputStream stream, byte[] signature);\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param data data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n default boolean verify(byte[] data, byte[] signature) {\n return verify(new ByteArrayInputStream(data), signature);\n }\n}", "public String mo34971a() {\n return \"SHA-384\";\n }", "liubaninc.m0.pki.CertificatesOuterClass.Certificates getCertificates();", "liubaninc.m0.pki.CertificatesOuterClass.Certificates getCertificates();", "public interface JsonKey {\n\n String CLASS = \"class\";\n String DATA = \"data\";\n String EKS = \"eks\";\n String ID = \"id\";\n String LEVEL = \"level\";\n String MESSAGE = \"message\";\n String METHOD = \"method\";\n String REQUEST_MESSAGE_ID = \"msgId\";\n String STACKTRACE = \"stacktrace\";\n String VER = \"ver\";\n String OK = \"ok\";\n String LOG_LEVEL = \"logLevel\";\n String ERROR = \"error\";\n String EMPTY_STRING = \"\";\n String RESPONSE = \"response\";\n String ADDRESS = \"address\";\n String KEY = \"key\";\n String ERROR_MSG = \"error_msg\";\n String ATTRIBUTE = \"attribute\";\n String ERRORS = \"errors\";\n String SUCCESS = \"success\";\n\n String CERTIFICATE = \"certificate\";\n String RECIPIENT_NAME = \"recipientName\";\n String COURSE_NAME = \"courseName\";\n String NAME = \"name\";\n String HTML_TEMPLATE = \"htmlTemplate\";\n String TAG = \"tag\";\n String ISSUER = \"issuer\";\n String URL = \"url\";\n String SIGNATORY_LIST = \"signatoryList\";\n String DESIGNATION = \"designation\";\n String SIGNATORY_IMAGE = \"image\";\n\n String DOMAIN_URL = \"sunbird_cert_domain_url\";\n String ASSESSED_DOMAIN = \"ASSESSED_DOMAIN\";\n String BADGE_URL = \"BADGE_URL\";\n String ISSUER_URL = \"ISSUER_URL\";\n String TEMPLATE_URL = \"TEMPLATE_URL\";\n String CONTEXT = \"CONTEXT\";\n String VERIFICATION_TYPE = \"VERIFICATION_TYPE\";\n String SIGNATORY_EXTENSION = \"SIGNATORY_EXTENSION\";\n String RECIPIENT_EMAIl = \"recipientEmail\";\n String RECIPIENT_PHONE = \"recipientPhone\";\n String RECIPIENT_ID = \"recipientId\";\n String VALID_FROM = \"validFrom\";\n String EXPIRY = \"expiry\";\n String OLD_ID = \"oldId\";\n String PUBLIC_KEY = \"publicKey\";\n String DESCRIPTION = \"description\";\n String LOGO = \"logo\";\n String ISSUE_DATE = \"issueDate\";\n String USER = \"user\";\n String CERTIFICATE_NAME = \"name\";\n\n String CONTAINER_NAME = \"CONTAINER_NAME\";\n String CLOUD_STORAGE_TYPE = \"CLOUD_STORAGE_TYPE\";\n String CLOUD_UPLOAD_RETRY_COUNT = \"CLOUD_UPLOAD_RETRY_COUNT\";\n String AZURE_STORAGE_SECRET = \"AZURE_STORAGE_SECRET\";\n String AZURE_STORAGE_KEY = \"AZURE_STORAGE_KEY\";\n String ACCESS_CODE_LENGTH = \"ACCESS_CODE_LENGTH\";\n String ORG_ID = \"orgId\";\n String KEYS = \"keys\";\n String ENC_SERVICE_URL = \"sunbird_cert_enc_service_url\";\n String SIGN_HEALTH_CHECK_URL = \"SIGN_HEALTH_CHECK_URL\";\n String SIGN_URL = \"SIGN_URL\";\n String SIGN_VERIFY_URL = \"SIGN_VERIFY_URL\";\n String SIGN_CREATOR = \"SIGN_CREATOR\";\n String SIGN = \"sign\";\n String VERIFY = \"verify\";\n String KEY_ID = \"keyId\";\n String JSON_URL = \"jsonUrl\";\n String PDF_URL = \"pdfUrl\";\n String UNIQUE_ID = \"id\";\n String GENERATE_CERT = \"generateCert\";\n String PUBLIC_KEY_URL = \"PUBLIC_KEY_URL\";\n String GET_SIGN_URL = \"getSignUrl\";\n String SIGNED_URL = \"signedUrl\";\n\n String ACCESS_CODE = \"accessCode\";\n String JSON_DATA = \"jsonData\";\n String SLUG = \"sunbird_cert_slug\";\n}", "BigInteger getCEP();", "java.lang.String getPubkey();", "public void setCertiType(java.lang.String certiType) {\n this.certiType = certiType;\n }", "@Schema(required = true, description = \"Contract type (KIP-7, KIP-17, ERC-20, ERC-721)\")\n public String getType() {\n return type;\n }", "public abstract String getSigAlgName();", "public ProfileKey getProfileKey(String username, String type) throws ProfileKeyManagerPersistenceException {\n ParameterHelpers.checkParameter(username, \"username\");\n\n boolean registered = checkType(type);\n\n Connection connection = getConnection();\n\n try {\n return getProfileKey(connection, username, type, registered);\n } finally {\n closeConnection(connection);\n }\n }", "protected CryptoProvider() {\n\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public Builder clearPkiType() {\n copyOnWrite();\n instance.clearPkiType();\n return this;\n }", "private X509Certificate generateSelfSignedCertificateWithFakeSignature(PublicKey publicKey) throws IOException, CertificateParsingException {\n byte[] signature;\n AlgorithmIdentifier sigAlgId;\n V3TBSCertificateGenerator tbsGenerator = new V3TBSCertificateGenerator();\n int i = this.mKeymasterAlgorithm;\n if (i == 1) {\n signature = new byte[1];\n sigAlgId = new AlgorithmIdentifier(PKCSObjectIdentifiers.sha256WithRSAEncryption, DERNull.INSTANCE);\n } else if (i == 3) {\n sigAlgId = new AlgorithmIdentifier(X9ObjectIdentifiers.ecdsa_with_SHA256);\n ASN1EncodableVector v = new ASN1EncodableVector();\n v.add(new DERInteger(0));\n v.add(new DERInteger(0));\n signature = new DERSequence().getEncoded();\n } else {\n throw new ProviderException(\"Unsupported key algorithm: \" + this.mKeymasterAlgorithm);\n }\n byte[] signature2 = signature;\n ASN1InputStream publicKeyInfoIn = new ASN1InputStream(publicKey.getEncoded());\n tbsGenerator.setSubjectPublicKeyInfo(SubjectPublicKeyInfo.getInstance(publicKeyInfoIn.readObject()));\n publicKeyInfoIn.close();\n tbsGenerator.setSerialNumber(new ASN1Integer(this.mSpec.getCertificateSerialNumber()));\n X509Principal subject = new X509Principal(this.mSpec.getCertificateSubject().getEncoded());\n tbsGenerator.setSubject(subject);\n tbsGenerator.setIssuer(subject);\n tbsGenerator.setStartDate(new Time(this.mSpec.getCertificateNotBefore()));\n tbsGenerator.setEndDate(new Time(this.mSpec.getCertificateNotAfter()));\n tbsGenerator.setSignature(sigAlgId);\n TBSCertificate tbsCertificate = tbsGenerator.generateTBSCertificate();\n ASN1EncodableVector result = new ASN1EncodableVector();\n result.add(tbsCertificate);\n result.add(sigAlgId);\n result.add(new DERBitString(signature2));\n return new X509CertificateObject(Certificate.getInstance(new DERSequence(result)));\n throw result;\n }", "public interface Key {\n\n String SHARE_KEY = \"userIndo\";//用户信息\n String SHARE_USER_ID = \"userId\";//用户账号\n\n}", "private byte[] getKey(KeyType keytype) {\n byte[] key = new byte[1];\n key[0] = (byte) keytype.ordinal();\n return key;\n }", "@ParameterizedTest\n @EnumSource(KeyType.class)\n void testMissingJWTPublicKey(KeyType keyType) throws NoSuchAlgorithmException {\n final Pair<String, PrivateKey> keyPair = generateKeypair(keyType);\n\n final String jwt = Jwts.builder()\n .setHeaderParam(\"kid\", UUID.randomUUID())\n .setAudience(String.format(\"%sToken/auth\", \"here\"))\n .setIssuer(\"macaroon\")\n .setSubject(\"macaroon\")\n .setId(UUID.randomUUID().toString())\n .setExpiration(Date.from(Instant.now().plus(5, ChronoUnit.MINUTES)))\n .signWith(keyPair.getRight(), APIAuthHelpers.getSigningAlgorithm(keyType))\n .compact();\n\n // Submit the JWT\n Response response = RESOURCE.target(\"/v1/Token/auth\")\n .queryParam(\"scope\", \"system/*.*\")\n .queryParam(\"grant_type\", \"client_credentials\")\n .queryParam(\"client_assertion_type\", TokenResource.CLIENT_ASSERTION_TYPE)\n .queryParam(\"client_assertion\", jwt)\n .request()\n .post(Entity.entity(\"\", MediaType.APPLICATION_FORM_URLENCODED));\n\n assertEquals(401, response.getStatus(), \"Should be unauthorized\");\n assertTrue(response.readEntity(String.class).contains(\"Cannot find public key\"), \"Should have correct exception\");\n }", "liubaninc.m0.pki.CertificateOuterClass.Certificate getCertificate();", "public ECP getPublicKGCKey(){return pkS;}", "@Override\n public byte[] generateKey() throws ProtocolException, IOException {\n BigInteger p, q, n, e, d;\n Polynomial pol;\n do {\n // we want e such that GCD(e, phi(p*q))=1. as e is actually fixed\n // below, then we need to search for suitable p and q\n p = generateCofactor();\n q = generateCofactor();\n n = computeModulus(p, q);\n e = generatePublicExponent(p, q);\n } while (!verifyCofactors(p, q, e));\n d = computePrivateExponent(p, q, e);\n pol = generatePolynomial(p, q, d);\n BigInteger[] shares = ProtocolUtil.generateShares(pol, tparams.getParties());\n RSAPrivateCrtKey[] packedShares = packShares(e, shares, n);\n try {\n storeShares(packedShares);\n } catch (SmartCardException ex) {\n throw new ProtocolException(\n \"Error while communicating with smart card: \" + ex.toString());\n }\n\n RSAPublicKey pk = SignatureUtil.RSA.paramsToRSAPublicKey(e, n);\n return pk.getEncoded();\n }", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public String getTlsKey();", "@Test\n\tpublic void testSecuirtyConfigsOperations() throws NoSuchAlgorithmException {\n\t\t// Generate and store keys for the first time\n\t\tServerKeyPairs serverKeyPairs1 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair1 = serverKeyPairs1.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair1 = serverKeyPairs1.getSignatureKeyPair();\n\n\t\t// Initialize a new serverKeyPairs to test that it will only read\n\t\t// previously generated keys\n\t\tServerKeyPairs serverKeyPairs2 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair2 = serverKeyPairs2.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair2 = serverKeyPairs2.getSignatureKeyPair();\n\n\t\tassertEquals(\"Wrong loaded encryption public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded encryption private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getPrivateExponent());\n\n\t\tassertEquals(\"Wrong loaded signature public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded signature private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getPrivateExponent());\n\t}", "public PIEBankPlatinumKey() {\n\tsuper();\n}", "org.openxmlformats.schemas.presentationml.x2006.main.STAlgType.Enum getCryptAlgorithmType();", "private KeyPair generateKeyPair() {\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n keyGen.initialize(2048, random);\n return keyGen.generateKeyPair();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n return null;\n }", "private void setSignatureType(byte type) \r\n \t //@ requires signatureType |-> ?theSignatureType &*& theSignatureType != null &*& theSignatureType.length == 1 &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(?ta) &*& foreachp(ta, transient_byte_array);\r\n \t //@ ensures signatureType |-> theSignatureType &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(ta) &*& foreachp(ta, transient_byte_array);\r\n\t{\r\n\t\t//@ transient_byte_arrays_mem(theSignatureType);\r\n\t\t//@ foreachp_remove(theSignatureType, ta);\r\n\t\t//@ open transient_byte_array(theSignatureType);\r\n\t\tsignatureType[0] = type;\r\n\t\t//@ close transient_byte_array(theSignatureType);\r\n\t\t//@ foreachp_unremove(theSignatureType, ta);\r\n\t}", "public static void main(String[] args) {\n KeyPairGenerator keygen = null;\n try {\n keygen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secrand = new SecureRandom();\n // secrand.setSeed(\"17\".getBytes());//初始化随机产生器\n keygen.initialize(2048, secrand);\n KeyPair keys = keygen.genKeyPair();\n PublicKey publicKey = keys.getPublic();\n PrivateKey privateKey = keys.getPrivate();\n String pubKey = Base64.encode(publicKey.getEncoded());\n String priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n System.out.println(\"priKey = \" + new String(priKey));\n\n/*\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(pubkey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n pubKey = Base64.encode(publicKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n*/\n\n/*\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(prikey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = keyFactory.generatePrivate(keySpec);\n priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"priKey = \" + new String(priKey));\n*/\n //(N,e)是公钥\n RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;\n System.out.println(\"RSAPublicKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPublicKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPublicKey.getModulus().toString());//n\n System.out.println(\"PublicExponent.length=\" +\n rsaPublicKey.getPublicExponent().bitLength());\n System.out.println(\"PublicExponent=\" + rsaPublicKey.getPublicExponent().toString());//e\n\n\n //(N,d)是私钥\n RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;\n System.out.println(\"RSAPrivateKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPrivateKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPrivateKey.getModulus().toString());//n\n System.out.println(\"PrivateExponent.length=\" +\n rsaPrivateKey.getPrivateExponent().bitLength());\n System.out.println(\"PrivateExponent=\" + rsaPrivateKey.getPrivateExponent().toString());//d\n\n String encodeData = encode(\" public static String encode(String toEncode,String D, String N) {\\n\" +\n \" // BigInteger var2 = new BigInteger(\\\"17369712262290647732768133445861332449863405383733306695896586821166245382729380222118948668590047591903813382253186640467063376463309880263824085810383552963627855603429835060435976633955217307266714318344160886538360012623239010786668755679438900124601074924850696725233212494777766999123952653273738958617798460338184668049410136792403729341479373919634041235053823478242208651592611582439749292909499663165109004083820192135244694907138372731716013807836312280426304459316963033144149631900633817073029029413556757588486052978078614048837784810650766996280232645714319416096306667876390555673421669667406990886847\\\");\\n\" +\n \" // BigInteger var3 = new BigInteger(\\\"65537\\\");\\n\" +\n \" int MAX_ENCRYPT_BLOCK = 128;\\n\" +\n \" int offSet = 0;\\n\" +\n \" byte[] cache;\\n\" +\n \" int i = 0;\\n\" +\n \" ByteArrayOutputStream out = new ByteArrayOutputStream();\\n\" +\n \" try {\\n\" +\n \" RSAPrivateKeySpec rsaPrivateKeySpec = new java.security.spec.RSAPrivateKeySpec(new BigInteger(N),new BigInteger(D));\\n\" +\n \" KeyFactory keyFactory = java.security.KeyFactory.getInstance(\\\"RSA\\\");\\n\" +\n \" PrivateKey privateKey = keyFactory.generatePrivate(rsaPrivateKeySpec);\\n\" +\n \" Cipher cipher = javax.crypto.Cipher.getInstance(\\\"RSA\\\");\\n\" +\n \" cipher.init(Cipher.ENCRYPT_MODE,privateKey);\\n\" +\n \"\\n\" +\n \" byte[] data = toEncode.getBytes(StandardCharsets.UTF_8);\\n\" +\n \" int inputLen = data.length;\\n\" +\n \" // 对数据分段加密\\n\" +\n \" while (inputLen - offSet > 0) {\\n\" +\n \" if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {\\n\" +\n \" cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);\\n\" +\n \" } else {\\n\" +\n \" cache = cipher.doFinal(data, offSet, inputLen - offSet);\\n\" +\n \" }\\n\" +\n \" out.write(cache, 0, cache.length);\\n\" +\n \" i++;\\n\" +\n \" offSet = i * MAX_ENCRYPT_BLOCK;\\n\" +\n \" }\\n\" +\n \" byte[] datas = out.toByteArray();\\n\" +\n \" out.close();\\n\" +\n \"\\n\" +\n \" //byte[] datas = datas = cipher.doFinal(toEncode.getBytes());\\n\" +\n \" datas = org.apache.commons.codec.binary.Base64.encodeBase64(datas);\\n\" +\n \" return new String(datas,StandardCharsets.UTF_8);\\n\" +\n \" } catch (NoSuchAlgorithmException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeySpecException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (NoSuchPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeyException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (BadPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IllegalBlockSizeException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IOException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" }\\n\" +\n \" return null;\\n\" +\n \" }\",rsaPrivateKey.getPrivateExponent().toString(),rsaPrivateKey.getModulus().toString());\n String decodeData = decode(encodeData,rsaPublicKey.getPublicExponent().toString(),rsaPublicKey.getModulus().toString());\n\n System.out.println(encodeData);\n System.out.println(decodeData);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }/* catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }*/\n }", "public MEKeyTool() {\n keystore = new PublicKeyStoreBuilderBase();\n }", "public PrivateKeyType getPivateKeyType() {\n return PrivateKeyType.SAPLING_EXTENED_SPEND_KEY;\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STAlgType xgetCryptAlgorithmType();", "public final KeyPair generateKeyPair() {\n\t\tif (SECURE_RANDOM == null) {\n\t\t\tSECURE_RANDOM = new SecureRandom();\n\t\t}\n\t\t// for p and q we divide the bits length by 2 , as they create n, \n\t\t// which is the modulus and actual key size is depend on it\n\t\tBigInteger p = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\tBigInteger q;\n\t\tdo {\n\t\t\tq = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\t} while (q.compareTo(p) == 0);\n\n\t\t// lambda = lcm(p-1, q-1) = (p-1)*(q-1)/gcd(p-1, q-1)\n\t\tBigInteger lambda = p.subtract(BigInteger.ONE).multiply(q\n\t\t\t\t.subtract(BigInteger.ONE)).divide(p.subtract(BigInteger.ONE)\n\t\t\t\t.gcd(q.subtract(BigInteger.ONE)));\n\n\t\tBigInteger n = p.multiply(q); // n = p*q\n\t\tBigInteger nsquare = n.multiply(n); // nsquare = n*n\n\t\tBigInteger g;\n\t\tdo {\n\t\t\t// generate g, a random integer in Z*_{n^2}\n\t\t\tdo {\n\t\t\t\tg = new BigInteger(STRENGTH, 64, SECURE_RANDOM);\n\t\t\t} while (g.compareTo(nsquare) >= 0\n\t\t\t\t\t|| g.gcd(nsquare).intValue() != 1);\n\n\t\t\t// verify g, the following must hold: gcd(L(g^lambda mod n^2), n) =\n\t\t\t// 1,\n\t\t\t// where L(u) = (u-1)/n\n\t\t} while (g.modPow(lambda, nsquare).subtract(BigInteger.ONE).divide(n)\n\t\t\t\t.gcd(n).intValue() != 1);\n\n\t\t// mu = (L(g^lambda mod n^2))^{-1} mod n, where L(u) = (u-1)/n\n\t\tBigInteger mu = g.modPow(lambda, nsquare).subtract(BigInteger.ONE)\n\t\t\t\t.divide(n).modInverse(n);\n\n\t\tPaillierPublicKey publicKey = new PaillierPublicKey(n, g, nsquare);\n\t\tPaillierPrivateKey privateKey = new PaillierPrivateKey(lambda, mu,\n\t\t\t\tnsquare, n);\n\n\t\treturn new KeyPair(publicKey, privateKey);\n\t}", "public void setPrincipalType(String principalType){\n this.principalType = principalType;\n //Update hashMap value..\n hashMap.put(\"principalType\", principalType);\n }", "private static String generateServerKey(Poi poi) {\n LonLat viewPoint = poi.getViewPosition();\n int lon = viewPoint.getLonInt();\n int lat = viewPoint.getLatInt();\n int alt = viewPoint.getAltInt();\n return generateServerKey(poi.getName(), poi.getAddress(), lon, lat, alt);\n }", "public static void main(String[] args) {\n String keyFile = \"D:\\\\data\\\\kms\\\\liweigang.idc\";\n String message = \"dksf3r38324hrewjrh3r&^%djfdsjkek\";\n String pubmatrix = \"D:\\\\data\\\\kms\\\\sm2cpk.cn.pkm\";\n\n byte[] keycard = Tool.ReadFile(keyFile);\n System.out.println(\"keyCard:\" + Tool.Bytes2Hex(keycard));\n\n //得到私钥\n byte[] priKey = GMJni.GetPriKey(keycard);\n String priKeyHex = Tool.Bytes2Hex(priKey);\n System.out.println(\"private key:\" + priKeyHex);\n\n //得到密钥标识\n byte[] keyId = GMJni.GetKeyId(keycard);\n System.out.println(\"keyId:\" + Tool.Bytes2String(keyId));\n\n //得到公钥\n byte[] pubKey = GMJni.CalPubKey(Tool.String2Bytes(pubmatrix), keyId);\n System.out.println(\"public key:\" + Tool.Bytes2Hex(pubKey));\n\n //1000个不同message\n List<String> msgList = new ArrayList<>(12);\n for (int i = 0; i < 1000; i++) {\n //message基础上字符串长度+10\n msgList.add(message + RandomUtil.randomString(10));\n }\n long start = System.currentTimeMillis();\n //签名结果\n int rv = 0;\n //缓存\n MapCache cache = new MapCache();\n //命中缓存次数\n int count = 0;\n int count2 = 0;\n for (int i = 0; i < 100000; i++) {\n System.out.println(\"模拟请求第\" + i + \"次数\");\n\n //计算E值\n //30种不同的message,即仅30个不走缓存\n byte[] E = GMJni.SM2GetE(keyId, pubKey, Tool.String2Bytes(msgList.get(new Random().nextInt(30))));\n String hexE = Tool.Bytes2Hex(E);\n// System.out.println(\"E:\" + hexE);\n\n //SM2签名\n byte[] sig = GMJni.SM2Sign(priKey, E);\n// System.out.println(\"private key:\" + Tool.Bytes2Hex(priKey));\n// System.out.println(\"sign value:\" + Tool.Bytes2Hex(sig));\n\n // SM2签名验证\n // 引入Map缓存 E,sig的16进制的MD5值\n String hex = hexE + priKeyHex;\n// System.out.println(\"finalStr:\" + hex);\n String md5 = SecureUtil.md5(hex);\n if (null != cache.get(md5)) {\n count++;\n// System.out.println(\"命中缓存\" + (++count));\n } else {\n rv += GMJni.SM2Verify(pubKey, E, sig);\n count2++;\n cache.add(md5, (byte) 1, 50 * 1000);\n }\n }\n long end = System.currentTimeMillis();\n double v = (end - start) / 1000.0;\n System.out.println(\"time consuming:\" + v + \" sec\");\n System.out.println(Math.round(100000 / v) + \" times/sec\");\n System.out.println(\"命中缓存\" + (count));\n System.out.println(\"未命中\" + (count2));\n if (rv != 0) {\n System.out.println(\"Verify signature fail, error code is \" + String.valueOf(rv));\n } else {\n System.out.println(\"Verify signature success.\");\n }\n }", "private String createTypeKey(int type, String key) {\r\n\t\treturn type + \"-\" + key;\r\n\t}", "public java.lang.String getCertiType() {\n return certiType;\n }", "public static void registerDefaultAlgorithms() {\n/* 390 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#dsa-sha1\", SignatureDSA.class);\n/* */ \n/* */ \n/* 393 */ algorithmHash.put(\"http://www.w3.org/2009/xmldsig11#dsa-sha256\", SignatureDSA.SHA256.class);\n/* */ \n/* */ \n/* 396 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\", SignatureBaseRSA.SignatureRSASHA1.class);\n/* */ \n/* */ \n/* 399 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#hmac-sha1\", IntegrityHmac.IntegrityHmacSHA1.class);\n/* */ \n/* */ \n/* 402 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-md5\", SignatureBaseRSA.SignatureRSAMD5.class);\n/* */ \n/* */ \n/* */ \n/* 406 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160\", SignatureBaseRSA.SignatureRSARIPEMD160.class);\n/* */ \n/* */ \n/* */ \n/* 410 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\", SignatureBaseRSA.SignatureRSASHA256.class);\n/* */ \n/* */ \n/* 413 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha384\", SignatureBaseRSA.SignatureRSASHA384.class);\n/* */ \n/* */ \n/* 416 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512\", SignatureBaseRSA.SignatureRSASHA512.class);\n/* */ \n/* */ \n/* 419 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1\", SignatureECDSA.SignatureECDSASHA1.class);\n/* */ \n/* */ \n/* 422 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256\", SignatureECDSA.SignatureECDSASHA256.class);\n/* */ \n/* */ \n/* 425 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384\", SignatureECDSA.SignatureECDSASHA384.class);\n/* */ \n/* */ \n/* 428 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512\", SignatureECDSA.SignatureECDSASHA512.class);\n/* */ \n/* */ \n/* 431 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-md5\", IntegrityHmac.IntegrityHmacMD5.class);\n/* */ \n/* */ \n/* 434 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160\", IntegrityHmac.IntegrityHmacRIPEMD160.class);\n/* */ \n/* */ \n/* 437 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha256\", IntegrityHmac.IntegrityHmacSHA256.class);\n/* */ \n/* */ \n/* 440 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha384\", IntegrityHmac.IntegrityHmacSHA384.class);\n/* */ \n/* */ \n/* 443 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha512\", IntegrityHmac.IntegrityHmacSHA512.class);\n/* */ }", "java.lang.String getServerSecret();", "public static void main(String[] args) {\n\t\tString algorithm = SignatureAlgorithm.HS256.getJcaName();\r\n\t\tSystem.out.println(algorithm);\r\n\r\n\t\t// set secret key\r\n\t\tString secret = \"this+is+my+scret+key+AAAAAAAAAAAAAAAAAAAAAAAAA\";\r\n\r\n\t\t// background information\r\n\t\t// =============================================================\r\n\t\t/*\r\n\t\t * the bytes of the secret key will be used by the signature algorithm - must be\r\n\t\t * in base 64 format\r\n\t\t */\r\n//\t\tbyte[] scretKeyEncoded = secret.getBytes(); // java encoding\r\n//\t\tbyte[] scretKeyDecoded = Base64.getDecoder().decode(secret); // base64\r\n//\t\tSystem.out.println(Arrays.toString(scretKeyEncoded));\r\n//\t\tSystem.out.println(Arrays.toString(scretKeyDecoded));\r\n\t\t// =====================================================================================\r\n\r\n\t\t// create the key from the decoded secret\r\n\t\tKey key = new SecretKeySpec(Base64.getDecoder().decode(secret), algorithm);\r\n\r\n\t\tInstant now = Instant.now();\r\n\r\n\t\t// create a JWT instance\r\n\t\tString jwt = Jwts.builder()\r\n\r\n\t\t\t\t.signWith(key)\r\n\r\n\t\t\t\t.setIssuedAt(Date.from(now))\r\n\r\n\t\t\t\t// will be valid for 10 seconds\r\n\t\t\t\t.setExpiration(Date.from(now.plus(10, ChronoUnit.SECONDS)))\r\n\r\n\t\t\t\t.setSubject(\"aaa@mail\")\r\n\r\n\t\t\t\t.claim(\"First name\", \"Dan\")\r\n\r\n\t\t\t\t.claim(\"Last name\", \"Levi\")\r\n\r\n\t\t\t\t.compact();\r\n\r\n\t\tSystem.out.println(jwt);\r\n\r\n\t\t// ==================================================\r\n\t\t// parse the JWS to get the expanded JWT\r\n//\t\tJWS - JSON Web Signature [aaaa.bbbb.cccc]\r\n//\t\tJWT - JSON Web Token [aaaa.bbbb.cccc]\r\n\r\n\t\tSystem.out.println(\"====================\");\r\n\t\tSystem.out.println(\"parsing the JWS to get a JWT\");\r\n\t\tJwtParser jwtParser = Jwts.parserBuilder().setSigningKey(key).build();\r\n\t\t// to demonstrate expiration paste an old JWS\r\n\t\tjwt = \"eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjA2Mzk1MTEsImV4cCI6MTYyMDYzOTUyMSwic3ViIjoiYWFhQG1haWwiLCJGaXJzdCBuYW1lIjoiRGFuIiwiTGFzdCBuYW1lIjoiTGV2aSJ9.cefEbBejjebKVILgOzca0LJZfd0F3qjezegeCaxOrfE\";\r\n\t\tSystem.out.println(jwtParser.parse(jwt));\r\n\t\tSystem.out.println(jwtParser.parse(jwt).getHeader());\r\n\t\tSystem.out.println(jwtParser.parse(jwt).getBody());\r\n\r\n\t}", "private String getSignatureString(Type type)\r\n {\r\n if(type instanceof CompoundType)\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n CompoundType cType = (CompoundType)type;\r\n //find key and value types\r\n String keyType = getSignatureString(cType.keyType);\r\n sb.append(\"Ljava/util/HashMap\");\r\n sb.append(\"<\");\r\n sb.append(keyType);\r\n sb.append(getSignatureString(cType.valType));\r\n sb.append(\">;\");\r\n return sb.toString();\r\n }\r\n else if(type instanceof SimpleType)\r\n {\r\n switch(((SimpleType)type).type)\r\n {\r\n case INT:\r\n return \"Ljava/lang/Integer;\";\r\n case BOOLEAN:\r\n return \"Ljava/lang/Boolean;\";\r\n case STRING:\r\n return \"Ljava/lang/String;\";\r\n }\r\n }\r\n return null;\r\n }", "public static void main(String[] args) throws Exception {\n KeyPairGenerator kpGen = KeyPairGenerator.getInstance(\"RSA\"); //create RSA KeyPairGenerator \n kpGen.initialize(2048, new SecureRandom()); //Choose key strength\n KeyPair keyPair = kpGen.generateKeyPair(); //Generate private and public keys\n PublicKey RSAPubKey = keyPair.getPublic();\n PrivateKey RSAPrivateKey = keyPair.getPrivate();\n\n //Information for Certificate\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\"); \n X500Name issuer = new X500Name(\"CN=\" + \"ExampleIssuer\"); // Issuer/Common Name\n X500Name subject = new X500Name(\"CN=\" + \"Client\"); //Subject\n Date notBefore = new Date(); //The date which the certificate becomes effective. \n long expiryDate = 1672437600000L; // expires 31 December 2022\n Date notAfter = new Date(expiryDate); //The date the certificate expires. \n BigInteger serialNumber = BigInteger.valueOf(Math.abs(random.nextInt())); //Cert Serial Number\n\n //Define the generator\n X509v3CertificateBuilder certGenerator \n = new JcaX509v3CertificateBuilder(\n issuer, \n serialNumber, \n notBefore,\n notAfter,\n subject,\n RSAPubKey\n );\n\n //Define how the certificate will be signed.\n //Usually with a hash algorithm and the Certificate Authority's private key. \n //Change argument x in .build(x) to not self-sign the cert.\n final ContentSigner contentSigner = new JcaContentSignerBuilder(\"SHA1WithRSAEncryption\").build(keyPair.getPrivate());\n\n //Generate a X.509 cert.\n X509CertificateHolder certificate = certGenerator.build(contentSigner);\n\n //Encode the certificate and write to a file. On Mac, you can open it with KeyChain Access\n //to confirm that it worked. \n byte[] encodedCert = certificate.getEncoded();\n FileOutputStream fos = new FileOutputStream(\"Example.cert\"); //Filename\n fos.write(encodedCert);\n fos.close();\n\n }", "public String getJCEProviderName() {\n/* 196 */ return this.signatureAlgorithm.engineGetJCEProviderName();\n/* */ }", "public CryptographyKeysCreator() {\n Random random = new Random();\n BigInteger prime1 = BigInteger.probablePrime(256, random);\n BigInteger prime2 = BigInteger.probablePrime(256, random);\n primesMultiplied = prime1.multiply(prime2);\n BigInteger phi = prime1.subtract(BigInteger.ONE).multiply(prime2.subtract(BigInteger.ONE));\n encryptingBigInt = BigInteger.probablePrime(256, random);\n\n while (phi.gcd(encryptingBigInt).compareTo(BigInteger.ONE) > 0 && encryptingBigInt.compareTo(phi) < 0) {\n encryptingBigInt = encryptingBigInt.add(BigInteger.ONE);\n }\n\n decryptingBigInt = encryptingBigInt.modInverse(phi);\n }", "public String getJCEAlgorithmString() {\n/* 187 */ return this.signatureAlgorithm.engineGetJCEAlgorithmString();\n/* */ }", "com.google.protobuf.ByteString getPublicEciesKeyBytes();", "private void clearPkiData() {\n bitField0_ = (bitField0_ & ~0x00000004);\n pkiData_ = getDefaultInstance().getPkiData();\n }", "@Test\r\n public void testVerifyCryptoType() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n byte[] sign = instance.sign(data, keys);\r\n boolean result = instance.verify(data, sign, keys);\r\n assertTrue(result);\r\n }", "public static String getKeyTypeName(KeyType type)\n {\n // TODO: should be moved to DBProvider ...\n // MySQL : key identifier\n // SQLServer : key identifier\n // Derby : key identifier\n // PostgreSQL: key identifier\n switch (type) {\n // MySQL: key types ...\n case PRIMARY : return \"PRIMARY KEY\"; // table\n case UNIQUE : return \"UNIQUE\"; // table\n case INDEX : return \"INDEX\"; // table/index\n case UNIQUE_INDEX : return \"UNIQUE INDEX\"; // table/index\n default : return \"UNKNOWN\";\n }\n }", "long getCryptProviderTypeExt();", "@PostMapping(\"/createKeyPair\")\n public String createKeyPair() {\n \n AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();\n \n return \"Private uid: \"+ priuid +\"\\nPublic uid: \" + pubuid +\"\\n\";\n }", "long getCryptAlgorithmSid();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private KeyStore askForPin() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {\n char newPin[] = PinDialog.getPIN(this.providerDesc);\n try {\n KeyStore ks = getKeyStore(newPin);\n pin = newPin;\n return ks;\n } catch (IOException e2) {\n e2.printStackTrace();\n if (e2.getCause() instanceof LoginException) {\n JOptionPane.showMessageDialog(null, \"Wrong PIN\", \"Cryptographic card\", JOptionPane.WARNING_MESSAGE);\n }\n throw e2;\n }\n }", "public String getTlsKeyPath();", "@Override\n public String getProviderName() {\n return \"SimpleEncryptionKeyStoreProvider\";\n }", "public byte[] getUserKey() throws IOException\n {\n byte[] u = null;\n COSString user = (COSString)encryptionDictionary.getDictionaryObject( COSName.getPDFName( \"U\" ) );\n if( user != null )\n {\n u = user.getBytes();\n }\n return u;\n }", "public interface SKey {\n\n String FAIL_STORE = \"job.fail.store\";\n\n String LOADBALANCE = \"loadbalance\";\n\n String EVENT_CENTER = \"event.center\";\n\n String REMOTING = \"lts.remoting\";\n\n String REMOTING_SERIALIZABLE_DFT = \"lts.remoting.serializable.default\";\n\n String ZK_CLIENT_KEY = \"zk.client\";\n\n String JOB_ID_GENERATOR = \"id.generator\";\n\n String JOB_LOGGER = \"job.logger\";\n\n String JOB_QUEUE = \"job.queue\";\n}", "private void getKeyType(final PdfObject pdfObject, final int i, final byte[] raw, final int length, final int keyLength, final int keyStart, final int type) {\n if(debugFastCode)//used in debug\n {\n PDFkey = PdfDictionary.getKey(keyStart, keyLength, raw);\n }\n \n PDFkeyInt=PdfDictionary.getIntKey(keyStart,keyLength,raw);\n \n //correct mapping\n if(PDFkeyInt==PdfDictionary.Indexed && (type==PdfDictionary.MK ||type==PdfDictionary.Form || type==PdfDictionary.Linearized || type==PdfDictionary.Group)) {\n PDFkeyInt = PdfDictionary.I;\n }\n \n if(isInlineImage) {\n PDFkeyInt = PdfObjectFactory.getInlineID(PDFkeyInt);\n }\n \n final int id=pdfObject.getID();\n \n if(type==PdfDictionary.Resources && (PDFkeyInt==PdfDictionary.ColorSpace\n || PDFkeyInt==PdfDictionary.ExtGState || PDFkeyInt==PdfDictionary.Shading\n || PDFkeyInt==PdfDictionary.XObject || PDFkeyInt==PdfDictionary.Font|| PDFkeyInt==PdfDictionary.Pattern)){\n pdfKeyType=PdfDictionary.VALUE_IS_DICTIONARY_PAIRS;\n //}else if (type==PdfDictionary.Form && id== PdfDictionary.AA && PDFkeyInt== PdfDictionary.K){\n // pdfKeyType= PdfDictionary.VALUE_IS_UNREAD_DICTIONARY;\n }else if (type==PdfDictionary.Outlines && PDFkeyInt== PdfDictionary.D){\n PDFkeyInt= PdfDictionary.Dest;\n pdfKeyType= PdfDictionary.VALUE_IS_MIXED_ARRAY;\n }else if ((type==PdfDictionary.Form || type==PdfDictionary.MK) && PDFkeyInt== PdfDictionary.D){\n if(id==PdfDictionary.AP || id==PdfDictionary.AA){\n pdfKeyType= PdfDictionary.VALUE_IS_VARIOUS;\n }else if(id==PdfDictionary.Win){\n pdfKeyType= PdfDictionary.VALUE_IS_TEXTSTREAM;\n }else{\n PDFkeyInt= PdfDictionary.Dest;\n pdfKeyType= PdfDictionary.VALUE_IS_MIXED_ARRAY;\n }\n }else if ((type==PdfDictionary.Form || type==PdfDictionary.MK) && (id==PdfDictionary.AP || id==PdfDictionary.AA) && PDFkeyInt== PdfDictionary.A){\n pdfKeyType= PdfDictionary.VALUE_IS_VARIOUS;\n }else if (PDFkeyInt== PdfDictionary.Order && type==PdfDictionary.OCProperties){\n pdfKeyType= PdfDictionary. VALUE_IS_OBJECT_ARRAY;\n }else if (PDFkeyInt== PdfDictionary.Name && type==PdfDictionary.OCProperties){\n pdfKeyType= PdfDictionary.VALUE_IS_TEXTSTREAM;\n }else if ((type==PdfDictionary.ColorSpace || type==PdfDictionary.Function) && PDFkeyInt== PdfDictionary.N){\n pdfKeyType= PdfDictionary.VALUE_IS_FLOAT;\n }else if(PDFkeyInt==PdfDictionary.Gamma && type==PdfDictionary.ColorSpace &&\n pdfObject.getParameterConstant(PdfDictionary.ColorSpace)== ColorSpaces.CalGray){ //its a number not an array\n pdfKeyType= PdfDictionary.VALUE_IS_FLOAT;\n }else if(id==PdfDictionary.Win && pdfObject.getObjectType()==PdfDictionary.Form &&\n (PDFkeyInt==PdfDictionary.P || PDFkeyInt==PdfDictionary.O)){\n pdfKeyType= PdfDictionary.VALUE_IS_TEXTSTREAM;\n }else if (isInlineImage && PDFkeyInt==PdfDictionary.ColorSpace){\n pdfKeyType= PdfDictionary.VALUE_IS_DICTIONARY;\n }else {\n pdfKeyType = PdfDictionary.getKeyType(PDFkeyInt, type);\n }\n \n \n //handle array of Function in Shading by using keyArray\n if(id==PdfDictionary.Shading && PDFkeyInt==PdfDictionary.Function){\n \n //get next non number/char value\n int ptr=i;\n while((raw[ptr]>=48 && raw[ptr]<58) || raw[ptr]==32){\n ptr++;\n }\n \n if(raw[ptr]=='['){\n pdfKeyType=PdfDictionary.VALUE_IS_KEY_ARRAY;\n }\n }\n \n //allow for other values in D,N,R definitions\n if(pdfKeyType==-1 && id== PdfDictionary.ClassMap){\n pdfKeyType = Dictionary.getPairedValues(pdfObject, i, raw, pdfKeyType, length, keyLength, keyStart);\n }else\n //allow for other values in D,N,R definitions as key pairs\n if(((((id==PdfDictionary.N || id==PdfDictionary.D || id==PdfDictionary.R))) &&\n pdfObject.getParentID()==PdfDictionary.AP &&\n pdfObject.getObjectType()==PdfDictionary.Form\n && raw[i]!='[' )){\n \n //get next non number/char value\n int ptr=i;\n while((raw[ptr]>=48 && raw[ptr]<58) || raw[ptr]==32){\n ptr++;\n }\n \n //decide if pair\n if(raw[keyStart]=='L' && raw[keyStart+1]=='e' && raw[keyStart+2]=='n' && raw[keyStart+3]=='g' && raw[keyStart+4]=='t' && raw[keyStart+5]=='h'){\n }else if(raw[keyStart]=='O' && raw[keyStart+1]=='n'){\n }else if(raw[keyStart]=='O' && raw[keyStart+1]=='f' && raw[keyStart+2]=='f'){\n }else\n if(raw[ptr]=='R'){\n pdfKeyType = Dictionary.getPairedValues(pdfObject, i, raw, pdfKeyType, length, keyLength, keyStart);\n \n if(debugFastCode) {\n System.out.println(\"new Returns \" + pdfKeyType + \" i=\" + i);\n }\n }\n }\n \n /**/\n \n //DecodeParms can be an array as well as a dictionary so check next char and alter if so\n if(PDFkeyInt==PdfDictionary.DecodeParms) {\n pdfKeyType = setTypeForDecodeParams(i, raw, length, pdfKeyType);\n }\n \n if(debugFastCode && pdfKeyType==-1 && pdfObject.getObjectType()!=PdfDictionary.Page){\n System.out.println(id+\" \"+type);\n System.out.println(padding +PDFkey+\" NO type setting for \"+PdfDictionary.getKey(keyStart,keyLength,raw)+\" id=\"+i);\n }\n }", "public void setP_type(String p_type) {\n this.p_type = p_type;\n }", "public PaymentRecordKey() {\n super();\n }", "private PasskeyContract() {}", "public RSAKeyPairGenerator() {\n }", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((BaseApplication) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv.Enum getCryptProviderType();", "java.lang.String getSignatureProviderId();", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }" ]
[ "0.6677302", "0.65103334", "0.6503502", "0.62628514", "0.6250372", "0.61004686", "0.5888439", "0.58146834", "0.5749554", "0.5741641", "0.55435157", "0.5493693", "0.5474418", "0.52934134", "0.52665645", "0.5246521", "0.52349544", "0.5175871", "0.5017036", "0.5007778", "0.4962969", "0.4950082", "0.49420312", "0.49163356", "0.49024847", "0.48897386", "0.48511118", "0.48511118", "0.4844952", "0.48370767", "0.4831613", "0.4831613", "0.4831613", "0.48279023", "0.4821235", "0.48205858", "0.48205858", "0.48201925", "0.48012882", "0.4783611", "0.47606364", "0.47574088", "0.47566023", "0.47519523", "0.47286636", "0.47235122", "0.47220808", "0.47063407", "0.47040585", "0.47039852", "0.47009808", "0.4687133", "0.46720207", "0.4663095", "0.46227324", "0.46167073", "0.4614823", "0.46146208", "0.46117303", "0.4609115", "0.4605506", "0.45985833", "0.45930865", "0.45889315", "0.45830595", "0.45830226", "0.45740417", "0.45735276", "0.4572773", "0.4563699", "0.4561856", "0.45605567", "0.45527497", "0.45521763", "0.4549838", "0.4536104", "0.45360166", "0.4531036", "0.45309407", "0.45290637", "0.45238796", "0.4519284", "0.45178244", "0.4511146", "0.45110682", "0.4508972", "0.45000508", "0.44973904", "0.44938332", "0.44937173", "0.44929975", "0.44925633", "0.44923615", "0.44870168", "0.44844353", "0.44840944", "0.44768944", "0.44768745", "0.4473516", "0.4471568" ]
0.6726498
0
none / x509+sha256 / x509+sha1 optional string pki_type = 2 [default = "none"];
com.google.protobuf.ByteString getPkiTypeBytes();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPkiType();", "private void setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n pkiType_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "@java.lang.Override\n public java.lang.String getPkiType() {\n return pkiType_;\n }", "private void setPkiType(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n pkiType_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(pkiType_);\n }", "boolean hasPkiType();", "@java.lang.Override\n public java.lang.String getPkiType() {\n return instance.getPkiType();\n }", "private void clearPkiType() {\n bitField0_ = (bitField0_ & ~0x00000002);\n pkiType_ = getDefaultInstance().getPkiType();\n }", "public Builder setPkiType(\n java.lang.String value) {\n copyOnWrite();\n instance.setPkiType(value);\n return this;\n }", "@java.lang.Override\n public boolean hasPkiType() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return instance.getPkiTypeBytes();\n }", "com.google.protobuf.ByteString getPkiData();", "private void setPkiData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000004;\n pkiData_ = value;\n }", "@java.lang.Override\n public boolean hasPkiType() {\n return instance.hasPkiType();\n }", "public static void main(String[] args) throws IcbcApiException {\n\t\tUiIcbcClient client = new UiIcbcClient(APP_ID,IcbcConstants.SIGN_TYPE_RSA,\n\t\t\t\t\"MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJCoQe/O+uqpOtyE/2CUjD7wosZw8jI1AlLNJCllOmlX+obA6h97b0JsEL0SjMCAR3xJyw7MKLqkcy5qQ/bBgw2XSrodmjzOVqfT1OXRii0xw0HiVkHR4cEWnEAAdfo0lDc4iuzCIQrnT5gM0+U+qeSV6JFfwVRjgYzBdHQRPCf1AgMBAAECgYAdQUoEe7GXH5591o/nMmOinvvscg8pRDsyD7bOgGBtyZMrCXzP3SDFKCHCeyvoColqg2oDlhpulK+OpYMVNlGQcO4eubOJp9MUc3m4A9RxkVr3dsVrmygM5czPfWHAPVQ4dECDruBJn9zoo1ci0myRTh4KSCq6SxpCE0Pbf3j7iQJBAOdMPFRfOkSQ1hsN9Mg4jd9on8r7+mF8gFPhkNI6qvEKw/prmU3obUWvZL42vRlLOQyyB92mBF24PStR/B6CjR8CQQCgGz0VoqCplurSCapGdgX3D7bNSDtMUmaLJYJxih8v+zghP0YtVgDeV3NjogVjOlz8/9Rebo0PoFcqyJnNA1RrAkEAul3dBoasZm7ldWsrXuDiv66HgoDB4Cb3J59Kl3oaHpp0CqUEI5gx48JNRE7K00SfNTGF0Pxh7Dn1X6Bxqwu6NQJADrdyPfLc4bnFi9jnleJzWepP2z6wdKt+UXv5KYaQp1BoMGYohTJKkiVnrdjOtfg/Y+IAG03+GVmbqYsW2AleUQJBANYQklohKtsmq8ptX3as6hjcuXcTpc2DSpVeOnCueNv107+dDJ+K14tbiVYzF3tkHBNMRkGtr6EuGKJ+A63sJ00=\",\n\t\t\t\tIcbcConstants.CHARSET_UTF8,IcbcConstants.ENCRYPT_TYPE_AES, \"xMh0xFsG7G80ziePFdnT8g==\");\n\t\tEaccountManageRequestV1 request = new EaccountManageRequestV1();\t\t\n\t\trequest.setServiceUrl(\"http://122.64.61.111:8081/ui/eaccount/manage/V1\");///\n\t\tEaccountManageRequestBizV1 bizContent = new EaccountManageRequestBizV1();\n\t\tbizContent.setMobileNo(\"13703878410\");//选输,手机号\n\t\tbizContent.setIdcode(\"128440810108044\");//选输,身份证号\n\t\tbizContent.setName(URLEncoder.encode(\"芡悠\"));//选输,用户姓名\n\t\tbizContent.setUserId(\"128440810108044\");//必输,需控制不能为空,用户唯一标识,送身份证号\n\t\tbizContent.setBacAddr(URLEncoder.encode(\"http://www.test.com\"));//选输,回调地址\n\t\tbizContent.setEpayflag(\"0\");//选输,工银e支付标志,0-短信、1-静态密码,集成客户端SDK的方式能送0-短信或1-静态密码,非APP方式只能送0-短信,不送默认为0-短信\n\t\t\n\t\tbizContent.setCorpAppid(APP_ID);//外公司合作方送APP_ID的值,行内应用如e支付等送外公司合作方的APPID\n\t\tlong systime = System.currentTimeMillis(); // 现时间戳\t\t\n\t\tString orderTimeStamp=new Long(systime).toString();\n\t\t\n\t\tSystem.out.println(\"orderTimeStamp:\"+orderTimeStamp);\n\t\tbizContent.setOrderTimeStamp(orderTimeStamp);//生成请求的时间,必输\n\t\t\n\t\tbizContent.setZoneno(\"00200\");//地区号号,选输,5位数字,上送值联系对接分行提供\n\t\tbizContent.setBrno(\"00260\");//网点号,选输,5位数字,上送值联系对接分行提供\n\t\t\n\t\trequest.setBizContent(bizContent);\n\t\tSystem.out.println(client.buildPostForm(request));// 实际调用时的相关返回结果及异常处理,请自行添加\n\t}", "dkk mo4509g();", "private void generatePrivacyKeyPair(boolean clientMode) throws IOException, UnsupportedEncodingException, NoSuchAlgorithmException, SaslException {\n byte[] ccmagic = CLIENT_CONF_MAGIC.getBytes(encoding);\n byte[] scmagic = SVR_CONF_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n int n;\n if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_40])) {\n n = 5;\n } else if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_56])) {\n n = 7;\n } else {\n n = 16;\n }\n byte[] keyBuffer = new byte[n + ccmagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, n);\n System.arraycopy(ccmagic, 0, keyBuffer, n, ccmagic.length);\n md5.update(keyBuffer);\n byte[] Kcc = md5.digest();\n System.arraycopy(scmagic, 0, keyBuffer, n, scmagic.length);\n md5.update(keyBuffer);\n byte[] Kcs = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST24:Kcc: \", Kcc);\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST25:Kcs: \", Kcs);\n }\n byte[] myKc;\n byte[] peerKc;\n if (clientMode) {\n myKc = Kcc;\n peerKc = Kcs;\n } else {\n myKc = Kcs;\n peerKc = Kcc;\n }\n try {\n SecretKey encKey;\n SecretKey decKey;\n if (negotiatedCipher.indexOf(CIPHER_TOKENS[RC4]) > -1) {\n encCipher = Cipher.getInstance(\"RC4\");\n decCipher = Cipher.getInstance(\"RC4\");\n encKey = new SecretKeySpec(myKc, \"RC4\");\n decKey = new SecretKeySpec(peerKc, \"RC4\");\n encCipher.init(Cipher.ENCRYPT_MODE, encKey);\n decCipher.init(Cipher.DECRYPT_MODE, decKey);\n } else if ((negotiatedCipher.equals(CIPHER_TOKENS[DES])) || (negotiatedCipher.equals(CIPHER_TOKENS[DES3]))) {\n String cipherFullname, cipherShortname;\n if (negotiatedCipher.equals(CIPHER_TOKENS[DES])) {\n cipherFullname = \"DES/CBC/NoPadding\";\n cipherShortname = \"des\";\n } else {\n cipherFullname = \"DESede/CBC/NoPadding\";\n cipherShortname = \"desede\";\n }\n encCipher = Cipher.getInstance(cipherFullname);\n decCipher = Cipher.getInstance(cipherFullname);\n encKey = makeDesKeys(myKc, cipherShortname);\n decKey = makeDesKeys(peerKc, cipherShortname);\n IvParameterSpec encIv = new IvParameterSpec(myKc, 8, 8);\n IvParameterSpec decIv = new IvParameterSpec(peerKc, 8, 8);\n encCipher.init(Cipher.ENCRYPT_MODE, encKey, encIv);\n decCipher.init(Cipher.DECRYPT_MODE, decKey, decIv);\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST26:\" + negotiatedCipher + \" IVcc: \", encIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST27:\" + negotiatedCipher + \" IVcs: \", decIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST28:\" + negotiatedCipher + \" encryption key: \", encKey.getEncoded());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST29:\" + negotiatedCipher + \" decryption key: \", decKey.getEncoded());\n }\n }\n } catch (InvalidKeySpecException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported key \" + \"specification used.\", e);\n } catch (InvalidAlgorithmParameterException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid cipher \" + \"algorithem parameter used to create cipher instance\", e);\n } catch (NoSuchPaddingException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported \" + \"padding used for chosen cipher\", e);\n } catch (InvalidKeyException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid data \" + \"used to initialize keys\", e);\n }\n }", "public Builder setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPkiTypeBytes(value);\n return this;\n }", "java.lang.String getPublicEciesKey();", "OpenSSLKey mo134201a();", "public abstract String getSigAlgOID();", "private void generateIntegrityKeyPair(boolean clientMode) throws UnsupportedEncodingException, IOException, NoSuchAlgorithmException {\n byte[] cimagic = CLIENT_INT_MAGIC.getBytes(encoding);\n byte[] simagic = SVR_INT_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n byte[] keyBuffer = new byte[H_A1.length + cimagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, H_A1.length);\n System.arraycopy(cimagic, 0, keyBuffer, H_A1.length, cimagic.length);\n md5.update(keyBuffer);\n byte[] Kic = md5.digest();\n System.arraycopy(simagic, 0, keyBuffer, H_A1.length, simagic.length);\n md5.update(keyBuffer);\n byte[] Kis = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST12:Kic: \", Kic);\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST13:Kis: \", Kis);\n }\n if (clientMode) {\n myKi = Kic;\n peerKi = Kis;\n } else {\n myKi = Kis;\n peerKi = Kic;\n }\n }", "public final String mo1957a() {\n return \"type.googleapis.com/google.crypto.tink.EciesAeadHkdfPublicKey\";\n }", "private native String native_ks(long cookie, byte[] userKey);", "@Override\n public ConcurrentContentSigner newSigner(\n String type, SignerConf conf, X509Cert[] certificateChain)\n throws ObjectCreationException {\n type = type.toLowerCase(Locale.ROOT);\n if (!types.contains(type)) {\n throw new ObjectCreationException(\"unknown signer type \" + type);\n }\n\n String str = conf.getConfValue(\"parallelism\");\n int parallelism = 20;\n if (str != null) {\n try {\n parallelism = Integer.parseInt(str);\n } catch (NumberFormatException ex) {\n throw new ObjectCreationException(\"invalid parallelism \" + str);\n }\n\n if (parallelism < 1) {\n throw new ObjectCreationException(\"invalid parallelism \" + str);\n }\n }\n\n str = conf.getConfValue(\"alias\");\n if (str == null) {\n throw new ObjectCreationException(\"alias is not specified\");\n }\n int keyId = Integer.parseInt(str);\n\n String algoName = conf.getConfValue(\"algo\");\n if (algoName == null) {\n throw new ObjectCreationException(\"algo is not specified\");\n }\n\n try {\n InitStatus initStatus = init(type);\n if (initStatus.status.get() != 1) {\n throw new ObjectCreationException(initStatus.details);\n }\n\n SignAlgo algo = SignAlgo.getInstance(algoName);\n String keyAlgoName;\n String bcKeyAlgoName;\n if (algo.isSM2SigAlgo()) {\n keyAlgoName = \"SM2\";\n bcKeyAlgoName = \"EC\";\n } else if (algo.isRSAPkcs1SigAlgo() || algo.isRSAPSSSigAlgo()) {\n keyAlgoName = \"RSA\";\n bcKeyAlgoName = \"RSA\";\n } else if (algo.isECDSASigAlgo() || algo.isPlainECDSASigAlgo()) {\n keyAlgoName = \"EC\";\n bcKeyAlgoName = \"EC\";\n } else {\n throw new ObjectCreationException(\"unsupported algo \" + algoName);\n }\n\n Provider provider = providerMap.get(type);\n\n // Method to read create PrivateKey and PublicKey object.\n // SANSEC use KeyPairGenerator.generateKeyPair to read the keypair-\n // No new keypair will be generated here.\n KeyPairGenerator kpGen = KeyPairGenerator.getInstance(keyAlgoName, provider);\n kpGen.initialize(keyId << 16);\n KeyPair kp = kpGen.generateKeyPair();\n\n PublicKey publicKey = KeyFactory.getInstance(bcKeyAlgoName, \"BC\")\n .generatePublic(new X509EncodedKeySpec(kp.getPublic().getEncoded()));\n\n return new JceSignerBuilder(kp.getPrivate(), publicKey, certificateChain, provider)\n .createSigner(algo, parallelism);\n } catch (GeneralSecurityException | XiSecurityException ex) {\n throw new ObjectCreationException(ex.getMessage(), ex);\n }\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv xgetCryptProviderType();", "liubaninc.m0.pki.CertificatesOuterClass.CertificatesOrBuilder getCertificatesOrBuilder();", "liubaninc.m0.pki.CertificatesOuterClass.CertificatesOrBuilder getCertificatesOrBuilder();", "boolean hasPkiData();", "@java.lang.Override\n public com.google.protobuf.ByteString getPkiData() {\n return pkiData_;\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public interface PublicKey {\n\n /**\n * Returns id of the public key.\n *\n * @return id of key\n */\n String getId();\n\n /**\n * Returns ids from gpg sub keys.\n *\n * @return sub key ids\n * @since 2.19.0\n */\n default Set<String> getSubkeys() {\n return Collections.emptySet();\n }\n\n /**\n * Returns the username of the owner or an empty optional.\n *\n * @return owner or empty optional\n */\n Optional<String> getOwner();\n\n /**\n * Returns raw of the public key.\n *\n * @return raw of key\n */\n String getRaw();\n\n /**\n * Returns the contacts of the publickey.\n *\n * @return owner or empty optional\n */\n Set<Person> getContacts();\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param stream stream of data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n boolean verify(InputStream stream, byte[] signature);\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param data data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n default boolean verify(byte[] data, byte[] signature) {\n return verify(new ByteArrayInputStream(data), signature);\n }\n}", "liubaninc.m0.pki.CertificatesOuterClass.Certificates getCertificates();", "liubaninc.m0.pki.CertificatesOuterClass.Certificates getCertificates();", "public String mo34971a() {\n return \"SHA-384\";\n }", "public interface JsonKey {\n\n String CLASS = \"class\";\n String DATA = \"data\";\n String EKS = \"eks\";\n String ID = \"id\";\n String LEVEL = \"level\";\n String MESSAGE = \"message\";\n String METHOD = \"method\";\n String REQUEST_MESSAGE_ID = \"msgId\";\n String STACKTRACE = \"stacktrace\";\n String VER = \"ver\";\n String OK = \"ok\";\n String LOG_LEVEL = \"logLevel\";\n String ERROR = \"error\";\n String EMPTY_STRING = \"\";\n String RESPONSE = \"response\";\n String ADDRESS = \"address\";\n String KEY = \"key\";\n String ERROR_MSG = \"error_msg\";\n String ATTRIBUTE = \"attribute\";\n String ERRORS = \"errors\";\n String SUCCESS = \"success\";\n\n String CERTIFICATE = \"certificate\";\n String RECIPIENT_NAME = \"recipientName\";\n String COURSE_NAME = \"courseName\";\n String NAME = \"name\";\n String HTML_TEMPLATE = \"htmlTemplate\";\n String TAG = \"tag\";\n String ISSUER = \"issuer\";\n String URL = \"url\";\n String SIGNATORY_LIST = \"signatoryList\";\n String DESIGNATION = \"designation\";\n String SIGNATORY_IMAGE = \"image\";\n\n String DOMAIN_URL = \"sunbird_cert_domain_url\";\n String ASSESSED_DOMAIN = \"ASSESSED_DOMAIN\";\n String BADGE_URL = \"BADGE_URL\";\n String ISSUER_URL = \"ISSUER_URL\";\n String TEMPLATE_URL = \"TEMPLATE_URL\";\n String CONTEXT = \"CONTEXT\";\n String VERIFICATION_TYPE = \"VERIFICATION_TYPE\";\n String SIGNATORY_EXTENSION = \"SIGNATORY_EXTENSION\";\n String RECIPIENT_EMAIl = \"recipientEmail\";\n String RECIPIENT_PHONE = \"recipientPhone\";\n String RECIPIENT_ID = \"recipientId\";\n String VALID_FROM = \"validFrom\";\n String EXPIRY = \"expiry\";\n String OLD_ID = \"oldId\";\n String PUBLIC_KEY = \"publicKey\";\n String DESCRIPTION = \"description\";\n String LOGO = \"logo\";\n String ISSUE_DATE = \"issueDate\";\n String USER = \"user\";\n String CERTIFICATE_NAME = \"name\";\n\n String CONTAINER_NAME = \"CONTAINER_NAME\";\n String CLOUD_STORAGE_TYPE = \"CLOUD_STORAGE_TYPE\";\n String CLOUD_UPLOAD_RETRY_COUNT = \"CLOUD_UPLOAD_RETRY_COUNT\";\n String AZURE_STORAGE_SECRET = \"AZURE_STORAGE_SECRET\";\n String AZURE_STORAGE_KEY = \"AZURE_STORAGE_KEY\";\n String ACCESS_CODE_LENGTH = \"ACCESS_CODE_LENGTH\";\n String ORG_ID = \"orgId\";\n String KEYS = \"keys\";\n String ENC_SERVICE_URL = \"sunbird_cert_enc_service_url\";\n String SIGN_HEALTH_CHECK_URL = \"SIGN_HEALTH_CHECK_URL\";\n String SIGN_URL = \"SIGN_URL\";\n String SIGN_VERIFY_URL = \"SIGN_VERIFY_URL\";\n String SIGN_CREATOR = \"SIGN_CREATOR\";\n String SIGN = \"sign\";\n String VERIFY = \"verify\";\n String KEY_ID = \"keyId\";\n String JSON_URL = \"jsonUrl\";\n String PDF_URL = \"pdfUrl\";\n String UNIQUE_ID = \"id\";\n String GENERATE_CERT = \"generateCert\";\n String PUBLIC_KEY_URL = \"PUBLIC_KEY_URL\";\n String GET_SIGN_URL = \"getSignUrl\";\n String SIGNED_URL = \"signedUrl\";\n\n String ACCESS_CODE = \"accessCode\";\n String JSON_DATA = \"jsonData\";\n String SLUG = \"sunbird_cert_slug\";\n}", "BigInteger getCEP();", "java.lang.String getPubkey();", "public void setCertiType(java.lang.String certiType) {\n this.certiType = certiType;\n }", "public abstract String getSigAlgName();", "@Schema(required = true, description = \"Contract type (KIP-7, KIP-17, ERC-20, ERC-721)\")\n public String getType() {\n return type;\n }", "public ProfileKey getProfileKey(String username, String type) throws ProfileKeyManagerPersistenceException {\n ParameterHelpers.checkParameter(username, \"username\");\n\n boolean registered = checkType(type);\n\n Connection connection = getConnection();\n\n try {\n return getProfileKey(connection, username, type, registered);\n } finally {\n closeConnection(connection);\n }\n }", "protected CryptoProvider() {\n\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public Builder clearPkiType() {\n copyOnWrite();\n instance.clearPkiType();\n return this;\n }", "private X509Certificate generateSelfSignedCertificateWithFakeSignature(PublicKey publicKey) throws IOException, CertificateParsingException {\n byte[] signature;\n AlgorithmIdentifier sigAlgId;\n V3TBSCertificateGenerator tbsGenerator = new V3TBSCertificateGenerator();\n int i = this.mKeymasterAlgorithm;\n if (i == 1) {\n signature = new byte[1];\n sigAlgId = new AlgorithmIdentifier(PKCSObjectIdentifiers.sha256WithRSAEncryption, DERNull.INSTANCE);\n } else if (i == 3) {\n sigAlgId = new AlgorithmIdentifier(X9ObjectIdentifiers.ecdsa_with_SHA256);\n ASN1EncodableVector v = new ASN1EncodableVector();\n v.add(new DERInteger(0));\n v.add(new DERInteger(0));\n signature = new DERSequence().getEncoded();\n } else {\n throw new ProviderException(\"Unsupported key algorithm: \" + this.mKeymasterAlgorithm);\n }\n byte[] signature2 = signature;\n ASN1InputStream publicKeyInfoIn = new ASN1InputStream(publicKey.getEncoded());\n tbsGenerator.setSubjectPublicKeyInfo(SubjectPublicKeyInfo.getInstance(publicKeyInfoIn.readObject()));\n publicKeyInfoIn.close();\n tbsGenerator.setSerialNumber(new ASN1Integer(this.mSpec.getCertificateSerialNumber()));\n X509Principal subject = new X509Principal(this.mSpec.getCertificateSubject().getEncoded());\n tbsGenerator.setSubject(subject);\n tbsGenerator.setIssuer(subject);\n tbsGenerator.setStartDate(new Time(this.mSpec.getCertificateNotBefore()));\n tbsGenerator.setEndDate(new Time(this.mSpec.getCertificateNotAfter()));\n tbsGenerator.setSignature(sigAlgId);\n TBSCertificate tbsCertificate = tbsGenerator.generateTBSCertificate();\n ASN1EncodableVector result = new ASN1EncodableVector();\n result.add(tbsCertificate);\n result.add(sigAlgId);\n result.add(new DERBitString(signature2));\n return new X509CertificateObject(Certificate.getInstance(new DERSequence(result)));\n throw result;\n }", "public interface Key {\n\n String SHARE_KEY = \"userIndo\";//用户信息\n String SHARE_USER_ID = \"userId\";//用户账号\n\n}", "private byte[] getKey(KeyType keytype) {\n byte[] key = new byte[1];\n key[0] = (byte) keytype.ordinal();\n return key;\n }", "liubaninc.m0.pki.CertificateOuterClass.Certificate getCertificate();", "@ParameterizedTest\n @EnumSource(KeyType.class)\n void testMissingJWTPublicKey(KeyType keyType) throws NoSuchAlgorithmException {\n final Pair<String, PrivateKey> keyPair = generateKeypair(keyType);\n\n final String jwt = Jwts.builder()\n .setHeaderParam(\"kid\", UUID.randomUUID())\n .setAudience(String.format(\"%sToken/auth\", \"here\"))\n .setIssuer(\"macaroon\")\n .setSubject(\"macaroon\")\n .setId(UUID.randomUUID().toString())\n .setExpiration(Date.from(Instant.now().plus(5, ChronoUnit.MINUTES)))\n .signWith(keyPair.getRight(), APIAuthHelpers.getSigningAlgorithm(keyType))\n .compact();\n\n // Submit the JWT\n Response response = RESOURCE.target(\"/v1/Token/auth\")\n .queryParam(\"scope\", \"system/*.*\")\n .queryParam(\"grant_type\", \"client_credentials\")\n .queryParam(\"client_assertion_type\", TokenResource.CLIENT_ASSERTION_TYPE)\n .queryParam(\"client_assertion\", jwt)\n .request()\n .post(Entity.entity(\"\", MediaType.APPLICATION_FORM_URLENCODED));\n\n assertEquals(401, response.getStatus(), \"Should be unauthorized\");\n assertTrue(response.readEntity(String.class).contains(\"Cannot find public key\"), \"Should have correct exception\");\n }", "public ECP getPublicKGCKey(){return pkS;}", "@Override\n public byte[] generateKey() throws ProtocolException, IOException {\n BigInteger p, q, n, e, d;\n Polynomial pol;\n do {\n // we want e such that GCD(e, phi(p*q))=1. as e is actually fixed\n // below, then we need to search for suitable p and q\n p = generateCofactor();\n q = generateCofactor();\n n = computeModulus(p, q);\n e = generatePublicExponent(p, q);\n } while (!verifyCofactors(p, q, e));\n d = computePrivateExponent(p, q, e);\n pol = generatePolynomial(p, q, d);\n BigInteger[] shares = ProtocolUtil.generateShares(pol, tparams.getParties());\n RSAPrivateCrtKey[] packedShares = packShares(e, shares, n);\n try {\n storeShares(packedShares);\n } catch (SmartCardException ex) {\n throw new ProtocolException(\n \"Error while communicating with smart card: \" + ex.toString());\n }\n\n RSAPublicKey pk = SignatureUtil.RSA.paramsToRSAPublicKey(e, n);\n return pk.getEncoded();\n }", "private TPM_DIGEST createEmptyPubKeyHash()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public String getTlsKey();", "@Test\n\tpublic void testSecuirtyConfigsOperations() throws NoSuchAlgorithmException {\n\t\t// Generate and store keys for the first time\n\t\tServerKeyPairs serverKeyPairs1 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair1 = serverKeyPairs1.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair1 = serverKeyPairs1.getSignatureKeyPair();\n\n\t\t// Initialize a new serverKeyPairs to test that it will only read\n\t\t// previously generated keys\n\t\tServerKeyPairs serverKeyPairs2 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair2 = serverKeyPairs2.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair2 = serverKeyPairs2.getSignatureKeyPair();\n\n\t\tassertEquals(\"Wrong loaded encryption public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded encryption private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getPrivateExponent());\n\n\t\tassertEquals(\"Wrong loaded signature public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded signature private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getPrivateExponent());\n\t}", "public PIEBankPlatinumKey() {\n\tsuper();\n}", "private KeyPair generateKeyPair() {\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n keyGen.initialize(2048, random);\n return keyGen.generateKeyPair();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n return null;\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STAlgType.Enum getCryptAlgorithmType();", "private void setSignatureType(byte type) \r\n \t //@ requires signatureType |-> ?theSignatureType &*& theSignatureType != null &*& theSignatureType.length == 1 &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(?ta) &*& foreachp(ta, transient_byte_array);\r\n \t //@ ensures signatureType |-> theSignatureType &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(ta) &*& foreachp(ta, transient_byte_array);\r\n\t{\r\n\t\t//@ transient_byte_arrays_mem(theSignatureType);\r\n\t\t//@ foreachp_remove(theSignatureType, ta);\r\n\t\t//@ open transient_byte_array(theSignatureType);\r\n\t\tsignatureType[0] = type;\r\n\t\t//@ close transient_byte_array(theSignatureType);\r\n\t\t//@ foreachp_unremove(theSignatureType, ta);\r\n\t}", "public static void main(String[] args) {\n KeyPairGenerator keygen = null;\n try {\n keygen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secrand = new SecureRandom();\n // secrand.setSeed(\"17\".getBytes());//初始化随机产生器\n keygen.initialize(2048, secrand);\n KeyPair keys = keygen.genKeyPair();\n PublicKey publicKey = keys.getPublic();\n PrivateKey privateKey = keys.getPrivate();\n String pubKey = Base64.encode(publicKey.getEncoded());\n String priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n System.out.println(\"priKey = \" + new String(priKey));\n\n/*\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(pubkey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n pubKey = Base64.encode(publicKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n*/\n\n/*\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(prikey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = keyFactory.generatePrivate(keySpec);\n priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"priKey = \" + new String(priKey));\n*/\n //(N,e)是公钥\n RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;\n System.out.println(\"RSAPublicKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPublicKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPublicKey.getModulus().toString());//n\n System.out.println(\"PublicExponent.length=\" +\n rsaPublicKey.getPublicExponent().bitLength());\n System.out.println(\"PublicExponent=\" + rsaPublicKey.getPublicExponent().toString());//e\n\n\n //(N,d)是私钥\n RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;\n System.out.println(\"RSAPrivateKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPrivateKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPrivateKey.getModulus().toString());//n\n System.out.println(\"PrivateExponent.length=\" +\n rsaPrivateKey.getPrivateExponent().bitLength());\n System.out.println(\"PrivateExponent=\" + rsaPrivateKey.getPrivateExponent().toString());//d\n\n String encodeData = encode(\" public static String encode(String toEncode,String D, String N) {\\n\" +\n \" // BigInteger var2 = new BigInteger(\\\"17369712262290647732768133445861332449863405383733306695896586821166245382729380222118948668590047591903813382253186640467063376463309880263824085810383552963627855603429835060435976633955217307266714318344160886538360012623239010786668755679438900124601074924850696725233212494777766999123952653273738958617798460338184668049410136792403729341479373919634041235053823478242208651592611582439749292909499663165109004083820192135244694907138372731716013807836312280426304459316963033144149631900633817073029029413556757588486052978078614048837784810650766996280232645714319416096306667876390555673421669667406990886847\\\");\\n\" +\n \" // BigInteger var3 = new BigInteger(\\\"65537\\\");\\n\" +\n \" int MAX_ENCRYPT_BLOCK = 128;\\n\" +\n \" int offSet = 0;\\n\" +\n \" byte[] cache;\\n\" +\n \" int i = 0;\\n\" +\n \" ByteArrayOutputStream out = new ByteArrayOutputStream();\\n\" +\n \" try {\\n\" +\n \" RSAPrivateKeySpec rsaPrivateKeySpec = new java.security.spec.RSAPrivateKeySpec(new BigInteger(N),new BigInteger(D));\\n\" +\n \" KeyFactory keyFactory = java.security.KeyFactory.getInstance(\\\"RSA\\\");\\n\" +\n \" PrivateKey privateKey = keyFactory.generatePrivate(rsaPrivateKeySpec);\\n\" +\n \" Cipher cipher = javax.crypto.Cipher.getInstance(\\\"RSA\\\");\\n\" +\n \" cipher.init(Cipher.ENCRYPT_MODE,privateKey);\\n\" +\n \"\\n\" +\n \" byte[] data = toEncode.getBytes(StandardCharsets.UTF_8);\\n\" +\n \" int inputLen = data.length;\\n\" +\n \" // 对数据分段加密\\n\" +\n \" while (inputLen - offSet > 0) {\\n\" +\n \" if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {\\n\" +\n \" cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);\\n\" +\n \" } else {\\n\" +\n \" cache = cipher.doFinal(data, offSet, inputLen - offSet);\\n\" +\n \" }\\n\" +\n \" out.write(cache, 0, cache.length);\\n\" +\n \" i++;\\n\" +\n \" offSet = i * MAX_ENCRYPT_BLOCK;\\n\" +\n \" }\\n\" +\n \" byte[] datas = out.toByteArray();\\n\" +\n \" out.close();\\n\" +\n \"\\n\" +\n \" //byte[] datas = datas = cipher.doFinal(toEncode.getBytes());\\n\" +\n \" datas = org.apache.commons.codec.binary.Base64.encodeBase64(datas);\\n\" +\n \" return new String(datas,StandardCharsets.UTF_8);\\n\" +\n \" } catch (NoSuchAlgorithmException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeySpecException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (NoSuchPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeyException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (BadPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IllegalBlockSizeException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IOException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" }\\n\" +\n \" return null;\\n\" +\n \" }\",rsaPrivateKey.getPrivateExponent().toString(),rsaPrivateKey.getModulus().toString());\n String decodeData = decode(encodeData,rsaPublicKey.getPublicExponent().toString(),rsaPublicKey.getModulus().toString());\n\n System.out.println(encodeData);\n System.out.println(decodeData);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }/* catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }*/\n }", "public MEKeyTool() {\n keystore = new PublicKeyStoreBuilderBase();\n }", "public PrivateKeyType getPivateKeyType() {\n return PrivateKeyType.SAPLING_EXTENED_SPEND_KEY;\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STAlgType xgetCryptAlgorithmType();", "public final KeyPair generateKeyPair() {\n\t\tif (SECURE_RANDOM == null) {\n\t\t\tSECURE_RANDOM = new SecureRandom();\n\t\t}\n\t\t// for p and q we divide the bits length by 2 , as they create n, \n\t\t// which is the modulus and actual key size is depend on it\n\t\tBigInteger p = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\tBigInteger q;\n\t\tdo {\n\t\t\tq = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\t} while (q.compareTo(p) == 0);\n\n\t\t// lambda = lcm(p-1, q-1) = (p-1)*(q-1)/gcd(p-1, q-1)\n\t\tBigInteger lambda = p.subtract(BigInteger.ONE).multiply(q\n\t\t\t\t.subtract(BigInteger.ONE)).divide(p.subtract(BigInteger.ONE)\n\t\t\t\t.gcd(q.subtract(BigInteger.ONE)));\n\n\t\tBigInteger n = p.multiply(q); // n = p*q\n\t\tBigInteger nsquare = n.multiply(n); // nsquare = n*n\n\t\tBigInteger g;\n\t\tdo {\n\t\t\t// generate g, a random integer in Z*_{n^2}\n\t\t\tdo {\n\t\t\t\tg = new BigInteger(STRENGTH, 64, SECURE_RANDOM);\n\t\t\t} while (g.compareTo(nsquare) >= 0\n\t\t\t\t\t|| g.gcd(nsquare).intValue() != 1);\n\n\t\t\t// verify g, the following must hold: gcd(L(g^lambda mod n^2), n) =\n\t\t\t// 1,\n\t\t\t// where L(u) = (u-1)/n\n\t\t} while (g.modPow(lambda, nsquare).subtract(BigInteger.ONE).divide(n)\n\t\t\t\t.gcd(n).intValue() != 1);\n\n\t\t// mu = (L(g^lambda mod n^2))^{-1} mod n, where L(u) = (u-1)/n\n\t\tBigInteger mu = g.modPow(lambda, nsquare).subtract(BigInteger.ONE)\n\t\t\t\t.divide(n).modInverse(n);\n\n\t\tPaillierPublicKey publicKey = new PaillierPublicKey(n, g, nsquare);\n\t\tPaillierPrivateKey privateKey = new PaillierPrivateKey(lambda, mu,\n\t\t\t\tnsquare, n);\n\n\t\treturn new KeyPair(publicKey, privateKey);\n\t}", "public void setPrincipalType(String principalType){\n this.principalType = principalType;\n //Update hashMap value..\n hashMap.put(\"principalType\", principalType);\n }", "public static void main(String[] args) {\n String keyFile = \"D:\\\\data\\\\kms\\\\liweigang.idc\";\n String message = \"dksf3r38324hrewjrh3r&^%djfdsjkek\";\n String pubmatrix = \"D:\\\\data\\\\kms\\\\sm2cpk.cn.pkm\";\n\n byte[] keycard = Tool.ReadFile(keyFile);\n System.out.println(\"keyCard:\" + Tool.Bytes2Hex(keycard));\n\n //得到私钥\n byte[] priKey = GMJni.GetPriKey(keycard);\n String priKeyHex = Tool.Bytes2Hex(priKey);\n System.out.println(\"private key:\" + priKeyHex);\n\n //得到密钥标识\n byte[] keyId = GMJni.GetKeyId(keycard);\n System.out.println(\"keyId:\" + Tool.Bytes2String(keyId));\n\n //得到公钥\n byte[] pubKey = GMJni.CalPubKey(Tool.String2Bytes(pubmatrix), keyId);\n System.out.println(\"public key:\" + Tool.Bytes2Hex(pubKey));\n\n //1000个不同message\n List<String> msgList = new ArrayList<>(12);\n for (int i = 0; i < 1000; i++) {\n //message基础上字符串长度+10\n msgList.add(message + RandomUtil.randomString(10));\n }\n long start = System.currentTimeMillis();\n //签名结果\n int rv = 0;\n //缓存\n MapCache cache = new MapCache();\n //命中缓存次数\n int count = 0;\n int count2 = 0;\n for (int i = 0; i < 100000; i++) {\n System.out.println(\"模拟请求第\" + i + \"次数\");\n\n //计算E值\n //30种不同的message,即仅30个不走缓存\n byte[] E = GMJni.SM2GetE(keyId, pubKey, Tool.String2Bytes(msgList.get(new Random().nextInt(30))));\n String hexE = Tool.Bytes2Hex(E);\n// System.out.println(\"E:\" + hexE);\n\n //SM2签名\n byte[] sig = GMJni.SM2Sign(priKey, E);\n// System.out.println(\"private key:\" + Tool.Bytes2Hex(priKey));\n// System.out.println(\"sign value:\" + Tool.Bytes2Hex(sig));\n\n // SM2签名验证\n // 引入Map缓存 E,sig的16进制的MD5值\n String hex = hexE + priKeyHex;\n// System.out.println(\"finalStr:\" + hex);\n String md5 = SecureUtil.md5(hex);\n if (null != cache.get(md5)) {\n count++;\n// System.out.println(\"命中缓存\" + (++count));\n } else {\n rv += GMJni.SM2Verify(pubKey, E, sig);\n count2++;\n cache.add(md5, (byte) 1, 50 * 1000);\n }\n }\n long end = System.currentTimeMillis();\n double v = (end - start) / 1000.0;\n System.out.println(\"time consuming:\" + v + \" sec\");\n System.out.println(Math.round(100000 / v) + \" times/sec\");\n System.out.println(\"命中缓存\" + (count));\n System.out.println(\"未命中\" + (count2));\n if (rv != 0) {\n System.out.println(\"Verify signature fail, error code is \" + String.valueOf(rv));\n } else {\n System.out.println(\"Verify signature success.\");\n }\n }", "private static String generateServerKey(Poi poi) {\n LonLat viewPoint = poi.getViewPosition();\n int lon = viewPoint.getLonInt();\n int lat = viewPoint.getLatInt();\n int alt = viewPoint.getAltInt();\n return generateServerKey(poi.getName(), poi.getAddress(), lon, lat, alt);\n }", "private String createTypeKey(int type, String key) {\r\n\t\treturn type + \"-\" + key;\r\n\t}", "public java.lang.String getCertiType() {\n return certiType;\n }", "java.lang.String getServerSecret();", "public static void registerDefaultAlgorithms() {\n/* 390 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#dsa-sha1\", SignatureDSA.class);\n/* */ \n/* */ \n/* 393 */ algorithmHash.put(\"http://www.w3.org/2009/xmldsig11#dsa-sha256\", SignatureDSA.SHA256.class);\n/* */ \n/* */ \n/* 396 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\", SignatureBaseRSA.SignatureRSASHA1.class);\n/* */ \n/* */ \n/* 399 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#hmac-sha1\", IntegrityHmac.IntegrityHmacSHA1.class);\n/* */ \n/* */ \n/* 402 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-md5\", SignatureBaseRSA.SignatureRSAMD5.class);\n/* */ \n/* */ \n/* */ \n/* 406 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160\", SignatureBaseRSA.SignatureRSARIPEMD160.class);\n/* */ \n/* */ \n/* */ \n/* 410 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\", SignatureBaseRSA.SignatureRSASHA256.class);\n/* */ \n/* */ \n/* 413 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha384\", SignatureBaseRSA.SignatureRSASHA384.class);\n/* */ \n/* */ \n/* 416 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512\", SignatureBaseRSA.SignatureRSASHA512.class);\n/* */ \n/* */ \n/* 419 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1\", SignatureECDSA.SignatureECDSASHA1.class);\n/* */ \n/* */ \n/* 422 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256\", SignatureECDSA.SignatureECDSASHA256.class);\n/* */ \n/* */ \n/* 425 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384\", SignatureECDSA.SignatureECDSASHA384.class);\n/* */ \n/* */ \n/* 428 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512\", SignatureECDSA.SignatureECDSASHA512.class);\n/* */ \n/* */ \n/* 431 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-md5\", IntegrityHmac.IntegrityHmacMD5.class);\n/* */ \n/* */ \n/* 434 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160\", IntegrityHmac.IntegrityHmacRIPEMD160.class);\n/* */ \n/* */ \n/* 437 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha256\", IntegrityHmac.IntegrityHmacSHA256.class);\n/* */ \n/* */ \n/* 440 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha384\", IntegrityHmac.IntegrityHmacSHA384.class);\n/* */ \n/* */ \n/* 443 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha512\", IntegrityHmac.IntegrityHmacSHA512.class);\n/* */ }", "public static void main(String[] args) {\n\t\tString algorithm = SignatureAlgorithm.HS256.getJcaName();\r\n\t\tSystem.out.println(algorithm);\r\n\r\n\t\t// set secret key\r\n\t\tString secret = \"this+is+my+scret+key+AAAAAAAAAAAAAAAAAAAAAAAAA\";\r\n\r\n\t\t// background information\r\n\t\t// =============================================================\r\n\t\t/*\r\n\t\t * the bytes of the secret key will be used by the signature algorithm - must be\r\n\t\t * in base 64 format\r\n\t\t */\r\n//\t\tbyte[] scretKeyEncoded = secret.getBytes(); // java encoding\r\n//\t\tbyte[] scretKeyDecoded = Base64.getDecoder().decode(secret); // base64\r\n//\t\tSystem.out.println(Arrays.toString(scretKeyEncoded));\r\n//\t\tSystem.out.println(Arrays.toString(scretKeyDecoded));\r\n\t\t// =====================================================================================\r\n\r\n\t\t// create the key from the decoded secret\r\n\t\tKey key = new SecretKeySpec(Base64.getDecoder().decode(secret), algorithm);\r\n\r\n\t\tInstant now = Instant.now();\r\n\r\n\t\t// create a JWT instance\r\n\t\tString jwt = Jwts.builder()\r\n\r\n\t\t\t\t.signWith(key)\r\n\r\n\t\t\t\t.setIssuedAt(Date.from(now))\r\n\r\n\t\t\t\t// will be valid for 10 seconds\r\n\t\t\t\t.setExpiration(Date.from(now.plus(10, ChronoUnit.SECONDS)))\r\n\r\n\t\t\t\t.setSubject(\"aaa@mail\")\r\n\r\n\t\t\t\t.claim(\"First name\", \"Dan\")\r\n\r\n\t\t\t\t.claim(\"Last name\", \"Levi\")\r\n\r\n\t\t\t\t.compact();\r\n\r\n\t\tSystem.out.println(jwt);\r\n\r\n\t\t// ==================================================\r\n\t\t// parse the JWS to get the expanded JWT\r\n//\t\tJWS - JSON Web Signature [aaaa.bbbb.cccc]\r\n//\t\tJWT - JSON Web Token [aaaa.bbbb.cccc]\r\n\r\n\t\tSystem.out.println(\"====================\");\r\n\t\tSystem.out.println(\"parsing the JWS to get a JWT\");\r\n\t\tJwtParser jwtParser = Jwts.parserBuilder().setSigningKey(key).build();\r\n\t\t// to demonstrate expiration paste an old JWS\r\n\t\tjwt = \"eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjA2Mzk1MTEsImV4cCI6MTYyMDYzOTUyMSwic3ViIjoiYWFhQG1haWwiLCJGaXJzdCBuYW1lIjoiRGFuIiwiTGFzdCBuYW1lIjoiTGV2aSJ9.cefEbBejjebKVILgOzca0LJZfd0F3qjezegeCaxOrfE\";\r\n\t\tSystem.out.println(jwtParser.parse(jwt));\r\n\t\tSystem.out.println(jwtParser.parse(jwt).getHeader());\r\n\t\tSystem.out.println(jwtParser.parse(jwt).getBody());\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\n KeyPairGenerator kpGen = KeyPairGenerator.getInstance(\"RSA\"); //create RSA KeyPairGenerator \n kpGen.initialize(2048, new SecureRandom()); //Choose key strength\n KeyPair keyPair = kpGen.generateKeyPair(); //Generate private and public keys\n PublicKey RSAPubKey = keyPair.getPublic();\n PrivateKey RSAPrivateKey = keyPair.getPrivate();\n\n //Information for Certificate\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\"); \n X500Name issuer = new X500Name(\"CN=\" + \"ExampleIssuer\"); // Issuer/Common Name\n X500Name subject = new X500Name(\"CN=\" + \"Client\"); //Subject\n Date notBefore = new Date(); //The date which the certificate becomes effective. \n long expiryDate = 1672437600000L; // expires 31 December 2022\n Date notAfter = new Date(expiryDate); //The date the certificate expires. \n BigInteger serialNumber = BigInteger.valueOf(Math.abs(random.nextInt())); //Cert Serial Number\n\n //Define the generator\n X509v3CertificateBuilder certGenerator \n = new JcaX509v3CertificateBuilder(\n issuer, \n serialNumber, \n notBefore,\n notAfter,\n subject,\n RSAPubKey\n );\n\n //Define how the certificate will be signed.\n //Usually with a hash algorithm and the Certificate Authority's private key. \n //Change argument x in .build(x) to not self-sign the cert.\n final ContentSigner contentSigner = new JcaContentSignerBuilder(\"SHA1WithRSAEncryption\").build(keyPair.getPrivate());\n\n //Generate a X.509 cert.\n X509CertificateHolder certificate = certGenerator.build(contentSigner);\n\n //Encode the certificate and write to a file. On Mac, you can open it with KeyChain Access\n //to confirm that it worked. \n byte[] encodedCert = certificate.getEncoded();\n FileOutputStream fos = new FileOutputStream(\"Example.cert\"); //Filename\n fos.write(encodedCert);\n fos.close();\n\n }", "private String getSignatureString(Type type)\r\n {\r\n if(type instanceof CompoundType)\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n CompoundType cType = (CompoundType)type;\r\n //find key and value types\r\n String keyType = getSignatureString(cType.keyType);\r\n sb.append(\"Ljava/util/HashMap\");\r\n sb.append(\"<\");\r\n sb.append(keyType);\r\n sb.append(getSignatureString(cType.valType));\r\n sb.append(\">;\");\r\n return sb.toString();\r\n }\r\n else if(type instanceof SimpleType)\r\n {\r\n switch(((SimpleType)type).type)\r\n {\r\n case INT:\r\n return \"Ljava/lang/Integer;\";\r\n case BOOLEAN:\r\n return \"Ljava/lang/Boolean;\";\r\n case STRING:\r\n return \"Ljava/lang/String;\";\r\n }\r\n }\r\n return null;\r\n }", "public CryptographyKeysCreator() {\n Random random = new Random();\n BigInteger prime1 = BigInteger.probablePrime(256, random);\n BigInteger prime2 = BigInteger.probablePrime(256, random);\n primesMultiplied = prime1.multiply(prime2);\n BigInteger phi = prime1.subtract(BigInteger.ONE).multiply(prime2.subtract(BigInteger.ONE));\n encryptingBigInt = BigInteger.probablePrime(256, random);\n\n while (phi.gcd(encryptingBigInt).compareTo(BigInteger.ONE) > 0 && encryptingBigInt.compareTo(phi) < 0) {\n encryptingBigInt = encryptingBigInt.add(BigInteger.ONE);\n }\n\n decryptingBigInt = encryptingBigInt.modInverse(phi);\n }", "public String getJCEProviderName() {\n/* 196 */ return this.signatureAlgorithm.engineGetJCEProviderName();\n/* */ }", "com.google.protobuf.ByteString getPublicEciesKeyBytes();", "public String getJCEAlgorithmString() {\n/* 187 */ return this.signatureAlgorithm.engineGetJCEAlgorithmString();\n/* */ }", "private void clearPkiData() {\n bitField0_ = (bitField0_ & ~0x00000004);\n pkiData_ = getDefaultInstance().getPkiData();\n }", "@Test\r\n public void testVerifyCryptoType() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n byte[] sign = instance.sign(data, keys);\r\n boolean result = instance.verify(data, sign, keys);\r\n assertTrue(result);\r\n }", "long getCryptProviderTypeExt();", "public static String getKeyTypeName(KeyType type)\n {\n // TODO: should be moved to DBProvider ...\n // MySQL : key identifier\n // SQLServer : key identifier\n // Derby : key identifier\n // PostgreSQL: key identifier\n switch (type) {\n // MySQL: key types ...\n case PRIMARY : return \"PRIMARY KEY\"; // table\n case UNIQUE : return \"UNIQUE\"; // table\n case INDEX : return \"INDEX\"; // table/index\n case UNIQUE_INDEX : return \"UNIQUE INDEX\"; // table/index\n default : return \"UNKNOWN\";\n }\n }", "@PostMapping(\"/createKeyPair\")\n public String createKeyPair() {\n \n AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();\n \n return \"Private uid: \"+ priuid +\"\\nPublic uid: \" + pubuid +\"\\n\";\n }", "long getCryptAlgorithmSid();", "switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}", "private KeyStore askForPin() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {\n char newPin[] = PinDialog.getPIN(this.providerDesc);\n try {\n KeyStore ks = getKeyStore(newPin);\n pin = newPin;\n return ks;\n } catch (IOException e2) {\n e2.printStackTrace();\n if (e2.getCause() instanceof LoginException) {\n JOptionPane.showMessageDialog(null, \"Wrong PIN\", \"Cryptographic card\", JOptionPane.WARNING_MESSAGE);\n }\n throw e2;\n }\n }", "public String getTlsKeyPath();", "public byte[] getUserKey() throws IOException\n {\n byte[] u = null;\n COSString user = (COSString)encryptionDictionary.getDictionaryObject( COSName.getPDFName( \"U\" ) );\n if( user != null )\n {\n u = user.getBytes();\n }\n return u;\n }", "@Override\n public String getProviderName() {\n return \"SimpleEncryptionKeyStoreProvider\";\n }", "public interface SKey {\n\n String FAIL_STORE = \"job.fail.store\";\n\n String LOADBALANCE = \"loadbalance\";\n\n String EVENT_CENTER = \"event.center\";\n\n String REMOTING = \"lts.remoting\";\n\n String REMOTING_SERIALIZABLE_DFT = \"lts.remoting.serializable.default\";\n\n String ZK_CLIENT_KEY = \"zk.client\";\n\n String JOB_ID_GENERATOR = \"id.generator\";\n\n String JOB_LOGGER = \"job.logger\";\n\n String JOB_QUEUE = \"job.queue\";\n}", "private void getKeyType(final PdfObject pdfObject, final int i, final byte[] raw, final int length, final int keyLength, final int keyStart, final int type) {\n if(debugFastCode)//used in debug\n {\n PDFkey = PdfDictionary.getKey(keyStart, keyLength, raw);\n }\n \n PDFkeyInt=PdfDictionary.getIntKey(keyStart,keyLength,raw);\n \n //correct mapping\n if(PDFkeyInt==PdfDictionary.Indexed && (type==PdfDictionary.MK ||type==PdfDictionary.Form || type==PdfDictionary.Linearized || type==PdfDictionary.Group)) {\n PDFkeyInt = PdfDictionary.I;\n }\n \n if(isInlineImage) {\n PDFkeyInt = PdfObjectFactory.getInlineID(PDFkeyInt);\n }\n \n final int id=pdfObject.getID();\n \n if(type==PdfDictionary.Resources && (PDFkeyInt==PdfDictionary.ColorSpace\n || PDFkeyInt==PdfDictionary.ExtGState || PDFkeyInt==PdfDictionary.Shading\n || PDFkeyInt==PdfDictionary.XObject || PDFkeyInt==PdfDictionary.Font|| PDFkeyInt==PdfDictionary.Pattern)){\n pdfKeyType=PdfDictionary.VALUE_IS_DICTIONARY_PAIRS;\n //}else if (type==PdfDictionary.Form && id== PdfDictionary.AA && PDFkeyInt== PdfDictionary.K){\n // pdfKeyType= PdfDictionary.VALUE_IS_UNREAD_DICTIONARY;\n }else if (type==PdfDictionary.Outlines && PDFkeyInt== PdfDictionary.D){\n PDFkeyInt= PdfDictionary.Dest;\n pdfKeyType= PdfDictionary.VALUE_IS_MIXED_ARRAY;\n }else if ((type==PdfDictionary.Form || type==PdfDictionary.MK) && PDFkeyInt== PdfDictionary.D){\n if(id==PdfDictionary.AP || id==PdfDictionary.AA){\n pdfKeyType= PdfDictionary.VALUE_IS_VARIOUS;\n }else if(id==PdfDictionary.Win){\n pdfKeyType= PdfDictionary.VALUE_IS_TEXTSTREAM;\n }else{\n PDFkeyInt= PdfDictionary.Dest;\n pdfKeyType= PdfDictionary.VALUE_IS_MIXED_ARRAY;\n }\n }else if ((type==PdfDictionary.Form || type==PdfDictionary.MK) && (id==PdfDictionary.AP || id==PdfDictionary.AA) && PDFkeyInt== PdfDictionary.A){\n pdfKeyType= PdfDictionary.VALUE_IS_VARIOUS;\n }else if (PDFkeyInt== PdfDictionary.Order && type==PdfDictionary.OCProperties){\n pdfKeyType= PdfDictionary. VALUE_IS_OBJECT_ARRAY;\n }else if (PDFkeyInt== PdfDictionary.Name && type==PdfDictionary.OCProperties){\n pdfKeyType= PdfDictionary.VALUE_IS_TEXTSTREAM;\n }else if ((type==PdfDictionary.ColorSpace || type==PdfDictionary.Function) && PDFkeyInt== PdfDictionary.N){\n pdfKeyType= PdfDictionary.VALUE_IS_FLOAT;\n }else if(PDFkeyInt==PdfDictionary.Gamma && type==PdfDictionary.ColorSpace &&\n pdfObject.getParameterConstant(PdfDictionary.ColorSpace)== ColorSpaces.CalGray){ //its a number not an array\n pdfKeyType= PdfDictionary.VALUE_IS_FLOAT;\n }else if(id==PdfDictionary.Win && pdfObject.getObjectType()==PdfDictionary.Form &&\n (PDFkeyInt==PdfDictionary.P || PDFkeyInt==PdfDictionary.O)){\n pdfKeyType= PdfDictionary.VALUE_IS_TEXTSTREAM;\n }else if (isInlineImage && PDFkeyInt==PdfDictionary.ColorSpace){\n pdfKeyType= PdfDictionary.VALUE_IS_DICTIONARY;\n }else {\n pdfKeyType = PdfDictionary.getKeyType(PDFkeyInt, type);\n }\n \n \n //handle array of Function in Shading by using keyArray\n if(id==PdfDictionary.Shading && PDFkeyInt==PdfDictionary.Function){\n \n //get next non number/char value\n int ptr=i;\n while((raw[ptr]>=48 && raw[ptr]<58) || raw[ptr]==32){\n ptr++;\n }\n \n if(raw[ptr]=='['){\n pdfKeyType=PdfDictionary.VALUE_IS_KEY_ARRAY;\n }\n }\n \n //allow for other values in D,N,R definitions\n if(pdfKeyType==-1 && id== PdfDictionary.ClassMap){\n pdfKeyType = Dictionary.getPairedValues(pdfObject, i, raw, pdfKeyType, length, keyLength, keyStart);\n }else\n //allow for other values in D,N,R definitions as key pairs\n if(((((id==PdfDictionary.N || id==PdfDictionary.D || id==PdfDictionary.R))) &&\n pdfObject.getParentID()==PdfDictionary.AP &&\n pdfObject.getObjectType()==PdfDictionary.Form\n && raw[i]!='[' )){\n \n //get next non number/char value\n int ptr=i;\n while((raw[ptr]>=48 && raw[ptr]<58) || raw[ptr]==32){\n ptr++;\n }\n \n //decide if pair\n if(raw[keyStart]=='L' && raw[keyStart+1]=='e' && raw[keyStart+2]=='n' && raw[keyStart+3]=='g' && raw[keyStart+4]=='t' && raw[keyStart+5]=='h'){\n }else if(raw[keyStart]=='O' && raw[keyStart+1]=='n'){\n }else if(raw[keyStart]=='O' && raw[keyStart+1]=='f' && raw[keyStart+2]=='f'){\n }else\n if(raw[ptr]=='R'){\n pdfKeyType = Dictionary.getPairedValues(pdfObject, i, raw, pdfKeyType, length, keyLength, keyStart);\n \n if(debugFastCode) {\n System.out.println(\"new Returns \" + pdfKeyType + \" i=\" + i);\n }\n }\n }\n \n /**/\n \n //DecodeParms can be an array as well as a dictionary so check next char and alter if so\n if(PDFkeyInt==PdfDictionary.DecodeParms) {\n pdfKeyType = setTypeForDecodeParams(i, raw, length, pdfKeyType);\n }\n \n if(debugFastCode && pdfKeyType==-1 && pdfObject.getObjectType()!=PdfDictionary.Page){\n System.out.println(id+\" \"+type);\n System.out.println(padding +PDFkey+\" NO type setting for \"+PdfDictionary.getKey(keyStart,keyLength,raw)+\" id=\"+i);\n }\n }", "public void setP_type(String p_type) {\n this.p_type = p_type;\n }", "public PaymentRecordKey() {\n super();\n }", "public RSAKeyPairGenerator() {\n }", "private PasskeyContract() {}", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((BaseApplication) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }", "org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv.Enum getCryptProviderType();", "java.lang.String getSignatureProviderId();", "private PayUmoneySdkInitializer.PaymentParam calculateServerSideHashAndInitiatePayment1(final PayUmoneySdkInitializer.PaymentParam paymentParam) {\n\n StringBuilder stringBuilder = new StringBuilder();\n HashMap<String, String> params = paymentParam.getParams();\n stringBuilder.append(params.get(PayUmoneyConstants.KEY) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.TXNID) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.AMOUNT) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.PRODUCT_INFO) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.FIRSTNAME) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.EMAIL) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF1) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF2) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF3) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF4) + \"|\");\n stringBuilder.append(params.get(PayUmoneyConstants.UDF5) + \"||||||\");\n\n AppEnvironment appEnvironment = ((AppController) getApplication()).getAppEnvironment();\n stringBuilder.append(appEnvironment.salt());\n\n String hash = hashCal(stringBuilder.toString());\n paymentParam.setMerchantHash(hash);\n\n return paymentParam;\n }" ]
[ "0.67265475", "0.66766536", "0.65099293", "0.65028304", "0.6262208", "0.610079", "0.5888525", "0.5814085", "0.57488453", "0.5741013", "0.55434763", "0.5495098", "0.547463", "0.5293663", "0.5267275", "0.52484345", "0.5236787", "0.51757306", "0.50184387", "0.5009232", "0.4963339", "0.49510905", "0.49432135", "0.49177194", "0.49026552", "0.48897362", "0.4852516", "0.4852516", "0.48464367", "0.4837918", "0.48329684", "0.48329684", "0.48329684", "0.4827723", "0.48225248", "0.48225248", "0.48222625", "0.48206112", "0.48032084", "0.47844216", "0.47589076", "0.47568366", "0.47562766", "0.475171", "0.47300357", "0.47230795", "0.4722094", "0.4707639", "0.47028682", "0.4702566", "0.47019628", "0.46886435", "0.46737474", "0.46649238", "0.46241516", "0.46185207", "0.46162042", "0.4614444", "0.46140233", "0.46073017", "0.46071345", "0.4599757", "0.45933524", "0.45887133", "0.45851716", "0.4582875", "0.45752436", "0.45748132", "0.45720893", "0.45628002", "0.4562682", "0.4560899", "0.45528138", "0.45517504", "0.45498374", "0.45371762", "0.45361403", "0.4531953", "0.453109", "0.45296288", "0.4523701", "0.45182464", "0.45178583", "0.45135707", "0.4513127", "0.4508099", "0.45017824", "0.44983628", "0.4494895", "0.44948786", "0.44942138", "0.4491818", "0.44907737", "0.4488338", "0.4486263", "0.4485628", "0.44769597", "0.44763568", "0.4473159", "0.44716462" ]
0.6249799
5
depends on pki_type optional bytes pki_data = 3;
boolean hasPkiData();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setPkiData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000004;\n pkiData_ = value;\n }", "com.google.protobuf.ByteString getPkiData();", "private void setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n pkiType_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "java.lang.String getPkiType();", "private void setPkiType(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n pkiType_ = value;\n }", "com.google.protobuf.ByteString\n getPkiTypeBytes();", "@java.lang.Override\n public java.lang.String getPkiType() {\n return pkiType_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getPkiData() {\n return pkiData_;\n }", "boolean hasPkiType();", "@java.lang.Override\n public boolean hasPkiType() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "public Builder setPkiData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPkiData(value);\n return this;\n }", "@java.lang.Override\n public java.lang.String getPkiType() {\n return instance.getPkiType();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return instance.getPkiTypeBytes();\n }", "@java.lang.Override\n public boolean hasPkiData() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getPkiData() {\n return instance.getPkiData();\n }", "public Builder setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPkiTypeBytes(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(pkiType_);\n }", "private void clearPkiData() {\n bitField0_ = (bitField0_ & ~0x00000004);\n pkiData_ = getDefaultInstance().getPkiData();\n }", "public Builder setPkiType(\n java.lang.String value) {\n copyOnWrite();\n instance.setPkiType(value);\n return this;\n }", "private void clearPkiType() {\n bitField0_ = (bitField0_ & ~0x00000002);\n pkiType_ = getDefaultInstance().getPkiType();\n }", "@java.lang.Override\n public boolean hasPkiType() {\n return instance.hasPkiType();\n }", "@java.lang.Override\n public boolean hasPkiData() {\n return instance.hasPkiData();\n }", "void setPQ( byte[] buffer, short offset, short length) throws CryptoException;", "public byte[] getPKP(final TrzbaDataType data) throws DataSigningException {\n return this.clientKey.sign(serializeData(data));\n }", "@Override\r\n protected String getPrymaryType(Integer key) {\r\n return NodeTypes.SECTOR.getId();\r\n }", "com.hps.july.persistence.WorkerKey getTechStuffKey() throws java.rmi.RemoteException;", "public String reqsetpkt(byte []p,byte[] id,byte[] T,byte[] ip,byte[] no)\r\n\t{\n\t\treturn \"hi\";\r\n\t}", "public Builder clearPkiType() {\n copyOnWrite();\n instance.clearPkiType();\n return this;\n }", "public void setP_type(String p_type) {\n this.p_type = p_type;\n }", "private byte[] getKey(KeyType keytype) {\n byte[] key = new byte[1];\n key[0] = (byte) keytype.ordinal();\n return key;\n }", "void privateSetTechStuffKey(com.hps.july.persistence.WorkerKey inKey) throws java.rmi.RemoteException;", "lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE getPakringFree();", "lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE getPakringFree();", "public Builder clearPkiData() {\n copyOnWrite();\n instance.clearPkiData();\n return this;\n }", "protected byte[] getBathWaterVolumeSetting3() {return null;}", "public interface ICloudRequest {\n \n public int getOp();\n public void incrementRetries();\n public void resetRetries();\n public int getRetries();\n \n /**\n * Retrieve the data unit associated with this request\n * @return {@link DepSkyDataUnit}\n */\n public DepSkyDataUnit getDataUnit();\n \n /**\n * Determine when this procedure started originally\n * @return long - start time of this procedure\n */\n public long getStartTime();\n \n /**\n * Determine the sequence of this request\n * @return long\n */\n public long getSequenceNumber();\n \n /**\n * Get the data resulting from this request\n * @return byte[] consisting of the data\n */\n public byte[] getData();\n \n \n}", "public static Object PQinit(Object... arg) {\nUNSUPPORTED(\"c01vxogao855zs8fe94tpim9g\"); // void\nUNSUPPORTED(\"3p0cdanvp4f13d8omi42lvjl1\"); // PQinit(void)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"akljrpu8bej9lq4rmsktz8u2e\"); // PQcnt = 0;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}", "com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType();", "@Override\n\tpublic void put(String key, String cat, byte[] data) throws RemoteException {\n\t\t\n\t}", "public static void setKPIsInCache(Map<String,String> dataMap){ \t\n \tif(memcache !=null && memcache.contains(ALL_KPI_KEY)){\n \t\tmemcache.delete(ALL_KPI_KEY);\n \t}\n \tmemcache.put(ALL_KPI_KEY, dataMap);\n\t}", "@Override //Client\n public void prepareAMServiceData(ClusterDescription clusterSpec,\n Map<String, ByteBuffer> serviceData) {\n \n }", "public interface Key {\n\n String SHARE_KEY = \"userIndo\";//用户信息\n String SHARE_USER_ID = \"userId\";//用户账号\n\n}", "Key[] getPq();", "@Override\n public Map<UUID, byte[]> getPsshInfo() {\n return null;\n }", "@Override\n public Map<UUID, byte[]> getPsshInfo() {\n return null;\n }", "@Override\n public byte getType() {\n return TYPE_DATA;\n }", "KijiDataRequest getClientRequest();", "public void setPartProducedKey(long value) {\n\t\tthis.partProducedKey = value;\n\t}", "public void setStorageType(short type) {\n\tstorageType = type;\n }", "public static Map<String,String> getKPIsFromCache(){\n\t\tMap<String,String> dataMap=null;\n \t\n \tif(memcache !=null && memcache.contains(ALL_KPI_KEY)){\n \t\tdataMap=(Map<String,String>) memcache.get(ALL_KPI_KEY);\n \t\tlog.info(\"Memcache getKPIsFromCache size = \"+dataMap.size());\n \t} \t\n \treturn dataMap;\n\t}", "public void setParentContainerType(IPartitionType type)\n\t{\n\t\tthis.parentContainerType = (PartitionType) type;\n\t}", "private IDataKey(Queue<Part> parts) {\n super(parts);\n }", "public static byte[] readFile(File file, int valueType) {\n if (!file.exists()) {\n Log.e(TAG, \"The file doesn't exist\");\n }\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);\n byte[] buf = new byte[4096];\n switch (valueType) {\n case 0:\n case 1:\n case 2:\n case 3:\n while (bufferedInputStream.read(buf) != -1) {\n byteArrayOutputStream.write(buf, 16 * valueType, 16);\n }\n break;\n case 4:\n if (!file.getName().equals(\"E_SK2\")) {\n if (!file.getName().equals(\"E_PIN2\")) {\n while (true) {\n int len = bufferedInputStream.read(buf);\n if (len == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, (len - 32) - (16 * 1));\n }\n }\n } else {\n while (true) {\n int len2 = bufferedInputStream.read(buf);\n if (len2 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, ((len2 - 32) - (16 * 1)) - PKLENGTH);\n }\n }\n }\n } else {\n while (true) {\n int len3 = bufferedInputStream.read(buf);\n if (len3 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 4, (len3 - 32) - (16 * 4));\n }\n }\n }\n case 5:\n while (true) {\n int len4 = bufferedInputStream.read(buf);\n if (len4 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, len4 - 32, 32);\n }\n }\n case PUBLICKEY /* 7 */:\n while (true) {\n int len5 = bufferedInputStream.read(buf);\n if (len5 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, (len5 - 32) - PKLENGTH, PKLENGTH);\n }\n }\n case 8:\n while (true) {\n int len6 = bufferedInputStream.read(buf);\n if (len6 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 0, len6 - 32);\n }\n }\n }\n byte[] buffer = byteArrayOutputStream.toByteArray();\n bufferedInputStream.close();\n fileInputStream.close();\n byteArrayOutputStream.close();\n return buffer;\n } catch (IOException e) {\n Log.e(TAG, \"read file exception!\" + e.getMessage());\n return new byte[0];\n }\n }", "private String createTypeKey(int type, String key) {\r\n\t\treturn type + \"-\" + key;\r\n\t}", "public byte [] getKos()\n {\n return kosBytes;\n }", "private <T> Pair<KademliaNode, Boolean> storeGRPC(KademliaNode node, byte[] key, T info) {\n\n StoreRequest.Builder request = StoreRequest.newBuilder()\n .setNode(KademliaUtils.KademliaNodeToKademliaNodeProto(bucketManager.getMyNode()))\n .setKey(ByteString.copyFrom(key));\n\n\n if(info.getClass() == Transaction.class) {\n request.setTransaction(KademliaUtils.TransactionToTransactionProto((Transaction) info));\n }\n else if(info.getClass() == Block.class) {\n request.setBlock(KademliaUtils.BlockToBlockProto((Block) info));\n }\n else if(info.getClass() == Auction.class) {\n request.setAuction(KademliaUtils.AuctionToAuctionProto((Auction) info));\n }\n else if(info.getClass() == Bid.class) {\n request.setBid(KademliaUtils.BidToBidProto((Bid) info));\n }\n else {\n logger.log(Level.SEVERE, \"Error: store value type not valid - \" + info.getClass());\n return new Pair(null, false);\n }\n\n ManagedChannel channel = ManagedChannelBuilder.forTarget(node.getIpAddress() + \":\" + node.getPort()).usePlaintext().build();\n AuctionBlockchainBlockingStub blockingStub = AuctionBlockchainGrpc.newBlockingStub(channel);\n// AuctionBlockchainBlockingStub blockingStub = AuctionBlockchainGrpc.newBlockingStub(channel).withDeadlineAfter(KademliaUtils.networkTimeoutMsecs, TimeUnit.MILLISECONDS);\n\n StoreResponse response;\n\n try {\n response = blockingStub.store(request .build());\n } catch (StatusRuntimeException e) {\n// logger.log(Level.WARNING, \"STORE RPC failed for \" + node.getIpAddress() + \":\" + node.getPort() + \" - \" + e.getStatus());\n logger.log(Level.WARNING, \"STORE RPC failed for \" + node);\n closeChannel(channel);\n return new Pair(null, false);\n }\n\n\n KademliaNode nodeInResponse = KademliaUtils.KademliaNodeProtoToKademliaNode(response.getNode());\n\n if (!Arrays.equals(node.getNodeID(), nodeInResponse.getNodeID())) {\n logger.log(Level.WARNING, \"Response returned with different nodeID\");\n closeChannel(channel);\n return new Pair(nodeInResponse, false);\n }\n\n closeChannel(channel);\n\n// logger.log(Level.INFO, \"Successfully sent STORE RPC to \" + node + \" for key \" + Utils.bytesToHexString(key));\n return new Pair(nodeInResponse, response.getSuccess());\n }", "public int send(Object key, Packet p) throws IOException {\n if (p instanceof NIOPacket) {\n NIOPacket n = (NIOPacket) p;\n return send(key, n.getBuffer());\n } else {\n if (T.t) {\n T.warn(\"This has not been tested\");\n }\n int len = p.getAvailable();\n p.readArray(byteArray, 0, len);\n return send(key, byteArray, 0, len);\n }\n }", "public interface PacketFormatKeyContext {\n\n}", "public abstract PartitionType getType();", "public String getBKP(final byte[] pkp) throws DataSigningException {\n final byte[] bytes = sha1(pkp);\n final String base16 = StringUtils.leftPad(toBase16(bytes), 40, '0');\n final String[] blocks = StringUtils.splitBlocks(base16, 8);\n final StringJoiner stringJoiner = new StringJoiner(\"-\");\n for(final String block : blocks) {\n stringJoiner.add(block);\n }\n return stringJoiner.toString().toUpperCase();\n }", "public void setPkCacheSize(int pkCacheSize) {\n }", "public ECP getPublicEphemeralKey(){return epk;}", "protected byte[] getBathWaterVolumeSetting2() {return null;}", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "byte[] get_node_secret();", "public static KubevirtNode buildKubevirtNode(Node node) {\n String hostname = node.getMetadata().getName();\n IpAddress managementIp = null;\n IpAddress dataIp = null;\n\n for (NodeAddress nodeAddress:node.getStatus().getAddresses()) {\n if (nodeAddress.getType().equals(INTERNAL_IP)) {\n managementIp = IpAddress.valueOf(nodeAddress.getAddress());\n dataIp = IpAddress.valueOf(nodeAddress.getAddress());\n }\n }\n\n Set<String> rolesFull = node.getMetadata().getLabels().keySet().stream()\n .filter(l -> l.contains(K8S_ROLE))\n .collect(Collectors.toSet());\n\n KubevirtNode.Type nodeType = WORKER;\n\n for (String roleStr : rolesFull) {\n String role = roleStr.split(\"/\")[1];\n if (MASTER.name().equalsIgnoreCase(role)) {\n nodeType = MASTER;\n break;\n }\n }\n\n // start to parse kubernetes annotation\n Map<String, String> annots = node.getMetadata().getAnnotations();\n String physnetConfig = annots.get(PHYSNET_CONFIG_KEY);\n String gatewayConfig = annots.get(GATEWAY_CONFIG_KEY);\n String dataIpStr = annots.get(DATA_IP_KEY);\n Set<KubevirtPhyInterface> phys = new HashSet<>();\n String gatewayBridgeName = null;\n try {\n if (physnetConfig != null) {\n JsonArray configJson = JsonArray.readFrom(physnetConfig);\n\n for (int i = 0; i < configJson.size(); i++) {\n JsonObject object = configJson.get(i).asObject();\n String network = object.get(NETWORK_KEY).asString();\n String intf = object.get(INTERFACE_KEY).asString();\n\n if (network != null && intf != null) {\n String physBridgeId;\n if (object.get(PHYS_BRIDGE_ID) != null) {\n physBridgeId = object.get(PHYS_BRIDGE_ID).asString();\n } else {\n physBridgeId = genDpidFromName(network + intf + hostname);\n log.trace(\"host {} physnet dpid for network {} intf {} is null so generate dpid {}\",\n hostname, network, intf, physBridgeId);\n }\n\n phys.add(DefaultKubevirtPhyInterface.builder()\n .network(network)\n .intf(intf)\n .physBridge(DeviceId.deviceId(physBridgeId))\n .build());\n }\n }\n }\n\n if (dataIpStr != null) {\n dataIp = IpAddress.valueOf(dataIpStr);\n }\n\n if (gatewayConfig != null) {\n JsonNode jsonNode = new ObjectMapper().readTree(gatewayConfig);\n\n nodeType = GATEWAY;\n gatewayBridgeName = jsonNode.get(GATEWAY_BRIDGE_NAME).asText();\n }\n } catch (JsonProcessingException e) {\n log.error(\"Failed to parse physnet config or gateway config object\", e);\n }\n\n // if the node is taint with kubevirt.io key configured,\n // we mark this node as OTHER type, and do not add it into the cluster\n NodeSpec spec = node.getSpec();\n if (spec.getTaints() != null) {\n for (Taint taint : spec.getTaints()) {\n String effect = taint.getEffect();\n String key = taint.getKey();\n String value = taint.getValue();\n\n if (StringUtils.equals(effect, NO_SCHEDULE_EFFECT) &&\n StringUtils.equals(key, KUBEVIRT_IO_KEY) &&\n StringUtils.equals(value, DRAINING_VALUE)) {\n nodeType = OTHER;\n }\n }\n }\n\n return DefaultKubevirtNode.builder()\n .hostname(hostname)\n .managementIp(managementIp)\n .dataIp(dataIp)\n .type(nodeType)\n .state(KubevirtNodeState.ON_BOARDED)\n .phyIntfs(phys)\n .gatewayBridgeName(gatewayBridgeName)\n .build();\n }", "public int getByteSizeBasedOnDataType(String dataType)\n\t{\n\t\tif (dataType.equals(\"String\"))\n\t\t\treturn charInBytes;\n\t\treturn intInBytes;\n\t}", "private DataKeys(String pKey) {\n key = pKey;\n }", "com.google.protobuf.ByteString\n getHowToUseBytes();", "com.google.protobuf.ByteString\n getHowToUseBytes();", "public static void main(String[] args) {\n Pair<String, Integer> pair = new Pair<String, Integer>(\"testeString\", 12);\n System.out.println(pair.getTipo1());\n System.out.println(pair.getTipo2());\n pair.setTipo1(\"TESTEAGAIN\");\n System.out.println(pair.getTipo1());\n\n }", "String getProcessingInstructionData(Object pi);", "public String getType() {\r\n return \"Block Data Long\";\r\n }", "private void setSignatureType(byte type) \r\n \t //@ requires signatureType |-> ?theSignatureType &*& theSignatureType != null &*& theSignatureType.length == 1 &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(?ta) &*& foreachp(ta, transient_byte_array);\r\n \t //@ ensures signatureType |-> theSignatureType &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(ta) &*& foreachp(ta, transient_byte_array);\r\n\t{\r\n\t\t//@ transient_byte_arrays_mem(theSignatureType);\r\n\t\t//@ foreachp_remove(theSignatureType, ta);\r\n\t\t//@ open transient_byte_array(theSignatureType);\r\n\t\tsignatureType[0] = type;\r\n\t\t//@ close transient_byte_array(theSignatureType);\r\n\t\t//@ foreachp_unremove(theSignatureType, ta);\r\n\t}", "private static String nodeKey(Player player, TYPE type) {\n return \"{playerId:\" + player.getId() + \", teamId:\" + player.getTeamId() + \", gameId:\" + player.getGameId() + \", type:\\\"\" + type.toString() + \"\\\"}\";\n }", "protected byte[] getBathWaterVolumeSetting1() {return null;}", "public PlugwiseMQTTDeviceInfo()\n\t{\n\t\t// initialize internal variables\n\t\tthis.macAddress = \"\";\n\t\tthis.type = \"circle\";\n\t}", "public interface KudoClient {\n MixedOperation<Operator, OperatorList, DoneableOperator, Resource<Operator, DoneableOperator>> operators();\n\n MixedOperation<Instance, InstanceList, DoneableInstance, Resource<Instance, DoneableInstance>> instances();\n\n MixedOperation<OperatorVersion, OperatorVersionList, DoneableOperatorVersion, Resource<OperatorVersion, DoneableOperatorVersion>> operatorVersion();\n\n void close();\n}", "ByteBuffer getApplicationData();", "public interface JobMemcachedKeys {\n String JOB_DETAIL = \"JOB_DETAIL_\";\n String JOB_STATUS = \"JOB_STATUS_\";\n}", "public interface C0003a {\n public static final String ah = \"image_manager_disk_cache\";\n public static final int hP = 262144000;\n\n @Nullable\n a bz();\n }", "short getPQ( byte[] buffer, short offset );", "public ClientPacket(PacketType type, byte[] data){\r\n\t\tthis.type = type;\r\n\t\tthis.dataSize = data.length;\r\n\t\tthis.data = data;\r\n\t}", "private void ipcSend(JSONObject data) {\n JSONObject json = data;\n try {\n json.put(IPC_MESSAGE_APPID, mAppId);\n\n if (mIpcChannel != null) {\n log.e(\"ipcSend:[\" + json.toString() + \"]\");\n\n mIpcChannel.send(json.toString());\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setOpckeytype(java.lang.Long value) {\n\t\tsetValue(test.generated.pg_catalog.tables.PgOpclass.PG_OPCLASS.OPCKEYTYPE, value);\n\t}", "private String createKey(OwObject object_p, OwPluginEntry pluginEntry_p) throws Exception\r\n {\r\n String objectId = object_p.getDMSID();\r\n String key = objectId + \"_\" + pluginEntry_p.getIndex();\r\n return key;\r\n }", "public void setAvailableExtraData(List<String> extraDataKeys) {\n/* 502 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public int getCapacity( Resource.Type type );", "public TableValue(short type) {\n\tkey = null; // No name by default.\n\tstorageType = type; // Type of data. \n\tattrs = null; // No attributes yet.\n\tflags = -1; // No flags yet. \n\n\t// Create a generic, default vector clock. \n\tvclock = new VectorClock(\"s\".getBytes(), 0);\n }", "void setP( byte[] buffer, short offset, short length) throws CryptoException;", "private void uniPerfGetConfig(Parcel data, Parcel reply) {\n int tagsSize = data.readInt();\n if (tagsSize <= 0 || tagsSize >= 128) {\n AwareLog.e(TAG, \"uniPerfGetConfig tags size invalid.\");\n return;\n }\n int[] tags = new int[tagsSize];\n for (int i = 0; i < tagsSize; i++) {\n tags[i] = data.readInt();\n }\n int[] values = new int[tagsSize];\n reply.writeInt(UniPerf.getInstance().uniPerfGetConfig(tags, values));\n for (int value : values) {\n reply.writeInt(value);\n }\n }", "void setQ( byte[] buffer, short offset, short length) throws CryptoException;", "public MessageClackData(String userName, String message, String key, int type) {\n super(userName, type);\n this.message = encrypt(message, key);\n }", "public void setProcessType(String currentProcess) {\n this.currentProcess=currentProcess;\n if(currentProcess.startsWith(\"ENCRYPTION\")) {\n processCaption=\"Encrypting\";\n }\n else {\n processCaption=\"Decrypting\";\n } \n }", "PNMMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) {\n/* 145 */ this();\n/* 146 */ initialize(imageType, param);\n/* */ }", "private void parseCommandPut(DataInputStream in) throws IOException {\n int ksize = in.readInt();\n int vsize = in.readInt();\n byte[] key = new byte[ksize];\n in.read(key);\n byte[] value = new byte[vsize];\n in.read(value);\n // int err = \n in.readUnsignedByte(); // unused\n elements = new LinkedHashMap<String, String>(1);\n elements.put(new String(key), new String(value));\n if (LOG.isDebugEnabled()) LOG.debug(\"parseCommandPut: elements -> \" + elements);\n }", "@Override\n\tpublic Map<String, String> modifyInstanceChargeType(\n\t\t\tMap<String, String> paramsMap, Map<String, String> defaultParamsMap,String requestId) throws Exception {\n\t\tMap<String, String> resultMap = new HashMap<String, String>();\n\t\tif(null==requestId || requestId.length()<1) {\n\t\t\tlogger.info(\"RequestId is null or is error!\");\n\t\t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n\t\t\tresultMap.put(Constants.ERRORMESSAGE,\"The request processing has failed due to some unknown error.\");\n\t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_INTERNAL_SERVER_ERROR+\"\");\n\t\t\treturn resultMap;\n\t\t}\n\t\tString appKeyId = paramsMap.get(Constants.APPKEY_ID);\n\t\tVmUser vmuser = vmUserProxy.getByAppKeyId(appKeyId);\n\t\tString uuid = paramsMap.get(Constants.INSTANCE_ID);\n\t\tVmInstance instance = vmInstanceProxy.getByUuid(uuid, false, true, false, true, true, true, false, false);\n\t\tInteger userId = vmuser.getUserId();\n\t\tInteger clusterid = instance.getCluster().getId();\n\t\tInteger cpuNum = instance.getVmInstanceType().getVcpus();\n\t\tInteger memNum = instance.getVmInstanceType().getMemoryMb();\n\t\tInteger bandNum = -1;\n\t\tInteger hdNum = instance.getVmInstanceType().getLocalGb();\n\t\tList<VmInstanceMetadata> bandNumlist = instance.getVmInstanceMetadatas();\n\t\tfor(VmInstanceMetadata md : bandNumlist) {\n\t\t\tif(md.getKey().equals(Constants.PUBLIC_BANDWIDTH)) {\n\t\t\t\tbandNum = Integer.valueOf(md.getValue());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(-1 == bandNum)\n\t\t{\n\t\t\tlogger.info(\"带宽获取失败!\");\n \t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n\t\t\tresultMap.put(Constants.ERRORMESSAGE,\"This instance do not have band\");\n\t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n \t\treturn resultMap;\n\t\t}\n\t\tString instanceChargeType;\n\t\tif (null == paramsMap.get(Constants.INSTANCE_CHARGE_TYPE))\n\t\t\tinstanceChargeType = defaultParamsMap.get(Constants.INSTANCE_CHARGE_TYPE);\n\t\telse\n\t\t\tinstanceChargeType = paramsMap.get(Constants.INSTANCE_CHARGE_TYPE);\n\t\tString instanceChargeLength;\n\t\tif (null == paramsMap.get(Constants.INSTANCE_CHARGE_LENGTH))\n\t\t\tinstanceChargeLength = defaultParamsMap.get(Constants.INSTANCE_CHARGE_LENGTH);\n\t\telse\n\t\t\tinstanceChargeLength = paramsMap.get(Constants.INSTANCE_CHARGE_LENGTH);\n\t\tInteger paymentType = convertToPaymentType(instanceChargeType);\n\t\tDouble count = Double.valueOf(instanceChargeLength);\n\t\tint times = 0;\n\t\tString type = new VmHdEndtimeManager().getVmEndtimeByUuid(uuid).getType().toLowerCase();\n\t\tString PTYPE = Constants.INSTANCE_TYPE;\n\t\t\n\t\t\n logger.info(\"clusterid: \" + clusterid + \"cpu: \" + cpuNum + \" ,mem: \" + memNum + \" ,hd: \" + hdNum + \" ,band: \" + bandNum);\n \n //计算时间,算各种份数,然后扣费,设每个月份定为30天,每年定为360天\n //计算旧计费规则的份数\n VmHdEndtimeManager vmHdEndtimeManager = new VmHdEndtimeManager();\n VmHdEndtime vm = vmHdEndtimeManager.getVmEndtimeByUuid(uuid);\n\t\tTimestamp currentTime = new Timestamp(System.currentTimeMillis());\n\t\tSimpleDateFormat timeformat = new SimpleDateFormat(\"yyyy-MM-dd,HH:mm:ss\");\n\t long t1 = 0L;\n\t long t2 = 0L;\n \n Timestamp endTime = new Timestamp(vm.getEndTime().getTime());\n t1 = timeformat.parse(getTimeStampNumberFormat(endTime)).getTime();\n t2 = timeformat.parse(getTimeStampNumberFormat(currentTime)).getTime();\n //账号余额\n HashMap<String, String> params = new HashMap<String, String>();\n\t\tparams.put(\"uid\", String.valueOf(userId));\n\t\tparams.put(\"source\", com.appcloud.vm.fe.common.Constants.CLIENT_ID);\n\t\tInteger balance = BillingAPI.balance(userId ,null, AccountUtil.getSignature(params, com.appcloud.vm.fe.common.Constants.CLIENT_SECRET_KEY),com.appcloud.vm.fe.common.Constants.CLIENT_ID);\n //本次应付款金额\n Integer payamount = BillingAPI.getPrice(type, clusterid, cpuNum, memNum, hdNum, bandNum, userId, paymentType, count);\n if (t1 - t2 >= 0) {//不过期才对其退费\n \tInteger oldPaymentType = vmHdEndtimeManager.convertToPaymentType(vm.getPayType());\n \tdouble oldCount = 1.00000;\n \tif(oldPaymentType == 1){\n \t\toldCount = (t1 - t2) / (Constants.yearDays*24*3600*1000.0);\n \t}else if(oldPaymentType == 2){\n \t\toldCount = (t1 - t2) / (Constants.monthDays*24*3600*1000.0); \n \t}else if(oldPaymentType == 3){\n \t\toldCount = (t1 - t2) / (24*3600*1000.0); //因为t1-t2得到的是毫秒级,所以要除3600000得出小时\n \t}else if(oldPaymentType == 4){\n \t\toldCount = (t1 - t2) / (3600*1000.0); //因为t1-t2得到的是毫秒级,所以要除1000得出秒\n \t}\n \tlogger.info(\"oldCount:\"+oldCount);\n \t//计算手续费的份数\n \tdouble chargecount = 1.0;\n \t//先判断余额是否充足,再进行扣费等操作\n \tInteger reamount = 0;\n \tInteger chargeamount = 0;\n \treamount = BillingAPI.getPrice(type, clusterid, cpuNum, memNum, hdNum, bandNum, userId, oldPaymentType, oldCount);\n \tchargeamount = BillingAPI.getPrice(\"charge\", clusterid, -1, -1, -1, -1, userId, oldPaymentType, chargecount);\n \tlogger.info(balance);\n \tlogger.info(payamount);\n \tlogger.info(reamount);\n \tlogger.info(chargeamount);\n \tif(balance < (payamount - reamount + chargeamount)){\n \t\tlogger.info(\"余额不足,返回\");\n \t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n \t\t\tresultMap.put(Constants.ERRORMESSAGE,\"your money is not enough!\");\n \t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n \t\treturn resultMap;\n \t}\n \t\n \t//根据旧的计费规则退费\n \tString PID=\"购买\" + cpuNum + \"核CPU\" + memNum + \"G内存\" + hdNum +\"G硬盘和\" + bandNum + \n \t\t\t\"M带宽,未到期,退费\";\n \tlogger.debug(\"PID = \" + PID);\n \tString item = \"\";\n \tif(type.equalsIgnoreCase(\"vm\")){\n \t\titem = \"CPU/内存/硬盘/带宽\";\n \t}else if(type.equalsIgnoreCase(\"instancetype\")){\n \t\tcom.appcloud.vm.fe.billing.Billingrate rate = BillingAPI.getRate(type, clusterid, cpuNum, memNum, hdNum, bandNum).get(0);\n \t\titem = rate.getName();\n \t}\n \tlogger.debug(\"item = \" + item);\n \tString message = \"\";\n \tString payment_type = new VmHdEndtimeManager().convertToType(oldPaymentType);\n \tmessage = BillingAPI.pay(RECID, userId, item, payment_type, times, oldCount, PTYPE, PID, reamount, null);\n \tif(!message.equalsIgnoreCase(\"success\")){\n \t\tlogger.info(\"payment fail\");\n \t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n \t\t\tresultMap.put(Constants.ERRORMESSAGE,\"payment fail\");\n \t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n \t\treturn resultMap; //退费不成功\n \t} \n \t //收取手续费\n item = \"手续费\";\n PID=\"修改付费规则的手续费\";\n payment_type = new VmHdEndtimeManager().convertToType(paymentType);\n message = BillingAPI.pay(userId, RECID, item, payment_type, times, chargecount, PTYPE, PID, chargeamount, null);\n if(!message.equalsIgnoreCase(\"success\")){\n logger.info(\"payment fail\");\n return resultMap; \n }\n logger.info(\"payment success!\");\n } else {\n \tif(balance < payamount){\n \t\tlogger.info(\"余额不足,返回\");\n \t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n \t\t\tresultMap.put(Constants.ERRORMESSAGE,\"your money is not enough!\");\n \t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n \t\treturn resultMap;\n \t}\n \t}\n \n //查询余额,扣费\n logger.info(\"start payment!\");\n String PID=\"购买\" + cpuNum + \"核CPU\" + memNum + \"G内存\" + hdNum + \"G硬盘和\" + bandNum + \"M带宽\";\n logger.debug(\"PID = \" + PID);\n String item = \"\";\n String message = \"\";\n logger.info(\"type = \" + type);\n if(type.equalsIgnoreCase(\"vm\")){\n \titem = \"CPU/内存/硬盘/带宽\";\n logger.debug(\"item = \" + item);\n }else if(type.equalsIgnoreCase(\"instancetype\")){\n \tcom.appcloud.vm.fe.billing.Billingrate rate = BillingAPI.getRate(type, clusterid, cpuNum, memNum, hdNum, bandNum).get(0);\n\t\t\titem = rate.getName();\n }\n String payment_type = new VmHdEndtimeManager().convertToType(paymentType);\n message = BillingAPI.pay(userId, RECID, item, payment_type, times, count, PTYPE, PID, payamount,null);\n if(!message.equalsIgnoreCase(\"success\")){\n logger.info(\"payment fail\");\n resultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n\t\t\tresultMap.put(Constants.ERRORMESSAGE,\"payment fail\");\n\t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n return resultMap; \n }\n logger.info(\"payment success!\");\n \n //修改虚拟机到期时间以及付费类型\n logger.info(\"start modify endtime!\");\n if(type.equalsIgnoreCase(\"vm\")){\n logger.info(\"vm\");\n Timestamp tempStamp = new Timestamp(System.currentTimeMillis());\n logger.info(\"userId = \" + userId + \" uuid = \" + uuid + \" paymentType = \" + paymentType \n + \" count = \" + count + \" tempStamp = \" + tempStamp + \" \" + VmHdEndtime.TYPE_VM);\n vmHdEndtimeManager.updateVmHdEndtime(userId, uuid, tempStamp, VmHdEndtime.TYPE_VM, paymentType, count);\n }else if(type.equalsIgnoreCase(\"instancetype\")){\n logger.info(\"instancetype\");\n Timestamp tempStamp = new Timestamp(System.currentTimeMillis());\n logger.info(\"userId = \" + userId + \" uuid = \" + uuid + \" paymentType = \" + paymentType \n + \" count = \" + count + \"tempStamp = \" + tempStamp + \" \" + VmHdEndtime.TYPE_INSTANCETYPE);\n vmHdEndtimeManager.updateVmHdEndtime(userId, uuid, tempStamp, VmHdEndtime.TYPE_INSTANCETYPE, paymentType, count);\n }\n resultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_OK);\n return resultMap;\n\t}" ]
[ "0.7461772", "0.7270173", "0.7188162", "0.6849862", "0.6622877", "0.6556345", "0.644622", "0.630002", "0.6299455", "0.6163412", "0.6087984", "0.6002228", "0.5975709", "0.59395826", "0.5907646", "0.57982445", "0.5726266", "0.5712276", "0.5684582", "0.5584436", "0.5559634", "0.5252141", "0.49216577", "0.47094396", "0.4694811", "0.46729812", "0.4656656", "0.46391153", "0.46205348", "0.46073896", "0.45961434", "0.45853224", "0.45853224", "0.4572385", "0.45663446", "0.45509598", "0.453728", "0.45189363", "0.45187464", "0.45142606", "0.45046827", "0.4490483", "0.44709814", "0.44686854", "0.44686854", "0.4463381", "0.44375443", "0.4430811", "0.44306394", "0.44279918", "0.4413793", "0.4411431", "0.44075605", "0.44003716", "0.43986735", "0.43878996", "0.43874544", "0.43870187", "0.4370455", "0.43632102", "0.43427208", "0.43381727", "0.43282798", "0.43189391", "0.43189391", "0.43189391", "0.43189391", "0.4315619", "0.4315214", "0.43085253", "0.43080577", "0.43076736", "0.43076736", "0.43066546", "0.43042377", "0.4295094", "0.4285528", "0.42770728", "0.42726806", "0.4271019", "0.4267067", "0.42609677", "0.4253753", "0.4252036", "0.42447025", "0.4242165", "0.42407113", "0.422909", "0.42224765", "0.4221811", "0.42164075", "0.42121062", "0.42113987", "0.42101535", "0.41872218", "0.4183457", "0.4183175", "0.4179106", "0.41723317", "0.41705495" ]
0.62147033
9
depends on pki_type optional bytes pki_data = 3;
com.google.protobuf.ByteString getPkiData();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setPkiData(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000004;\n pkiData_ = value;\n }", "private void setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n pkiType_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "java.lang.String getPkiType();", "private void setPkiType(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n pkiType_ = value;\n }", "com.google.protobuf.ByteString\n getPkiTypeBytes();", "@java.lang.Override\n public java.lang.String getPkiType() {\n return pkiType_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getPkiData() {\n return pkiData_;\n }", "boolean hasPkiType();", "boolean hasPkiData();", "@java.lang.Override\n public boolean hasPkiType() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "public Builder setPkiData(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPkiData(value);\n return this;\n }", "@java.lang.Override\n public java.lang.String getPkiType() {\n return instance.getPkiType();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return instance.getPkiTypeBytes();\n }", "@java.lang.Override\n public boolean hasPkiData() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getPkiData() {\n return instance.getPkiData();\n }", "public Builder setPkiTypeBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPkiTypeBytes(value);\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPkiTypeBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(pkiType_);\n }", "private void clearPkiData() {\n bitField0_ = (bitField0_ & ~0x00000004);\n pkiData_ = getDefaultInstance().getPkiData();\n }", "public Builder setPkiType(\n java.lang.String value) {\n copyOnWrite();\n instance.setPkiType(value);\n return this;\n }", "private void clearPkiType() {\n bitField0_ = (bitField0_ & ~0x00000002);\n pkiType_ = getDefaultInstance().getPkiType();\n }", "@java.lang.Override\n public boolean hasPkiType() {\n return instance.hasPkiType();\n }", "@java.lang.Override\n public boolean hasPkiData() {\n return instance.hasPkiData();\n }", "void setPQ( byte[] buffer, short offset, short length) throws CryptoException;", "public byte[] getPKP(final TrzbaDataType data) throws DataSigningException {\n return this.clientKey.sign(serializeData(data));\n }", "@Override\r\n protected String getPrymaryType(Integer key) {\r\n return NodeTypes.SECTOR.getId();\r\n }", "com.hps.july.persistence.WorkerKey getTechStuffKey() throws java.rmi.RemoteException;", "public String reqsetpkt(byte []p,byte[] id,byte[] T,byte[] ip,byte[] no)\r\n\t{\n\t\treturn \"hi\";\r\n\t}", "public Builder clearPkiType() {\n copyOnWrite();\n instance.clearPkiType();\n return this;\n }", "public void setP_type(String p_type) {\n this.p_type = p_type;\n }", "private byte[] getKey(KeyType keytype) {\n byte[] key = new byte[1];\n key[0] = (byte) keytype.ordinal();\n return key;\n }", "void privateSetTechStuffKey(com.hps.july.persistence.WorkerKey inKey) throws java.rmi.RemoteException;", "lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE getPakringFree();", "lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE getPakringFree();", "public Builder clearPkiData() {\n copyOnWrite();\n instance.clearPkiData();\n return this;\n }", "protected byte[] getBathWaterVolumeSetting3() {return null;}", "public interface ICloudRequest {\n \n public int getOp();\n public void incrementRetries();\n public void resetRetries();\n public int getRetries();\n \n /**\n * Retrieve the data unit associated with this request\n * @return {@link DepSkyDataUnit}\n */\n public DepSkyDataUnit getDataUnit();\n \n /**\n * Determine when this procedure started originally\n * @return long - start time of this procedure\n */\n public long getStartTime();\n \n /**\n * Determine the sequence of this request\n * @return long\n */\n public long getSequenceNumber();\n \n /**\n * Get the data resulting from this request\n * @return byte[] consisting of the data\n */\n public byte[] getData();\n \n \n}", "public static Object PQinit(Object... arg) {\nUNSUPPORTED(\"c01vxogao855zs8fe94tpim9g\"); // void\nUNSUPPORTED(\"3p0cdanvp4f13d8omi42lvjl1\"); // PQinit(void)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"akljrpu8bej9lq4rmsktz8u2e\"); // PQcnt = 0;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}", "com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType();", "@Override\n\tpublic void put(String key, String cat, byte[] data) throws RemoteException {\n\t\t\n\t}", "public static void setKPIsInCache(Map<String,String> dataMap){ \t\n \tif(memcache !=null && memcache.contains(ALL_KPI_KEY)){\n \t\tmemcache.delete(ALL_KPI_KEY);\n \t}\n \tmemcache.put(ALL_KPI_KEY, dataMap);\n\t}", "@Override //Client\n public void prepareAMServiceData(ClusterDescription clusterSpec,\n Map<String, ByteBuffer> serviceData) {\n \n }", "public interface Key {\n\n String SHARE_KEY = \"userIndo\";//用户信息\n String SHARE_USER_ID = \"userId\";//用户账号\n\n}", "Key[] getPq();", "@Override\n public Map<UUID, byte[]> getPsshInfo() {\n return null;\n }", "@Override\n public Map<UUID, byte[]> getPsshInfo() {\n return null;\n }", "@Override\n public byte getType() {\n return TYPE_DATA;\n }", "KijiDataRequest getClientRequest();", "public void setPartProducedKey(long value) {\n\t\tthis.partProducedKey = value;\n\t}", "public void setStorageType(short type) {\n\tstorageType = type;\n }", "public static Map<String,String> getKPIsFromCache(){\n\t\tMap<String,String> dataMap=null;\n \t\n \tif(memcache !=null && memcache.contains(ALL_KPI_KEY)){\n \t\tdataMap=(Map<String,String>) memcache.get(ALL_KPI_KEY);\n \t\tlog.info(\"Memcache getKPIsFromCache size = \"+dataMap.size());\n \t} \t\n \treturn dataMap;\n\t}", "public void setParentContainerType(IPartitionType type)\n\t{\n\t\tthis.parentContainerType = (PartitionType) type;\n\t}", "private IDataKey(Queue<Part> parts) {\n super(parts);\n }", "public static byte[] readFile(File file, int valueType) {\n if (!file.exists()) {\n Log.e(TAG, \"The file doesn't exist\");\n }\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);\n byte[] buf = new byte[4096];\n switch (valueType) {\n case 0:\n case 1:\n case 2:\n case 3:\n while (bufferedInputStream.read(buf) != -1) {\n byteArrayOutputStream.write(buf, 16 * valueType, 16);\n }\n break;\n case 4:\n if (!file.getName().equals(\"E_SK2\")) {\n if (!file.getName().equals(\"E_PIN2\")) {\n while (true) {\n int len = bufferedInputStream.read(buf);\n if (len == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, (len - 32) - (16 * 1));\n }\n }\n } else {\n while (true) {\n int len2 = bufferedInputStream.read(buf);\n if (len2 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, ((len2 - 32) - (16 * 1)) - PKLENGTH);\n }\n }\n }\n } else {\n while (true) {\n int len3 = bufferedInputStream.read(buf);\n if (len3 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 4, (len3 - 32) - (16 * 4));\n }\n }\n }\n case 5:\n while (true) {\n int len4 = bufferedInputStream.read(buf);\n if (len4 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, len4 - 32, 32);\n }\n }\n case PUBLICKEY /* 7 */:\n while (true) {\n int len5 = bufferedInputStream.read(buf);\n if (len5 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, (len5 - 32) - PKLENGTH, PKLENGTH);\n }\n }\n case 8:\n while (true) {\n int len6 = bufferedInputStream.read(buf);\n if (len6 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 0, len6 - 32);\n }\n }\n }\n byte[] buffer = byteArrayOutputStream.toByteArray();\n bufferedInputStream.close();\n fileInputStream.close();\n byteArrayOutputStream.close();\n return buffer;\n } catch (IOException e) {\n Log.e(TAG, \"read file exception!\" + e.getMessage());\n return new byte[0];\n }\n }", "private String createTypeKey(int type, String key) {\r\n\t\treturn type + \"-\" + key;\r\n\t}", "public byte [] getKos()\n {\n return kosBytes;\n }", "private <T> Pair<KademliaNode, Boolean> storeGRPC(KademliaNode node, byte[] key, T info) {\n\n StoreRequest.Builder request = StoreRequest.newBuilder()\n .setNode(KademliaUtils.KademliaNodeToKademliaNodeProto(bucketManager.getMyNode()))\n .setKey(ByteString.copyFrom(key));\n\n\n if(info.getClass() == Transaction.class) {\n request.setTransaction(KademliaUtils.TransactionToTransactionProto((Transaction) info));\n }\n else if(info.getClass() == Block.class) {\n request.setBlock(KademliaUtils.BlockToBlockProto((Block) info));\n }\n else if(info.getClass() == Auction.class) {\n request.setAuction(KademliaUtils.AuctionToAuctionProto((Auction) info));\n }\n else if(info.getClass() == Bid.class) {\n request.setBid(KademliaUtils.BidToBidProto((Bid) info));\n }\n else {\n logger.log(Level.SEVERE, \"Error: store value type not valid - \" + info.getClass());\n return new Pair(null, false);\n }\n\n ManagedChannel channel = ManagedChannelBuilder.forTarget(node.getIpAddress() + \":\" + node.getPort()).usePlaintext().build();\n AuctionBlockchainBlockingStub blockingStub = AuctionBlockchainGrpc.newBlockingStub(channel);\n// AuctionBlockchainBlockingStub blockingStub = AuctionBlockchainGrpc.newBlockingStub(channel).withDeadlineAfter(KademliaUtils.networkTimeoutMsecs, TimeUnit.MILLISECONDS);\n\n StoreResponse response;\n\n try {\n response = blockingStub.store(request .build());\n } catch (StatusRuntimeException e) {\n// logger.log(Level.WARNING, \"STORE RPC failed for \" + node.getIpAddress() + \":\" + node.getPort() + \" - \" + e.getStatus());\n logger.log(Level.WARNING, \"STORE RPC failed for \" + node);\n closeChannel(channel);\n return new Pair(null, false);\n }\n\n\n KademliaNode nodeInResponse = KademliaUtils.KademliaNodeProtoToKademliaNode(response.getNode());\n\n if (!Arrays.equals(node.getNodeID(), nodeInResponse.getNodeID())) {\n logger.log(Level.WARNING, \"Response returned with different nodeID\");\n closeChannel(channel);\n return new Pair(nodeInResponse, false);\n }\n\n closeChannel(channel);\n\n// logger.log(Level.INFO, \"Successfully sent STORE RPC to \" + node + \" for key \" + Utils.bytesToHexString(key));\n return new Pair(nodeInResponse, response.getSuccess());\n }", "public int send(Object key, Packet p) throws IOException {\n if (p instanceof NIOPacket) {\n NIOPacket n = (NIOPacket) p;\n return send(key, n.getBuffer());\n } else {\n if (T.t) {\n T.warn(\"This has not been tested\");\n }\n int len = p.getAvailable();\n p.readArray(byteArray, 0, len);\n return send(key, byteArray, 0, len);\n }\n }", "public interface PacketFormatKeyContext {\n\n}", "public abstract PartitionType getType();", "public String getBKP(final byte[] pkp) throws DataSigningException {\n final byte[] bytes = sha1(pkp);\n final String base16 = StringUtils.leftPad(toBase16(bytes), 40, '0');\n final String[] blocks = StringUtils.splitBlocks(base16, 8);\n final StringJoiner stringJoiner = new StringJoiner(\"-\");\n for(final String block : blocks) {\n stringJoiner.add(block);\n }\n return stringJoiner.toString().toUpperCase();\n }", "public void setPkCacheSize(int pkCacheSize) {\n }", "public ECP getPublicEphemeralKey(){return epk;}", "protected byte[] getBathWaterVolumeSetting2() {return null;}", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "byte[] get_node_secret();", "public static KubevirtNode buildKubevirtNode(Node node) {\n String hostname = node.getMetadata().getName();\n IpAddress managementIp = null;\n IpAddress dataIp = null;\n\n for (NodeAddress nodeAddress:node.getStatus().getAddresses()) {\n if (nodeAddress.getType().equals(INTERNAL_IP)) {\n managementIp = IpAddress.valueOf(nodeAddress.getAddress());\n dataIp = IpAddress.valueOf(nodeAddress.getAddress());\n }\n }\n\n Set<String> rolesFull = node.getMetadata().getLabels().keySet().stream()\n .filter(l -> l.contains(K8S_ROLE))\n .collect(Collectors.toSet());\n\n KubevirtNode.Type nodeType = WORKER;\n\n for (String roleStr : rolesFull) {\n String role = roleStr.split(\"/\")[1];\n if (MASTER.name().equalsIgnoreCase(role)) {\n nodeType = MASTER;\n break;\n }\n }\n\n // start to parse kubernetes annotation\n Map<String, String> annots = node.getMetadata().getAnnotations();\n String physnetConfig = annots.get(PHYSNET_CONFIG_KEY);\n String gatewayConfig = annots.get(GATEWAY_CONFIG_KEY);\n String dataIpStr = annots.get(DATA_IP_KEY);\n Set<KubevirtPhyInterface> phys = new HashSet<>();\n String gatewayBridgeName = null;\n try {\n if (physnetConfig != null) {\n JsonArray configJson = JsonArray.readFrom(physnetConfig);\n\n for (int i = 0; i < configJson.size(); i++) {\n JsonObject object = configJson.get(i).asObject();\n String network = object.get(NETWORK_KEY).asString();\n String intf = object.get(INTERFACE_KEY).asString();\n\n if (network != null && intf != null) {\n String physBridgeId;\n if (object.get(PHYS_BRIDGE_ID) != null) {\n physBridgeId = object.get(PHYS_BRIDGE_ID).asString();\n } else {\n physBridgeId = genDpidFromName(network + intf + hostname);\n log.trace(\"host {} physnet dpid for network {} intf {} is null so generate dpid {}\",\n hostname, network, intf, physBridgeId);\n }\n\n phys.add(DefaultKubevirtPhyInterface.builder()\n .network(network)\n .intf(intf)\n .physBridge(DeviceId.deviceId(physBridgeId))\n .build());\n }\n }\n }\n\n if (dataIpStr != null) {\n dataIp = IpAddress.valueOf(dataIpStr);\n }\n\n if (gatewayConfig != null) {\n JsonNode jsonNode = new ObjectMapper().readTree(gatewayConfig);\n\n nodeType = GATEWAY;\n gatewayBridgeName = jsonNode.get(GATEWAY_BRIDGE_NAME).asText();\n }\n } catch (JsonProcessingException e) {\n log.error(\"Failed to parse physnet config or gateway config object\", e);\n }\n\n // if the node is taint with kubevirt.io key configured,\n // we mark this node as OTHER type, and do not add it into the cluster\n NodeSpec spec = node.getSpec();\n if (spec.getTaints() != null) {\n for (Taint taint : spec.getTaints()) {\n String effect = taint.getEffect();\n String key = taint.getKey();\n String value = taint.getValue();\n\n if (StringUtils.equals(effect, NO_SCHEDULE_EFFECT) &&\n StringUtils.equals(key, KUBEVIRT_IO_KEY) &&\n StringUtils.equals(value, DRAINING_VALUE)) {\n nodeType = OTHER;\n }\n }\n }\n\n return DefaultKubevirtNode.builder()\n .hostname(hostname)\n .managementIp(managementIp)\n .dataIp(dataIp)\n .type(nodeType)\n .state(KubevirtNodeState.ON_BOARDED)\n .phyIntfs(phys)\n .gatewayBridgeName(gatewayBridgeName)\n .build();\n }", "public int getByteSizeBasedOnDataType(String dataType)\n\t{\n\t\tif (dataType.equals(\"String\"))\n\t\t\treturn charInBytes;\n\t\treturn intInBytes;\n\t}", "private DataKeys(String pKey) {\n key = pKey;\n }", "com.google.protobuf.ByteString\n getHowToUseBytes();", "com.google.protobuf.ByteString\n getHowToUseBytes();", "public static void main(String[] args) {\n Pair<String, Integer> pair = new Pair<String, Integer>(\"testeString\", 12);\n System.out.println(pair.getTipo1());\n System.out.println(pair.getTipo2());\n pair.setTipo1(\"TESTEAGAIN\");\n System.out.println(pair.getTipo1());\n\n }", "String getProcessingInstructionData(Object pi);", "public String getType() {\r\n return \"Block Data Long\";\r\n }", "private void setSignatureType(byte type) \r\n \t //@ requires signatureType |-> ?theSignatureType &*& theSignatureType != null &*& theSignatureType.length == 1 &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(?ta) &*& foreachp(ta, transient_byte_array);\r\n \t //@ ensures signatureType |-> theSignatureType &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(ta) &*& foreachp(ta, transient_byte_array);\r\n\t{\r\n\t\t//@ transient_byte_arrays_mem(theSignatureType);\r\n\t\t//@ foreachp_remove(theSignatureType, ta);\r\n\t\t//@ open transient_byte_array(theSignatureType);\r\n\t\tsignatureType[0] = type;\r\n\t\t//@ close transient_byte_array(theSignatureType);\r\n\t\t//@ foreachp_unremove(theSignatureType, ta);\r\n\t}", "private static String nodeKey(Player player, TYPE type) {\n return \"{playerId:\" + player.getId() + \", teamId:\" + player.getTeamId() + \", gameId:\" + player.getGameId() + \", type:\\\"\" + type.toString() + \"\\\"}\";\n }", "protected byte[] getBathWaterVolumeSetting1() {return null;}", "public PlugwiseMQTTDeviceInfo()\n\t{\n\t\t// initialize internal variables\n\t\tthis.macAddress = \"\";\n\t\tthis.type = \"circle\";\n\t}", "public interface KudoClient {\n MixedOperation<Operator, OperatorList, DoneableOperator, Resource<Operator, DoneableOperator>> operators();\n\n MixedOperation<Instance, InstanceList, DoneableInstance, Resource<Instance, DoneableInstance>> instances();\n\n MixedOperation<OperatorVersion, OperatorVersionList, DoneableOperatorVersion, Resource<OperatorVersion, DoneableOperatorVersion>> operatorVersion();\n\n void close();\n}", "ByteBuffer getApplicationData();", "public interface JobMemcachedKeys {\n String JOB_DETAIL = \"JOB_DETAIL_\";\n String JOB_STATUS = \"JOB_STATUS_\";\n}", "public interface C0003a {\n public static final String ah = \"image_manager_disk_cache\";\n public static final int hP = 262144000;\n\n @Nullable\n a bz();\n }", "short getPQ( byte[] buffer, short offset );", "public ClientPacket(PacketType type, byte[] data){\r\n\t\tthis.type = type;\r\n\t\tthis.dataSize = data.length;\r\n\t\tthis.data = data;\r\n\t}", "private void ipcSend(JSONObject data) {\n JSONObject json = data;\n try {\n json.put(IPC_MESSAGE_APPID, mAppId);\n\n if (mIpcChannel != null) {\n log.e(\"ipcSend:[\" + json.toString() + \"]\");\n\n mIpcChannel.send(json.toString());\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setOpckeytype(java.lang.Long value) {\n\t\tsetValue(test.generated.pg_catalog.tables.PgOpclass.PG_OPCLASS.OPCKEYTYPE, value);\n\t}", "private String createKey(OwObject object_p, OwPluginEntry pluginEntry_p) throws Exception\r\n {\r\n String objectId = object_p.getDMSID();\r\n String key = objectId + \"_\" + pluginEntry_p.getIndex();\r\n return key;\r\n }", "public void setAvailableExtraData(List<String> extraDataKeys) {\n/* 502 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public int getCapacity( Resource.Type type );", "public TableValue(short type) {\n\tkey = null; // No name by default.\n\tstorageType = type; // Type of data. \n\tattrs = null; // No attributes yet.\n\tflags = -1; // No flags yet. \n\n\t// Create a generic, default vector clock. \n\tvclock = new VectorClock(\"s\".getBytes(), 0);\n }", "void setP( byte[] buffer, short offset, short length) throws CryptoException;", "private void uniPerfGetConfig(Parcel data, Parcel reply) {\n int tagsSize = data.readInt();\n if (tagsSize <= 0 || tagsSize >= 128) {\n AwareLog.e(TAG, \"uniPerfGetConfig tags size invalid.\");\n return;\n }\n int[] tags = new int[tagsSize];\n for (int i = 0; i < tagsSize; i++) {\n tags[i] = data.readInt();\n }\n int[] values = new int[tagsSize];\n reply.writeInt(UniPerf.getInstance().uniPerfGetConfig(tags, values));\n for (int value : values) {\n reply.writeInt(value);\n }\n }", "void setQ( byte[] buffer, short offset, short length) throws CryptoException;", "public MessageClackData(String userName, String message, String key, int type) {\n super(userName, type);\n this.message = encrypt(message, key);\n }", "public void setProcessType(String currentProcess) {\n this.currentProcess=currentProcess;\n if(currentProcess.startsWith(\"ENCRYPTION\")) {\n processCaption=\"Encrypting\";\n }\n else {\n processCaption=\"Decrypting\";\n } \n }", "PNMMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) {\n/* 145 */ this();\n/* 146 */ initialize(imageType, param);\n/* */ }", "private void parseCommandPut(DataInputStream in) throws IOException {\n int ksize = in.readInt();\n int vsize = in.readInt();\n byte[] key = new byte[ksize];\n in.read(key);\n byte[] value = new byte[vsize];\n in.read(value);\n // int err = \n in.readUnsignedByte(); // unused\n elements = new LinkedHashMap<String, String>(1);\n elements.put(new String(key), new String(value));\n if (LOG.isDebugEnabled()) LOG.debug(\"parseCommandPut: elements -> \" + elements);\n }", "@Override\n\tpublic Map<String, String> modifyInstanceChargeType(\n\t\t\tMap<String, String> paramsMap, Map<String, String> defaultParamsMap,String requestId) throws Exception {\n\t\tMap<String, String> resultMap = new HashMap<String, String>();\n\t\tif(null==requestId || requestId.length()<1) {\n\t\t\tlogger.info(\"RequestId is null or is error!\");\n\t\t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n\t\t\tresultMap.put(Constants.ERRORMESSAGE,\"The request processing has failed due to some unknown error.\");\n\t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_INTERNAL_SERVER_ERROR+\"\");\n\t\t\treturn resultMap;\n\t\t}\n\t\tString appKeyId = paramsMap.get(Constants.APPKEY_ID);\n\t\tVmUser vmuser = vmUserProxy.getByAppKeyId(appKeyId);\n\t\tString uuid = paramsMap.get(Constants.INSTANCE_ID);\n\t\tVmInstance instance = vmInstanceProxy.getByUuid(uuid, false, true, false, true, true, true, false, false);\n\t\tInteger userId = vmuser.getUserId();\n\t\tInteger clusterid = instance.getCluster().getId();\n\t\tInteger cpuNum = instance.getVmInstanceType().getVcpus();\n\t\tInteger memNum = instance.getVmInstanceType().getMemoryMb();\n\t\tInteger bandNum = -1;\n\t\tInteger hdNum = instance.getVmInstanceType().getLocalGb();\n\t\tList<VmInstanceMetadata> bandNumlist = instance.getVmInstanceMetadatas();\n\t\tfor(VmInstanceMetadata md : bandNumlist) {\n\t\t\tif(md.getKey().equals(Constants.PUBLIC_BANDWIDTH)) {\n\t\t\t\tbandNum = Integer.valueOf(md.getValue());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(-1 == bandNum)\n\t\t{\n\t\t\tlogger.info(\"带宽获取失败!\");\n \t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n\t\t\tresultMap.put(Constants.ERRORMESSAGE,\"This instance do not have band\");\n\t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n \t\treturn resultMap;\n\t\t}\n\t\tString instanceChargeType;\n\t\tif (null == paramsMap.get(Constants.INSTANCE_CHARGE_TYPE))\n\t\t\tinstanceChargeType = defaultParamsMap.get(Constants.INSTANCE_CHARGE_TYPE);\n\t\telse\n\t\t\tinstanceChargeType = paramsMap.get(Constants.INSTANCE_CHARGE_TYPE);\n\t\tString instanceChargeLength;\n\t\tif (null == paramsMap.get(Constants.INSTANCE_CHARGE_LENGTH))\n\t\t\tinstanceChargeLength = defaultParamsMap.get(Constants.INSTANCE_CHARGE_LENGTH);\n\t\telse\n\t\t\tinstanceChargeLength = paramsMap.get(Constants.INSTANCE_CHARGE_LENGTH);\n\t\tInteger paymentType = convertToPaymentType(instanceChargeType);\n\t\tDouble count = Double.valueOf(instanceChargeLength);\n\t\tint times = 0;\n\t\tString type = new VmHdEndtimeManager().getVmEndtimeByUuid(uuid).getType().toLowerCase();\n\t\tString PTYPE = Constants.INSTANCE_TYPE;\n\t\t\n\t\t\n logger.info(\"clusterid: \" + clusterid + \"cpu: \" + cpuNum + \" ,mem: \" + memNum + \" ,hd: \" + hdNum + \" ,band: \" + bandNum);\n \n //计算时间,算各种份数,然后扣费,设每个月份定为30天,每年定为360天\n //计算旧计费规则的份数\n VmHdEndtimeManager vmHdEndtimeManager = new VmHdEndtimeManager();\n VmHdEndtime vm = vmHdEndtimeManager.getVmEndtimeByUuid(uuid);\n\t\tTimestamp currentTime = new Timestamp(System.currentTimeMillis());\n\t\tSimpleDateFormat timeformat = new SimpleDateFormat(\"yyyy-MM-dd,HH:mm:ss\");\n\t long t1 = 0L;\n\t long t2 = 0L;\n \n Timestamp endTime = new Timestamp(vm.getEndTime().getTime());\n t1 = timeformat.parse(getTimeStampNumberFormat(endTime)).getTime();\n t2 = timeformat.parse(getTimeStampNumberFormat(currentTime)).getTime();\n //账号余额\n HashMap<String, String> params = new HashMap<String, String>();\n\t\tparams.put(\"uid\", String.valueOf(userId));\n\t\tparams.put(\"source\", com.appcloud.vm.fe.common.Constants.CLIENT_ID);\n\t\tInteger balance = BillingAPI.balance(userId ,null, AccountUtil.getSignature(params, com.appcloud.vm.fe.common.Constants.CLIENT_SECRET_KEY),com.appcloud.vm.fe.common.Constants.CLIENT_ID);\n //本次应付款金额\n Integer payamount = BillingAPI.getPrice(type, clusterid, cpuNum, memNum, hdNum, bandNum, userId, paymentType, count);\n if (t1 - t2 >= 0) {//不过期才对其退费\n \tInteger oldPaymentType = vmHdEndtimeManager.convertToPaymentType(vm.getPayType());\n \tdouble oldCount = 1.00000;\n \tif(oldPaymentType == 1){\n \t\toldCount = (t1 - t2) / (Constants.yearDays*24*3600*1000.0);\n \t}else if(oldPaymentType == 2){\n \t\toldCount = (t1 - t2) / (Constants.monthDays*24*3600*1000.0); \n \t}else if(oldPaymentType == 3){\n \t\toldCount = (t1 - t2) / (24*3600*1000.0); //因为t1-t2得到的是毫秒级,所以要除3600000得出小时\n \t}else if(oldPaymentType == 4){\n \t\toldCount = (t1 - t2) / (3600*1000.0); //因为t1-t2得到的是毫秒级,所以要除1000得出秒\n \t}\n \tlogger.info(\"oldCount:\"+oldCount);\n \t//计算手续费的份数\n \tdouble chargecount = 1.0;\n \t//先判断余额是否充足,再进行扣费等操作\n \tInteger reamount = 0;\n \tInteger chargeamount = 0;\n \treamount = BillingAPI.getPrice(type, clusterid, cpuNum, memNum, hdNum, bandNum, userId, oldPaymentType, oldCount);\n \tchargeamount = BillingAPI.getPrice(\"charge\", clusterid, -1, -1, -1, -1, userId, oldPaymentType, chargecount);\n \tlogger.info(balance);\n \tlogger.info(payamount);\n \tlogger.info(reamount);\n \tlogger.info(chargeamount);\n \tif(balance < (payamount - reamount + chargeamount)){\n \t\tlogger.info(\"余额不足,返回\");\n \t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n \t\t\tresultMap.put(Constants.ERRORMESSAGE,\"your money is not enough!\");\n \t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n \t\treturn resultMap;\n \t}\n \t\n \t//根据旧的计费规则退费\n \tString PID=\"购买\" + cpuNum + \"核CPU\" + memNum + \"G内存\" + hdNum +\"G硬盘和\" + bandNum + \n \t\t\t\"M带宽,未到期,退费\";\n \tlogger.debug(\"PID = \" + PID);\n \tString item = \"\";\n \tif(type.equalsIgnoreCase(\"vm\")){\n \t\titem = \"CPU/内存/硬盘/带宽\";\n \t}else if(type.equalsIgnoreCase(\"instancetype\")){\n \t\tcom.appcloud.vm.fe.billing.Billingrate rate = BillingAPI.getRate(type, clusterid, cpuNum, memNum, hdNum, bandNum).get(0);\n \t\titem = rate.getName();\n \t}\n \tlogger.debug(\"item = \" + item);\n \tString message = \"\";\n \tString payment_type = new VmHdEndtimeManager().convertToType(oldPaymentType);\n \tmessage = BillingAPI.pay(RECID, userId, item, payment_type, times, oldCount, PTYPE, PID, reamount, null);\n \tif(!message.equalsIgnoreCase(\"success\")){\n \t\tlogger.info(\"payment fail\");\n \t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n \t\t\tresultMap.put(Constants.ERRORMESSAGE,\"payment fail\");\n \t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n \t\treturn resultMap; //退费不成功\n \t} \n \t //收取手续费\n item = \"手续费\";\n PID=\"修改付费规则的手续费\";\n payment_type = new VmHdEndtimeManager().convertToType(paymentType);\n message = BillingAPI.pay(userId, RECID, item, payment_type, times, chargecount, PTYPE, PID, chargeamount, null);\n if(!message.equalsIgnoreCase(\"success\")){\n logger.info(\"payment fail\");\n return resultMap; \n }\n logger.info(\"payment success!\");\n } else {\n \tif(balance < payamount){\n \t\tlogger.info(\"余额不足,返回\");\n \t\tresultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n \t\t\tresultMap.put(Constants.ERRORMESSAGE,\"your money is not enough!\");\n \t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n \t\treturn resultMap;\n \t}\n \t}\n \n //查询余额,扣费\n logger.info(\"start payment!\");\n String PID=\"购买\" + cpuNum + \"核CPU\" + memNum + \"G内存\" + hdNum + \"G硬盘和\" + bandNum + \"M带宽\";\n logger.debug(\"PID = \" + PID);\n String item = \"\";\n String message = \"\";\n logger.info(\"type = \" + type);\n if(type.equalsIgnoreCase(\"vm\")){\n \titem = \"CPU/内存/硬盘/带宽\";\n logger.debug(\"item = \" + item);\n }else if(type.equalsIgnoreCase(\"instancetype\")){\n \tcom.appcloud.vm.fe.billing.Billingrate rate = BillingAPI.getRate(type, clusterid, cpuNum, memNum, hdNum, bandNum).get(0);\n\t\t\titem = rate.getName();\n }\n String payment_type = new VmHdEndtimeManager().convertToType(paymentType);\n message = BillingAPI.pay(userId, RECID, item, payment_type, times, count, PTYPE, PID, payamount,null);\n if(!message.equalsIgnoreCase(\"success\")){\n logger.info(\"payment fail\");\n resultMap.put(Constants.ERRORCODE, Constants.INTERNAL_ERROR);\n\t\t\tresultMap.put(Constants.ERRORMESSAGE,\"payment fail\");\n\t\t\tresultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_FORBIDDEN+\"\");\n return resultMap; \n }\n logger.info(\"payment success!\");\n \n //修改虚拟机到期时间以及付费类型\n logger.info(\"start modify endtime!\");\n if(type.equalsIgnoreCase(\"vm\")){\n logger.info(\"vm\");\n Timestamp tempStamp = new Timestamp(System.currentTimeMillis());\n logger.info(\"userId = \" + userId + \" uuid = \" + uuid + \" paymentType = \" + paymentType \n + \" count = \" + count + \" tempStamp = \" + tempStamp + \" \" + VmHdEndtime.TYPE_VM);\n vmHdEndtimeManager.updateVmHdEndtime(userId, uuid, tempStamp, VmHdEndtime.TYPE_VM, paymentType, count);\n }else if(type.equalsIgnoreCase(\"instancetype\")){\n logger.info(\"instancetype\");\n Timestamp tempStamp = new Timestamp(System.currentTimeMillis());\n logger.info(\"userId = \" + userId + \" uuid = \" + uuid + \" paymentType = \" + paymentType \n + \" count = \" + count + \"tempStamp = \" + tempStamp + \" \" + VmHdEndtime.TYPE_INSTANCETYPE);\n vmHdEndtimeManager.updateVmHdEndtime(userId, uuid, tempStamp, VmHdEndtime.TYPE_INSTANCETYPE, paymentType, count);\n }\n resultMap.put(Constants.HTTP_CODE, HttpConstants.STATUS_OK);\n return resultMap;\n\t}" ]
[ "0.7461772", "0.7188162", "0.6849862", "0.6622877", "0.6556345", "0.644622", "0.630002", "0.6299455", "0.62147033", "0.6163412", "0.6087984", "0.6002228", "0.5975709", "0.59395826", "0.5907646", "0.57982445", "0.5726266", "0.5712276", "0.5684582", "0.5584436", "0.5559634", "0.5252141", "0.49216577", "0.47094396", "0.4694811", "0.46729812", "0.4656656", "0.46391153", "0.46205348", "0.46073896", "0.45961434", "0.45853224", "0.45853224", "0.4572385", "0.45663446", "0.45509598", "0.453728", "0.45189363", "0.45187464", "0.45142606", "0.45046827", "0.4490483", "0.44709814", "0.44686854", "0.44686854", "0.4463381", "0.44375443", "0.4430811", "0.44306394", "0.44279918", "0.4413793", "0.4411431", "0.44075605", "0.44003716", "0.43986735", "0.43878996", "0.43874544", "0.43870187", "0.4370455", "0.43632102", "0.43427208", "0.43381727", "0.43282798", "0.43189391", "0.43189391", "0.43189391", "0.43189391", "0.4315619", "0.4315214", "0.43085253", "0.43080577", "0.43076736", "0.43076736", "0.43066546", "0.43042377", "0.4295094", "0.4285528", "0.42770728", "0.42726806", "0.4271019", "0.4267067", "0.42609677", "0.4253753", "0.4252036", "0.42447025", "0.4242165", "0.42407113", "0.422909", "0.42224765", "0.4221811", "0.42164075", "0.42121062", "0.42113987", "0.42101535", "0.41872218", "0.4183457", "0.4183175", "0.4179106", "0.41723317", "0.41705495" ]
0.7270173
1
PaymentDetails required bytes serialized_payment_details = 4;
boolean hasSerializedPaymentDetails();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.protobuf.ByteString getSerializedPaymentDetails();", "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return instance.getSerializedPaymentDetails();\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "private void clearSerializedPaymentDetails() {\n bitField0_ = (bitField0_ & ~0x00000008);\n serializedPaymentDetails_ = getDefaultInstance().getSerializedPaymentDetails();\n }", "public Builder setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setSerializedPaymentDetails(value);\n return this;\n }", "@java.lang.Override\n public boolean hasPaymentDetailsVersion() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return instance.hasSerializedPaymentDetails();\n }", "private void clearPaymentDetailsVersion() {\n bitField0_ = (bitField0_ & ~0x00000001);\n paymentDetailsVersion_ = 1;\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void setPaymentDetailsVersion(int value) {\n bitField0_ |= 0x00000001;\n paymentDetailsVersion_ = value;\n }", "String getPaymentInformation();", "@java.lang.Override\n public int getPaymentDetailsVersion() {\n return paymentDetailsVersion_;\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "com.google.protobuf.ByteString getDetailsBytes();", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "void setPaymentInformation(String information);", "public PaymentInformation getPaymentInformation(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.paymentinformation.v1.PaymentInformation res){\n\t\tPaymentInformation paymentInformation = new PaymentInformation();\n\t\t\n\t\tpaymentInformation.setBookingNo( res.getBookingNo() );\n\t\tif( res.getCreditCardFlag() != null ){\n\t\t\tpaymentInformation.setCreditCardFlag( res.getCreditCardFlag().charAt(0) );\n\t\t}\n\t\tif( res.getGuaranteedCheckFlag() != null ){\n\t\t\tpaymentInformation.setGuaranteedCheckFlag( res.getGuaranteedCheckFlag().charAt(0) );\n\t\t}\n\t\tif( res.getMoneyTransferFlag() != null ){\n\t\t\tpaymentInformation.setMoneyTransferFlag( res.getMoneyTransferFlag().charAt(0) );\n\t\t}\n\t\tif( res.getImApplicationInfo() != null ){\n\t\t\tpaymentInformation.setImApplicationInfo( this.getIMApplicationInfo( res.getImApplicationInfo() ) );\n\t\t}\n\t\tif( res.getGuaranteedCheck() != null ){\n\t\t\tpaymentInformation.setGuaranteedCheck( this.getGuaranteedCheck( res.getGuaranteedCheck() ) );\n\t\t}\n\t\tif( res.getMoneyTransfer() != null ){\n\t\t\tpaymentInformation.setMoneyTransfer( this.getMoneyTransfer( res.getMoneyTransfer() ) );\n\t\t}\n\t\tif( res.getCreditCard() != null ){\n\t\t\tpaymentInformation.setCreditCard( this.getCreditCard( res.getCreditCard() ) );\n\t\t}\n\t\t\n\t\treturn paymentInformation;\n\t}", "@java.lang.Override\n public int getPaymentDetailsVersion() {\n return instance.getPaymentDetailsVersion();\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "boolean hasPaymentDetailsVersion();", "int getPaymentDetailsVersion();", "public Builder clearSerializedPaymentDetails() {\n copyOnWrite();\n instance.clearSerializedPaymentDetails();\n return this;\n }", "public java.lang.String getPaymentinformation () {\r\n\t\treturn paymentinformation;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "@java.lang.Override\n public boolean hasPaymentDetailsVersion() {\n return instance.hasPaymentDetailsVersion();\n }", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public PaymentDetails () {\n\t}", "public Payment[] getPaymentInfo(){\n \t\n \treturn paymentArr;\n }", "com.google.protobuf.ByteString\n getField1504Bytes();", "com.google.protobuf.ByteString\n getField1704Bytes();", "public PolicyDetailsRecord() {\n\t\tsuper(PolicyDetails.POLICY_DETAILS);\n\t}", "@Override\r\n\tpublic byte[] getBytes() throws UnsupportedEncodingException {\r\n\t\tbyte[] bytes = new byte[RECORD_SIZE];\r\n\t\tbytes = Utilities.completeBytes(bytes, this.bidInfo.getBytes(), 0);\r\n\t\tbytes = Utilities.completeBytes(bytes,\r\n\t\t\t\tUtilities.stringToBytes(Utilities.completeLength(biddingName, 30)), 32);\r\n\t\tbytes = Utilities.completeBytes(bytes, Utilities.intToBytes(typeProduct.ordinal()), 62);\r\n\t\tbytes = Utilities.completeBytes(bytes, product.getBytes(), 66);\r\n\t\tbytes = Utilities.completeBytes(bytes, publicationTime.getBytes(), 157);\r\n\t\tbytes = Utilities.completeBytes(bytes, initTime.getBytes(), 171);\r\n\t\tbytes = Utilities.completeBytes(bytes, finishTime.getBytes(), 185);\r\n\t\tbytes = Utilities.completeBytes(bytes, (byte) ((isAutomaticIncremet)?0:1), 199);\r\n\t\tbytes = Utilities.completeBytes(bytes, (byte) ((isPublic)?0:1), 200);\r\n\t\tbytes = Utilities.completeBytes(bytes,\r\n\t\t\t\tUtilities.stringToBytes(Utilities.completeLength(owner, 20)), 201);\r\n\t\treturn bytes;\r\n\t}", "public PaymentmethodRecord() {\n super(Paymentmethod.PAYMENTMETHOD);\n }", "com.google.protobuf.ByteString\n getField1544Bytes();", "com.google.protobuf.ByteString\n getField1404Bytes();", "public java.lang.String getPaymentHash() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n paymentHash_ = s;\n return s;\n }\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "com.google.protobuf.ByteString\n getField1204Bytes();", "com.google.protobuf.ByteString\n getField1711Bytes();", "com.google.protobuf.ByteString\n getField1512Bytes();", "com.google.protobuf.ByteString\n getField1304Bytes();", "com.google.protobuf.ByteString\n getField1517Bytes();", "com.google.protobuf.ByteString\n getField1117Bytes();", "com.google.protobuf.ByteString\n getField1804Bytes();", "com.google.protobuf.ByteString\n getField1217Bytes();", "com.google.protobuf.ByteString\n getField1545Bytes();", "com.google.protobuf.ByteString\n getField1756Bytes();", "com.google.protobuf.ByteString\n getField1744Bytes();", "com.google.protobuf.ByteString\n getField1556Bytes();", "com.google.protobuf.ByteString\n getField1557Bytes();", "public java.lang.String getPaymentHash() {\n java.lang.Object ref = paymentHash_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n paymentHash_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_PAYMENT_ORDINARY_PAYMENT;\n }", "com.google.protobuf.ByteString\n getField1757Bytes();", "com.google.protobuf.ByteString\n getField1748Bytes();", "static String m13919a(Context context, C6924p paymentStateHandler) {\n JSONObject deviceInfo = new JSONObject();\n try {\n String androidId = Secure.getString(context.getContentResolver(), \"android_id\");\n deviceInfo.put(\"deviceFingerprintVersion\", \"1.0\");\n deviceInfo.put(\"platform\", \"android\");\n deviceInfo.put(\"apiVersion\", \"4\");\n deviceInfo.put(\"osVersion\", VERSION.SDK_INT);\n deviceInfo.put(\"sdkVersion\", \"1.10.0\");\n deviceInfo.put(\"deviceIdentifier\", androidId);\n deviceInfo.put(\"locale\", C6912j.m14059a(context));\n return Base64.encodeToString(deviceInfo.toString().getBytes(Charset.forName(\"UTF-8\")), 2);\n } catch (JSONException jsonException) {\n Log.e(f12559a, \"Token could not be created\", jsonException);\n paymentStateHandler.mo22387b((Throwable) jsonException);\n return \"\";\n }\n }", "com.google.protobuf.ByteString\n getField1257Bytes();", "com.google.protobuf.ByteString\n getField1549Bytes();", "com.google.protobuf.ByteString\n getField1543Bytes();", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment();", "com.google.protobuf.ByteString\n getField1745Bytes();", "com.google.protobuf.ByteString\n getField1714Bytes();", "com.google.protobuf.ByteString\n getField1445Bytes();", "com.google.protobuf.ByteString\n getField1417Bytes();", "public CreditCard getDefaultPaymentInfo();", "com.google.protobuf.ByteString\n getField1511Bytes();", "com.google.protobuf.ByteString\n getField1215Bytes();", "com.google.protobuf.ByteString\n getField1244Bytes();", "com.google.protobuf.ByteString\n getField1715Bytes();", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "com.google.protobuf.ByteString\n getField1548Bytes();", "com.google.protobuf.ByteString\n getField1812Bytes();", "public void setDetail(byte[] detail) {\r\n this.detail = detail;\r\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString\n getField1412Bytes();", "com.google.protobuf.ByteString\n getField1558Bytes();", "com.google.protobuf.ByteString\n getField1214Bytes();", "com.google.protobuf.ByteString\n getField1604Bytes();", "com.google.protobuf.ByteString\n getField1144Bytes();", "com.google.protobuf.ByteString\n getField1218Bytes();", "com.google.protobuf.ByteString\n getField1212Bytes();", "com.google.protobuf.ByteString\n getField1114Bytes();", "public byte[] getDetail() {\r\n return detail;\r\n }", "public boolean isPartialPaymentSupported();", "com.google.protobuf.ByteString\n getField1856Bytes();", "com.google.protobuf.ByteString\n getField1115Bytes();", "com.google.protobuf.ByteString\n getField1857Bytes();", "com.google.protobuf.ByteString\n getField1248Bytes();", "com.google.protobuf.ByteString\n getField1518Bytes();", "com.google.protobuf.ByteString\n getField1578Bytes();", "com.google.protobuf.ByteString\n getField1456Bytes();", "com.google.protobuf.ByteString\n getField1345Bytes();", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "com.google.protobuf.ByteString\n getField1755Bytes();" ]
[ "0.82038945", "0.78406984", "0.7672053", "0.7183968", "0.695285", "0.67179716", "0.66342545", "0.65559834", "0.6480167", "0.64448136", "0.6223145", "0.5956644", "0.5953231", "0.5951428", "0.59144926", "0.5891327", "0.57743084", "0.5749999", "0.5703974", "0.570069", "0.56634367", "0.5659935", "0.5657271", "0.5648342", "0.56400573", "0.56288546", "0.56113607", "0.5547695", "0.5542958", "0.55104643", "0.54973465", "0.5447462", "0.5435767", "0.5381711", "0.53777254", "0.5341594", "0.53340733", "0.5317032", "0.5309946", "0.53096765", "0.5283365", "0.5280656", "0.52784044", "0.5277518", "0.52692145", "0.5264747", "0.5263717", "0.5254973", "0.5252406", "0.5240902", "0.5240224", "0.5238198", "0.52337265", "0.52285266", "0.5227106", "0.52270997", "0.52267087", "0.5224098", "0.5217402", "0.5214952", "0.5214295", "0.52085435", "0.52082986", "0.52054614", "0.5203705", "0.5200687", "0.52006096", "0.51887554", "0.5186415", "0.5186199", "0.5185867", "0.5184772", "0.51840425", "0.5181835", "0.51812506", "0.51810455", "0.51807725", "0.517789", "0.5177483", "0.5177483", "0.5177114", "0.51766247", "0.5175826", "0.5174838", "0.5168", "0.51665026", "0.51644826", "0.5163361", "0.5163318", "0.5161598", "0.51615274", "0.5155481", "0.5154738", "0.5153608", "0.5149883", "0.5148344", "0.51455677", "0.51438934", "0.51423377", "0.51416725" ]
0.6965263
4
PaymentDetails required bytes serialized_payment_details = 4;
com.google.protobuf.ByteString getSerializedPaymentDetails();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000008;\n serializedPaymentDetails_ = value;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return instance.getSerializedPaymentDetails();\n }", "boolean hasSerializedPaymentDetails();", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "private void clearSerializedPaymentDetails() {\n bitField0_ = (bitField0_ & ~0x00000008);\n serializedPaymentDetails_ = getDefaultInstance().getSerializedPaymentDetails();\n }", "public Builder setSerializedPaymentDetails(com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setSerializedPaymentDetails(value);\n return this;\n }", "@java.lang.Override\n public boolean hasPaymentDetailsVersion() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return instance.hasSerializedPaymentDetails();\n }", "private void clearPaymentDetailsVersion() {\n bitField0_ = (bitField0_ & ~0x00000001);\n paymentDetailsVersion_ = 1;\n }", "public String getPaymentData() {\n return paymentData;\n }", "private void setPaymentDetailsVersion(int value) {\n bitField0_ |= 0x00000001;\n paymentDetailsVersion_ = value;\n }", "String getPaymentInformation();", "@java.lang.Override\n public int getPaymentDetailsVersion() {\n return paymentDetailsVersion_;\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPaymentOrBuilder getPaymentOrBuilder();", "com.google.protobuf.ByteString getDetailsBytes();", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "void setPaymentInformation(String information);", "public PaymentInformation getPaymentInformation(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.paymentinformation.v1.PaymentInformation res){\n\t\tPaymentInformation paymentInformation = new PaymentInformation();\n\t\t\n\t\tpaymentInformation.setBookingNo( res.getBookingNo() );\n\t\tif( res.getCreditCardFlag() != null ){\n\t\t\tpaymentInformation.setCreditCardFlag( res.getCreditCardFlag().charAt(0) );\n\t\t}\n\t\tif( res.getGuaranteedCheckFlag() != null ){\n\t\t\tpaymentInformation.setGuaranteedCheckFlag( res.getGuaranteedCheckFlag().charAt(0) );\n\t\t}\n\t\tif( res.getMoneyTransferFlag() != null ){\n\t\t\tpaymentInformation.setMoneyTransferFlag( res.getMoneyTransferFlag().charAt(0) );\n\t\t}\n\t\tif( res.getImApplicationInfo() != null ){\n\t\t\tpaymentInformation.setImApplicationInfo( this.getIMApplicationInfo( res.getImApplicationInfo() ) );\n\t\t}\n\t\tif( res.getGuaranteedCheck() != null ){\n\t\t\tpaymentInformation.setGuaranteedCheck( this.getGuaranteedCheck( res.getGuaranteedCheck() ) );\n\t\t}\n\t\tif( res.getMoneyTransfer() != null ){\n\t\t\tpaymentInformation.setMoneyTransfer( this.getMoneyTransfer( res.getMoneyTransfer() ) );\n\t\t}\n\t\tif( res.getCreditCard() != null ){\n\t\t\tpaymentInformation.setCreditCard( this.getCreditCard( res.getCreditCard() ) );\n\t\t}\n\t\t\n\t\treturn paymentInformation;\n\t}", "@java.lang.Override\n public int getPaymentDetailsVersion() {\n return instance.getPaymentDetailsVersion();\n }", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "boolean hasPaymentDetailsVersion();", "int getPaymentDetailsVersion();", "public Builder clearSerializedPaymentDetails() {\n copyOnWrite();\n instance.clearSerializedPaymentDetails();\n return this;\n }", "public java.lang.String getPaymentinformation () {\r\n\t\treturn paymentinformation;\r\n\t}", "public static PaymentManifestParserParsePaymentMethodManifestParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "@java.lang.Override\n public boolean hasPaymentDetailsVersion() {\n return instance.hasPaymentDetailsVersion();\n }", "public static PaymentManifestParserParsePaymentMethodManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "public PaymentDetails () {\n\t}", "public Payment[] getPaymentInfo(){\n \t\n \treturn paymentArr;\n }", "com.google.protobuf.ByteString\n getField1504Bytes();", "com.google.protobuf.ByteString\n getField1704Bytes();", "public PolicyDetailsRecord() {\n\t\tsuper(PolicyDetails.POLICY_DETAILS);\n\t}", "@Override\r\n\tpublic byte[] getBytes() throws UnsupportedEncodingException {\r\n\t\tbyte[] bytes = new byte[RECORD_SIZE];\r\n\t\tbytes = Utilities.completeBytes(bytes, this.bidInfo.getBytes(), 0);\r\n\t\tbytes = Utilities.completeBytes(bytes,\r\n\t\t\t\tUtilities.stringToBytes(Utilities.completeLength(biddingName, 30)), 32);\r\n\t\tbytes = Utilities.completeBytes(bytes, Utilities.intToBytes(typeProduct.ordinal()), 62);\r\n\t\tbytes = Utilities.completeBytes(bytes, product.getBytes(), 66);\r\n\t\tbytes = Utilities.completeBytes(bytes, publicationTime.getBytes(), 157);\r\n\t\tbytes = Utilities.completeBytes(bytes, initTime.getBytes(), 171);\r\n\t\tbytes = Utilities.completeBytes(bytes, finishTime.getBytes(), 185);\r\n\t\tbytes = Utilities.completeBytes(bytes, (byte) ((isAutomaticIncremet)?0:1), 199);\r\n\t\tbytes = Utilities.completeBytes(bytes, (byte) ((isPublic)?0:1), 200);\r\n\t\tbytes = Utilities.completeBytes(bytes,\r\n\t\t\t\tUtilities.stringToBytes(Utilities.completeLength(owner, 20)), 201);\r\n\t\treturn bytes;\r\n\t}", "public PaymentmethodRecord() {\n super(Paymentmethod.PAYMENTMETHOD);\n }", "com.google.protobuf.ByteString\n getField1544Bytes();", "com.google.protobuf.ByteString\n getField1404Bytes();", "public java.lang.String getPaymentHash() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n paymentHash_ = s;\n return s;\n }\n }", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "com.google.protobuf.ByteString\n getField1204Bytes();", "com.google.protobuf.ByteString\n getField1711Bytes();", "com.google.protobuf.ByteString\n getField1512Bytes();", "com.google.protobuf.ByteString\n getField1304Bytes();", "com.google.protobuf.ByteString\n getField1517Bytes();", "com.google.protobuf.ByteString\n getField1117Bytes();", "com.google.protobuf.ByteString\n getField1804Bytes();", "com.google.protobuf.ByteString\n getField1217Bytes();", "com.google.protobuf.ByteString\n getField1545Bytes();", "com.google.protobuf.ByteString\n getField1756Bytes();", "com.google.protobuf.ByteString\n getField1744Bytes();", "com.google.protobuf.ByteString\n getField1556Bytes();", "com.google.protobuf.ByteString\n getField1557Bytes();", "public java.lang.String getPaymentHash() {\n java.lang.Object ref = paymentHash_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n paymentHash_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.google.protobuf.ByteString\n getField1757Bytes();", "com.google.protobuf.ByteString\n getField1748Bytes();", "@Override\n public byte getSubtype() {\n return SUBTYPE_PAYMENT_ORDINARY_PAYMENT;\n }", "static String m13919a(Context context, C6924p paymentStateHandler) {\n JSONObject deviceInfo = new JSONObject();\n try {\n String androidId = Secure.getString(context.getContentResolver(), \"android_id\");\n deviceInfo.put(\"deviceFingerprintVersion\", \"1.0\");\n deviceInfo.put(\"platform\", \"android\");\n deviceInfo.put(\"apiVersion\", \"4\");\n deviceInfo.put(\"osVersion\", VERSION.SDK_INT);\n deviceInfo.put(\"sdkVersion\", \"1.10.0\");\n deviceInfo.put(\"deviceIdentifier\", androidId);\n deviceInfo.put(\"locale\", C6912j.m14059a(context));\n return Base64.encodeToString(deviceInfo.toString().getBytes(Charset.forName(\"UTF-8\")), 2);\n } catch (JSONException jsonException) {\n Log.e(f12559a, \"Token could not be created\", jsonException);\n paymentStateHandler.mo22387b((Throwable) jsonException);\n return \"\";\n }\n }", "com.google.protobuf.ByteString\n getField1257Bytes();", "com.google.protobuf.ByteString\n getField1549Bytes();", "com.google.protobuf.ByteString\n getField1543Bytes();", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPaymentHashBytes() {\n java.lang.Object ref = paymentHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n paymentHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment();", "com.google.protobuf.ByteString\n getField1714Bytes();", "com.google.protobuf.ByteString\n getField1745Bytes();", "com.google.protobuf.ByteString\n getField1445Bytes();", "com.google.protobuf.ByteString\n getField1417Bytes();", "public CreditCard getDefaultPaymentInfo();", "com.google.protobuf.ByteString\n getField1511Bytes();", "com.google.protobuf.ByteString\n getField1215Bytes();", "com.google.protobuf.ByteString\n getField1244Bytes();", "com.google.protobuf.ByteString\n getField1715Bytes();", "com.google.protobuf.ByteString\n getField1548Bytes();", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "com.google.protobuf.ByteString\n getField1812Bytes();", "public void setDetail(byte[] detail) {\r\n this.detail = detail;\r\n }", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString getMerchantData();", "com.google.protobuf.ByteString\n getField1412Bytes();", "com.google.protobuf.ByteString\n getField1558Bytes();", "com.google.protobuf.ByteString\n getField1214Bytes();", "com.google.protobuf.ByteString\n getField1604Bytes();", "com.google.protobuf.ByteString\n getField1144Bytes();", "com.google.protobuf.ByteString\n getField1218Bytes();", "com.google.protobuf.ByteString\n getField1212Bytes();", "com.google.protobuf.ByteString\n getField1114Bytes();", "public byte[] getDetail() {\r\n return detail;\r\n }", "com.google.protobuf.ByteString\n getField1856Bytes();", "public boolean isPartialPaymentSupported();", "com.google.protobuf.ByteString\n getField1115Bytes();", "com.google.protobuf.ByteString\n getField1857Bytes();", "com.google.protobuf.ByteString\n getField1248Bytes();", "com.google.protobuf.ByteString\n getField1518Bytes();", "com.google.protobuf.ByteString\n getField1578Bytes();", "com.google.protobuf.ByteString\n getField1456Bytes();", "com.google.protobuf.ByteString\n getField1345Bytes();", "public void setPaymentinformation (java.lang.String paymentinformation) {\r\n\t\tthis.paymentinformation = paymentinformation;\r\n\t}", "com.google.protobuf.ByteString\n getField1755Bytes();" ]
[ "0.7840572", "0.7671914", "0.7183848", "0.6965419", "0.6952939", "0.6718031", "0.663439", "0.6556068", "0.64802945", "0.64450496", "0.62232286", "0.5956749", "0.5953476", "0.59514207", "0.59146225", "0.5891537", "0.5773729", "0.5749882", "0.5703619", "0.5700829", "0.5663459", "0.5660361", "0.56575745", "0.5648787", "0.5640096", "0.5628598", "0.5611652", "0.55473053", "0.5543063", "0.55112493", "0.54972523", "0.54473674", "0.5435961", "0.53820443", "0.53773415", "0.53416026", "0.53340745", "0.53170466", "0.53097826", "0.5309769", "0.528339", "0.52810353", "0.5278492", "0.5277579", "0.52695304", "0.526513", "0.52637506", "0.52553463", "0.525242", "0.52412224", "0.5240505", "0.5238267", "0.52338886", "0.5228416", "0.52275294", "0.52271813", "0.52265006", "0.5223971", "0.5217591", "0.5215202", "0.52144265", "0.5208838", "0.5208109", "0.52052635", "0.52039796", "0.52010757", "0.5201014", "0.5188866", "0.5186855", "0.5186324", "0.5185992", "0.5184915", "0.5184059", "0.51822084", "0.518124", "0.5181134", "0.5180921", "0.517788", "0.5177446", "0.5177446", "0.51772887", "0.5176707", "0.51760477", "0.5174731", "0.5168059", "0.5166679", "0.5164655", "0.51636064", "0.5163509", "0.5161658", "0.5161565", "0.51556575", "0.51549417", "0.51538014", "0.5150051", "0.5148467", "0.5145721", "0.51440066", "0.51422024", "0.51419675" ]
0.82038236
0
pkidependent signature optional bytes signature = 5;
boolean hasSignature();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract byte[] getSignature();", "com.google.protobuf.ByteString getSignature();", "int getSignature ();", "String getSignature();", "String getSignature();", "String getSignature();", "BigInteger getDigitalSignature();", "public abstract String getSignature();", "SignatureIdentification createSignatureIdentification();", "org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder();", "com.google.protobuf.ByteString\n getSignatureBytes();", "com.google.protobuf.ByteString\n getSignatureBytes();", "Signature getSignature();", "org.apache.calcite.avatica.proto.Common.Signature getSignature();", "byte[] getSignatureImage();", "public byte[] getSignature() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getSignature():byte[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getSignature():byte[]\");\n }", "public GpgSignature(@NonNull byte[] signature) {\n\t\tthis.signature = signature;\n\t}", "byte[] generateSignature(byte[] message, PrivateKey privateKey, SecureRandom secureRandom) throws IOException;", "public byte[] getSigAlgParams() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getSigAlgParams():byte[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getSigAlgParams():byte[]\");\n }", "Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage);", "native String nativeGetSignature(long nativeHandler) throws RuntimeException;", "com.google.protobuf.ByteString getSig();", "SignatureSpi(com.android.org.bouncycastle.crypto.Digest r1, com.android.org.bouncycastle.crypto.DSA r2, com.android.org.bouncycastle.jcajce.provider.asymmetric.util.DSAEncoder r3) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.<init>(com.android.org.bouncycastle.crypto.Digest, com.android.org.bouncycastle.crypto.DSA, com.android.org.bouncycastle.jcajce.provider.asymmetric.util.DSAEncoder):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.<init>(com.android.org.bouncycastle.crypto.Digest, com.android.org.bouncycastle.crypto.DSA, com.android.org.bouncycastle.jcajce.provider.asymmetric.util.DSAEncoder):void\");\n }", "private void setSignature(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n signature_ = value;\n }", "String getUniqueSignature();", "public void setSignature( String pSignature )\r\n {\r\n this.signature = pSignature;\r\n }", "public byte []\ngetSignature() {\n\treturn signature;\n}", "int getSignatureType();", "@Override\n public String buildSignature(RequestDataToSign requestDataToSign, String appKey) {\n // find private key for this app\n final String secretKey = keyStore.getPrivateKey(appKey);\n if (secretKey == null) {\n LOG.error(\"Unknown application key: {}\", appKey);\n throw new PrivateKeyNotFoundException();\n }\n\n // sign\n return super.buildSignature(requestDataToSign, secretKey);\n }", "java.lang.String getSignatureText();", "public boolean verifySignature() {\r\n\t\t\r\n\t\tString data;\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\t\r\n\t\t\tdata = StringUtil.getStringFromKey(creator) + name +\r\n\t\t\t\t\tdescription + begin + end+end_subscription+\r\n\t\t\t\t\tlocation+min_capacity+max_capacity;\r\n\t\t\treturn StringUtil.verifyECDSASig(creator, data, signature);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdata = StringUtil.getStringFromKey(subscriber)+id_event;\r\n\t\t\treturn StringUtil.verifyECDSASig(subscriber, data, signature);\r\n\t\t}\r\n//\t\tSystem.out.println(\"signature \"+signature);\r\n\t\t\r\n\t}", "public static native String getSignature(long[] msgArgs);", "@Override\n public boolean verifySignature(byte[] signature) {\n try {\n Element[] sig = derDecode(signature);\n CL04SignPublicPairingKeySerParameter pk = (CL04SignPublicPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(pairingKeySerParameter.getParameters());\n Element a = sig[0];\n Element b = sig[1];\n Element c = sig[2];\n List<Element> A = IntStream.range(3, 3 + messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n List<Element> B = IntStream.range(3 + messages.size(), 3 + 2 * messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n return aFormedCorrectly(pairing, a, A, pk) && bFormedCorrectly(pairing, a, b, A, B, pk) && cFormedCorrectly(pairing, a, b, c, B, pk);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return false;\n\n }", "public String getSignature()\r\n {\r\n return signature;\r\n }", "public boolean isSignatureRequired() {\n\t\treturn false;\n\t}", "boolean verifySignature(byte[] message, byte[] signature, PublicKey publicKey) throws IOException;", "private void generateSignature(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t/*\r\n\t\t * IMPORTANT: in all other APDUs the previous APDU type gets overwritten\r\n\t\t * in process() function; this is not the case here because the\r\n\t\t * information is needed when processing to verify the security\r\n\t\t * condition for non repudiation signature\r\n\t\t * \r\n\t\t * the previous APDU type has to be overwritten in every possible exit\r\n\t\t * path out of this function; therefore we check the security conditions\r\n\t\t * of the non repudiation signature as early as possible, but we have to\r\n\t\t * overwrite the previous APDU type in the 2 possible exceptions before\r\n\t\t */\r\n\t\tJCSystem.beginTransaction();\r\n\t\t////@ open valid(); // auto\r\n\t\t// check P1 and P2\t\t\r\n\t\tif (buffer[ISO7816.OFFSET_P1] != (byte) 0x9E || buffer[ISO7816.OFFSET_P2] != (byte) 0x9A) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t}\r\n\t\t// generate signature without prepare signature results:\r\n\t\t// \"conditions of use not satisfied\"\r\n\t\tif (getSignatureType() == NO_SIGNATURE) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t\t}\r\n\t\t/*\r\n\t\t * verify authentication information throw\r\n\t\t * \"security condition not satisfied\" if something is wrong\r\n\t\t */\r\n\t\t// check if previous APDU did a cardholder PIN verification\r\n\t\tif ((getSignatureType() == NON_REPUDIATION) && (getPreviousApduType() != VERIFY_CARDHOLDER_PIN)) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t}\r\n\t\t// overwrite previous ADPU type as soon as possible\r\n\t\tsetPreviousApduType(OTHER);\r\n\r\n\t\t// it is impossible to generate basic signatures with this command\r\n\t\tif (getSignatureType() == BASIC)\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// check if cardholder PIN was entered correctly\r\n\t\tif (!cardholderPin.isValidated())\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\tswitch (signatureAlgorithm) {\r\n\t\tcase ALG_MD5_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Md5Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\tcase ALG_SHA1_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Sha1Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\tcase ALG_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t\t// if T=1, store signature in sigBuffer so that it can latter be sent\r\n\t\tif (APDU.getProtocol() == APDU.PROTOCOL_T1) {\r\n\t\t\tJCSystem.beginTransaction();\r\n\t\t\t//@ open valid(); // todo (???)\r\n\t\t\tUtil.arrayCopy(buffer, (short) 0, responseBuffer, (short) 0, (short) 128);\r\n\t\t\t////@ close valid(); // auto\r\n\t\t\tJCSystem.commitTransaction();\r\n\t\t\t\r\n\t\t\t// in case T=0 protocol, send the signature immediately in a\r\n\t\t\t// response APDU\r\n\t\t} else {\r\n\t\t\t// send first 128 bytes (= 1024 bit) of buffer\r\n\t\t\tapdu.setOutgoingAndSend((short) 0, (short) 128);\r\n\t\t}\r\n\t}", "public interface SignatureObject {\n}", "@Test\n public void testValidSig() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1 with Bob's kp, which is incorrect\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n\n // Sign for tx1 with Alice's kp, which is now correct\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig2);\n tx1.finalize();\n\n assertTrue(txHandler.isValidTx(tx1));\n }", "com.google.protobuf.ByteString getArtifactSignature();", "public Signer getPDFSigner();", "public abstract String getSigAlgOID();", "public static void main(String[] args) {\n\n\t\tif (args.length != 5) {\n\t\t System.out.println(\"Usage: GenSig nameOfFileToSign keystore password sign publicKey\");\n\n\t\t }\n\t\telse try{\n\n\t\t KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t ks.load(new FileInputStream(args[1]), args[2].toCharArray());\n\t\t \n\t\t String alias = (String)ks.aliases().nextElement();\n\t\t PrivateKey privateKey = (PrivateKey) ks.getKey(alias, args[2].toCharArray());\n\n\t\t Certificate cert = ks.getCertificate(alias);\n\n\t\t // Get public key\t\n\t\t PublicKey publicKey = cert.getPublicKey();\n\n\t\t /* Create a Signature object and initialize it with the private key */\n\n\t\t Signature rsa = Signature.getInstance(\"SHA256withRSA\");\t\n\t\n\n\t\t rsa.initSign(privateKey);\n\n\t\t /* Update and sign the data */\n\n \t String hexString = readFile(args[0]).trim();\n\t\t byte[] decodedBytes = DatatypeConverter.parseHexBinary(hexString);\t\n\t\t InputStream bufin = new ByteArrayInputStream(decodedBytes);\n\n\n\t\t byte[] buffer = new byte[1024];\n\t\t int len;\n\t\t while (bufin.available() != 0) {\n\t\t\tlen = bufin.read(buffer);\n\t\t\trsa.update(buffer, 0, len);\n\t\t };\n\n\t\t bufin.close();\n\n\t\t /* Now that all the data to be signed has been read in, \n\t\t\t generate a signature for it */\n\n\t\t byte[] realSig = rsa.sign();\n\n\t\t \n\t\t /* Save the signature in a file */\n\n\t\t File file = new File(args[3]);\n\t\t PrintWriter out = new PrintWriter(file);\n\n\t\t\t// if file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\n\t\t out.println(DatatypeConverter.printBase64Binary(realSig));\n\t\t out.close();\n\n\n\t\t /* Save the public key in a file */\n\t\t byte[] key = publicKey.getEncoded();\n\t\t FileOutputStream keyfos = new FileOutputStream(args[4]);\n\t\t keyfos.write(key);\n\n\t\t keyfos.close();\n\n\t\t} catch (Exception e) {\n\t\t System.err.println(\"Caught exception \" + e.toString());\n\t\t}\n\n\t}", "com.microsoft.schemas.office.x2006.digsig.STSignatureType xgetSignatureType();", "int getSignatureProviderDetails();", "public Builder setSignatureBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n signature_ = value;\n onChanged();\n return this;\n }", "public Builder setSignatureBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n signature_ = value;\n onChanged();\n return this;\n }", "SignatureSource createSignatureSource();", "public byte[] getSignature()\n {\n return Arrays.clone(signature);\n }", "public Signator.Signers getUsedPDFSignerLibrary();", "String componentSignature();", "void setSignature(String signature) {\n this.signature = signature;\n }", "org.apache.xmlbeans.XmlBase64Binary xgetSignatureImage();", "public io.lightcone.data.types.EdDSASignatureOrBuilder getSigOrBuilder() {\n return getSig();\n }", "BlsPoint sign(BigInteger privateKey, byte[] data);", "public interface SignatureFactory \n{\n /** \n * initializes the implementation class \n */\n public void init()\n throws SignedDocException;\n \n /**\n * Method returns an array of strings representing the \n * list of available token names.\n * @return an array of available token names.\n * @throws SignedDocException if reading the token information fails.\n */\n public String[] getAvailableTokenNames()\n throws SignedDocException;\n \n /**\n * Method returns a digital signature. It finds the RSA private \n * key object from the active token and\n * then signs the given data with this key and RSA mechanism.\n * @param digest digest of the data to be signed.\n * @param token token index\n * @param pin users pin code\n * @return an array of bytes containing digital signature.\n * @throws SignedDocException if signing the data fails.\n */\n public byte[] sign(byte[] digest, int token, String pin) \n throws SignedDocException;\n \n /**\n * Method returns a X.509 certificate object readed \n * from the active token and representing an\n * user public key certificate value.\n * @return X.509 certificate object.\n * @throws SignedDocException if getting X.509 public key certificate \n * fails or the requested certificate type X.509 is not available in \n * the default provider package\n */\n public X509Certificate getCertificate(int token, String pin)\n throws SignedDocException;\n \n /**\n * Resets the previous session\n * and other selected values\n */\n public void reset() \n throws SignedDocException;\n \n\t/**\n\t * Method decrypts the data with the RSA private key\n\t * corresponding to this certificate (which was used\n\t * to encrypt it). Decryption will be done on the card.\n\t * This operation closes the possibly opened previous\n\t * session with signature token and opens a new one with\n\t * authentication token if necessary\n\t * @param data data to be decrypted.\n\t * @param token index of authentication token\n\t * @param pin PIN code\n\t * @return decrypted data.\n\t * @throws SignedDocException for all decryption errors\n\t */\n\tpublic byte[] decrypt(byte[] data, int token, String pin) \n\t\tthrows SignedDocException;\n\t\t\t\t\n}", "public String getSignature() {\n return signature;\n }", "public String getSignature() {\n return signature;\n }", "public String getSignature() {\n return signature;\n }", "public byte[] signData(String fitxer, PrivateKey priv) {\n byte[] signature = null;\n FileInputStream datafis;\n BufferedInputStream bufin = null;\n byte[] buffer = new byte[1024];\n int len;\n \n try {\n Signature signer = Signature.getInstance(\"SHA256withRSA\");\n signer.initSign(priv); //Inicialitzem la firma digital a partirde l’algorisme utilitzat\n \n datafis = new FileInputStream(fitxer);\n bufin = new BufferedInputStream(datafis);\n \n while (bufin.available() != 0) {\n len = bufin.read(buffer);\n signer.update(buffer, 0, len);//Li assignem a l’objecte firma les dades afirmar digitalment\n } \n\n bufin.close();\n signature = signer.sign();//Finalment generem la firma\n } catch (Exception ex) {\n System.err.println(\"Error signant les dades: \" + ex);\n }\n return signature;\n }", "private byte getSignatureType() \r\n \t //@ requires [?f]signatureType |-> ?theSignatureType &*& theSignatureType != null &*& theSignatureType.length == 1 &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(?ta) &*& foreachp(ta, transient_byte_array);\r\n \t //@ ensures [f]signatureType |-> theSignatureType &*& transient_byte_arrays(ta) &*& foreachp(ta, transient_byte_array);\r\n\t{\r\n\t\t//@ transient_byte_arrays_mem(theSignatureType);\r\n\t\t//@ foreachp_remove(theSignatureType, ta);\r\n\t\t//@ open transient_byte_array(theSignatureType);\r\n\t\treturn signatureType[0];\r\n\t\t//@ close transient_byte_array(theSignatureType);\r\n\t\t//@ foreachp_unremove(theSignatureType, ta);\r\n\t}", "public\nSIGRecord(Name name, int dclass, long ttl, int covered, int alg, int origttl,\n\t Date expire, Date timeSigned, int footprint, Name signer,\n\t byte [] signature)\n{\n\tthis(name, dclass, ttl);\n\tType.check(covered);\n\tcheckU8(\"alg\", alg);\n\tcheckU8(\"labels\", labels);\n\tTTL.check(origttl);\n\tcheckU16(\"footprint\", footprint);\n\tthis.covered = covered;\n\tthis.alg = alg;\n\tthis.labels = name.labels();\n\tthis.origttl = origttl;\n\tthis.expire = expire;\n\tthis.timeSigned = timeSigned;\n\tthis.footprint = footprint;\n\tif (!signer.isAbsolute())\n\t\tthrow new RelativeNameException(signer);\n\tthis.signer = signer;\n\tthis.signature = signature;\n}", "ReleaseFile parseWithSignature( InputStream is, InputStream signStream, InputStream keyStream ) throws IOException;", "public void setSignature(String signature) {\n\t\tthis.signature = signature;\n\t}", "Result_SignDecodeErrorZ read_chan_signer(byte[] reader);", "public interface PublicKey {\n\n /**\n * Returns id of the public key.\n *\n * @return id of key\n */\n String getId();\n\n /**\n * Returns ids from gpg sub keys.\n *\n * @return sub key ids\n * @since 2.19.0\n */\n default Set<String> getSubkeys() {\n return Collections.emptySet();\n }\n\n /**\n * Returns the username of the owner or an empty optional.\n *\n * @return owner or empty optional\n */\n Optional<String> getOwner();\n\n /**\n * Returns raw of the public key.\n *\n * @return raw of key\n */\n String getRaw();\n\n /**\n * Returns the contacts of the publickey.\n *\n * @return owner or empty optional\n */\n Set<Person> getContacts();\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param stream stream of data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n boolean verify(InputStream stream, byte[] signature);\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param data data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n default boolean verify(byte[] data, byte[] signature) {\n return verify(new ByteArrayInputStream(data), signature);\n }\n}", "ISModifySignature createISModifySignature();", "@Override\n public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public byte[] sign(byte[] digest, int token, String pin) \n throws SignedDocException;", "boolean readSignature(Integer[] sig) {\n Scales.sendByte((byte) 's');\n\t /* Get actual signature */\n sig[2] = Scales.getByte();\n sig[1] = Scales.getByte();\n sig[0] = Scales.getByte();\n return true;\n }", "public org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder() {\n if (signatureBuilder_ != null) {\n return signatureBuilder_.getMessageOrBuilder();\n } else {\n return signature_ == null ?\n org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance() : signature_;\n }\n }", "private void validateFermatPacketSignature(FermatPacket fermatPacketReceive){\n\n System.out.println(\" WsCommunicationVPNClient - validateFermatPacketSignature\");\n\n /*\n * Validate the signature\n */\n boolean isValid = AsymmectricCryptography.verifyMessageSignature(fermatPacketReceive.getSignature(), fermatPacketReceive.getMessageContent(), vpnServerIdentity);\n\n System.out.println(\" WsCommunicationVPNClient - isValid = \" + isValid);\n\n /*\n * if not valid signature\n */\n if (!isValid){\n throw new RuntimeException(\"Fermat Packet received has not a valid signature, go to close this connection maybe is compromise\");\n }\n\n }", "public String getSignature() {\n\t\treturn signature;\n\t}", "public byte[] generateSignature()\n {\n if (!forSigning)\n {\n throw new IllegalStateException(\"PairingDigestSigner not initialised for signature generation.\");\n }\n\n byte[] hash = new byte[digest.getDigestSize()];\n digest.doFinal(hash, 0);\n\n Element[] sig = pairingSigner.generateSignature(hash);\n\n try {\n return pairingSigner.derEncode(sig);\n } catch (IOException e) {\n throw new IllegalStateException(\"unable to encode signature\");\n }\n }", "public static byte[] SignWithPrivateKey(byte[] buf,PrivateKey pkey) throws Exception{\r\n\t\tSecureRandom secureRandom = new SecureRandom();\r\n\t\tSignature signature = Signature.getInstance(\"SHA1WithECDSA\");\r\n\t\tsignature.initSign(pkey,secureRandom);\r\n\t\tsignature.update(buf);\r\n\t\tbyte[] digitalSignature = signature.sign();\r\n\t\treturn digitalSignature;\r\n\t\t\r\n\t}", "public void setSignature(String Signature) {\n this.Signature = Signature;\n }", "public org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder() {\n return getSignature();\n }", "public ISignature getSignature() {\n return _signature;\n }", "public String getSignature() {\n return this.Signature;\n }", "@SuppressWarnings(\"all\")\n public static void main(String...args) throws Exception {\n FileInputStream pubKFile = new FileInputStream(\"C:\\\\Demo\\\\publicKey\");\n byte[] encKey = new byte[pubKFile.available()];\n pubKFile.read(encKey);\n pubKFile.close();\n\n // 2. decode the public key\n X509EncodedKeySpec spec = new X509EncodedKeySpec(encKey);\n PublicKey publicKey = KeyFactory.getInstance(\"DSA\").generatePublic(spec);\n\n // 3. read the signature\n FileInputStream signatureFile = new FileInputStream(\"C:\\\\Demo\\\\signature\");\n byte[] sigByte = new byte[signatureFile.available()];\n signatureFile.read(sigByte);\n signatureFile.close();\n\n // 4. generate the signature\n Signature signature = Signature.getInstance(\"SHA1withDSA\");\n signature.initVerify(publicKey);\n\n // 5. supply the data\n FileInputStream dataFile = new FileInputStream(\"C:\\\\Demo\\\\code\");\n BufferedInputStream dataStream = new BufferedInputStream(dataFile);\n byte[] tmpBuf = new byte[dataStream.available()];\n int len;\n while ((len = dataStream.read(tmpBuf)) >= 0) {\n signature.update(tmpBuf, 0, len);\n }\n dataStream.close();\n\n // 6. verify\n boolean result = signature.verify(sigByte);\n System.out.println(\"Result:\" + result);\n }", "public static void main(String[] args) {\n\n String pfx = \"E:\\\\PDFFileTest\\\\1.pfx\";\n String tmpPath = \"E:\\\\PDFFileTest\\\\1562570792439.pdf\";\n String expPath = \"E:\\\\PDFFileTest\\\\11.11\\\\h83.pdf\";\n String gif = \"E:\\\\PDFFileTest\\\\1.gif\";\n String password = \"111111\";\n try {\n sign(pfx, tmpPath, expPath, gif, password);\n System.out.println(\"success\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public byte[] sign() throws XMLSignatureException {\n/* 177 */ return this.signatureAlgorithm.engineSign();\n/* */ }", "private void generatePkcs1Md5Signature(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t// receive the data that needs to be signed\r\n\t\tshort byteRead = apdu.setIncomingAndReceive();\r\n\t\t// check Lc\r\n\t\tshort lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);\r\n\t\tif ((lc != 16) || (byteRead != 16))\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\t// use the correct key\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t\r\n\t\tif (getSignatureType() == NON_REPUDIATION) {\t\t\r\n\t\t\tcipher.init((RSAPrivateCrtKey)nonRepKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\tif (getSignatureType() == AUTHENTICATION) {\r\n\t\t\tcipher.init((RSAPrivateCrtKey)authKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t\tJCSystem.beginTransaction();\r\n\t\t\r\n\t\t////@ open valid(); // todo\r\n\t\t\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as);\r\n\t\t//@ foreachp_remove(messageBuffer, as);\r\n\t\t////@ open transient_byte_array(messageBuffer); // auto\r\n\t\t\r\n\t\t// prepare the message buffer to the PKCS#1 (v1.5) structure\r\n\t\t////@ open [1/2]valid();\r\n\t\tpreparePkcs1ClearText(messageBuffer, ALG_MD5_PKCS1, lc);\r\n\t\t// copy the MD5 hash from the APDU to the message buffer\r\n\t\tUtil.arrayCopy(buffer, (short) (ISO7816.OFFSET_CDATA), messageBuffer, (short) (128 - lc), lc);\r\n\r\n\t\t//@ close transient_byte_array(messageBuffer);\r\n\t\t//@ foreachp_unremove(messageBuffer, as);\r\n\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t// generate signature\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as1);\r\n\t\t//@ foreachp_remove(messageBuffer, as1);\r\n\t\t//@ open transient_byte_array(messageBuffer);\r\n\t\tcipher.doFinal(messageBuffer, (short) 0, (short) 128, buffer, (short) 0);\r\n\t\t//@ close transient_byte_array(messageBuffer);\r\n\t\t//@ foreachp_unremove(messageBuffer, as1);\r\n\r\n\t\t////@ close [1/2]valid(); // auto\r\n\r\n\r\n\t}", "boolean hasSig();", "boolean checkSignature(long sig0, long sig1, long sig2) throws Exception {\n Integer[] sig = new Integer[3];\n\t /* Get signature */\n readSignature(sig);\n\t /* Compare signature */\n if (sig[0] != sig0 || sig[1] != sig1 || sig[2] != sig2) {\n throw new Exception(\"Signature does not match selected device! \");\n }\n return true; // Indicate supported command.\n }", "void setSignatureImage(byte[] signatureImage);", "public boolean signRequired() {\n\t\treturn false;\n\t}", "protected byte[] getSignature() {\n return signatureImpl.calculate(content, null);\n }", "dkk mo4509g();", "SignatureSink createSignatureSink();", "@Override\n public byte[] generateSignature() throws CryptoException, DataLengthException {\n if (!forSigning) {\n throw new IllegalStateException(\"CL04 Signer not initialised for signature generation.\");\n }\n\n try {\n CL04SignSecretPairingKeySerParameter sk = (CL04SignSecretPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(sk.getParameters());\n final Element alpha = pairing.getZr().newRandomElement().getImmutable();\n final Element a = sk.getG().powZn(alpha);\n final List<Element> A = sk.getZ().stream().map(a::powZn).collect(Collectors.toCollection(ArrayList::new));\n final Element b = a.powZn(sk.getY()).getImmutable();\n final List<Element> B = A.stream().map(Ai -> Ai.powZn(sk.getY())).collect(Collectors.toCollection(ArrayList::new));\n final Element xTimesY = alpha.mul(sk.getX().mul(sk.getY()));\n final Element c = a.powZn(sk.getX()).mul(commitment.powZn(xTimesY)).getImmutable();\n\n Element[] signElements = new Element[3 + 2 * messages.size()];\n signElements[0] = a;\n signElements[1] = b;\n signElements[2] = c;\n for (int i = 0; i < messages.size(); i++) {\n signElements[3 + i] = A.get(i);\n signElements[3 + messages.size() + i] = B.get(i);\n }\n return derEncode(signElements);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void testDoubleX509SignatureThumb() throws Exception {\n WSSecSignature builder = new WSSecSignature();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n // builder.setUserInfo(\"john\", \"keypass\");\n builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER); \n Document doc = unsignedEnvelope.getAsDocument();\n \n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc);\n\n Document signedDoc = builder.build(doc, crypto, secHeader);\n Document signedDoc1 = builder.build(signedDoc, crypto, secHeader);\n verify(signedDoc1);\n }", "public static byte[] sign(String stringPrivateKey,String plaintext){\r\n\t\ttry {\r\n\t\t\tPKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(Base64.getDecoder().decode(stringPrivateKey));\r\n\t\t\tKeyFactory kf = KeyFactory.getInstance(\"EC\");\r\n\t\t\tPrivateKey privateKey= kf.generatePrivate(privateKeySpec);\r\n\t\t\tSignature sig = Signature.getInstance(\"SHA256withECDSA\");\r\n\t\t\tsig.initSign(privateKey);\r\n\t\t\tsig.update(plaintext.getBytes(\"UTF-8\"));\r\n\t\t\tbyte[] signature = sig.sign();\r\n\t\t\tSystem.out.println(\"Bytes:\"+signature.length);\r\n\t\t\treturn signature;\r\n\t\t} catch (InvalidKeyException | SignatureException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeySpecException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args)\n throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, UnsupportedEncodingException {\n final String text = \"We would like to provide data integrity.\";\n\n /**\n * STEP 1.\n * We create a public-private key pair.\n * Standard Algorithm Names\n * http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html\n */\n final KeyPair key = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n /**\n * Alice creates Signature object defining Signature algorithm.\n */\n final Signature signatureAlg = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We initialize the signature object with\n * - Operation modes (SIGN) and\n * - provides appropriate ***Private*** Key\n */\n signatureAlg.initSign(key.getPrivate());\n\n // Finally, we load the message into the signature object and sign it\n signatureAlg.update(text.getBytes(\"UTF-8\"));\n final byte[] signedText = signatureAlg.sign();\n System.out.println(\"Signature: \" + DatatypeConverter.printHexBinary(signedText));\n\n /**\n * To verify the signature, we create another signature object\n * and specify its algorithm\n */\n final Signature signatureAlg2 = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We have to initialize it with the mode. But to verify the algorithm,\n * we only need the public key of the original signee\n */\n signatureAlg2.initVerify(key.getPublic());\n\n //Finally, we can check whether the signature is valid\n signatureAlg2.update(text.getBytes(\"UTF-8\"));\n\n if (signatureAlg2.verify(signedText))\n System.out.println(\"Valid signature.\");\n else\n System.err.println(\"Invalid signature.\");\n }", "public void affiche3(BigInteger signe){\n System.out.println(\"La signature est :\"+signe);\n }", "com.microsoft.schemas.office.x2006.digsig.STSignatureText xgetSignatureText();" ]
[ "0.73976135", "0.704309", "0.70210266", "0.6921052", "0.6921052", "0.6921052", "0.6833218", "0.68208843", "0.66571474", "0.65837884", "0.6580073", "0.6580073", "0.6549985", "0.65176594", "0.6499652", "0.6490479", "0.64046055", "0.63172966", "0.62898576", "0.6273093", "0.6249798", "0.62436706", "0.62151176", "0.6214869", "0.6214243", "0.6184172", "0.6180248", "0.61655164", "0.6113408", "0.61041343", "0.6092459", "0.6082781", "0.6056683", "0.60500777", "0.5998656", "0.59978396", "0.5959772", "0.593669", "0.59344125", "0.5918469", "0.5916969", "0.5910817", "0.58813316", "0.5864352", "0.58635926", "0.58560973", "0.58560973", "0.58557546", "0.5852426", "0.58436865", "0.5841626", "0.58226836", "0.5803321", "0.5799519", "0.5798923", "0.57931036", "0.57903373", "0.57903373", "0.57903373", "0.5785939", "0.57843107", "0.5747793", "0.5738761", "0.57264227", "0.5724643", "0.5718272", "0.5717422", "0.57154185", "0.57154185", "0.5714451", "0.5714451", "0.5710953", "0.5694987", "0.56920105", "0.5681027", "0.56799185", "0.56781644", "0.5672383", "0.56646734", "0.56491727", "0.5647587", "0.5643544", "0.5643239", "0.5640683", "0.56399196", "0.5639839", "0.5630529", "0.5627866", "0.561977", "0.56098723", "0.56039405", "0.5592808", "0.5580254", "0.55797774", "0.5576713", "0.5566575", "0.5559037", "0.5537511", "0.55128556" ]
0.6307634
19
pkidependent signature optional bytes signature = 5;
com.google.protobuf.ByteString getSignature();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract byte[] getSignature();", "int getSignature ();", "String getSignature();", "String getSignature();", "String getSignature();", "BigInteger getDigitalSignature();", "public abstract String getSignature();", "SignatureIdentification createSignatureIdentification();", "org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder();", "com.google.protobuf.ByteString\n getSignatureBytes();", "com.google.protobuf.ByteString\n getSignatureBytes();", "Signature getSignature();", "org.apache.calcite.avatica.proto.Common.Signature getSignature();", "byte[] getSignatureImage();", "public byte[] getSignature() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getSignature():byte[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getSignature():byte[]\");\n }", "public GpgSignature(@NonNull byte[] signature) {\n\t\tthis.signature = signature;\n\t}", "byte[] generateSignature(byte[] message, PrivateKey privateKey, SecureRandom secureRandom) throws IOException;", "boolean hasSignature();", "boolean hasSignature();", "public byte[] getSigAlgParams() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getSigAlgParams():byte[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getSigAlgParams():byte[]\");\n }", "Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage);", "native String nativeGetSignature(long nativeHandler) throws RuntimeException;", "com.google.protobuf.ByteString getSig();", "SignatureSpi(com.android.org.bouncycastle.crypto.Digest r1, com.android.org.bouncycastle.crypto.DSA r2, com.android.org.bouncycastle.jcajce.provider.asymmetric.util.DSAEncoder r3) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.<init>(com.android.org.bouncycastle.crypto.Digest, com.android.org.bouncycastle.crypto.DSA, com.android.org.bouncycastle.jcajce.provider.asymmetric.util.DSAEncoder):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.<init>(com.android.org.bouncycastle.crypto.Digest, com.android.org.bouncycastle.crypto.DSA, com.android.org.bouncycastle.jcajce.provider.asymmetric.util.DSAEncoder):void\");\n }", "private void setSignature(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n signature_ = value;\n }", "String getUniqueSignature();", "public void setSignature( String pSignature )\r\n {\r\n this.signature = pSignature;\r\n }", "public byte []\ngetSignature() {\n\treturn signature;\n}", "int getSignatureType();", "@Override\n public String buildSignature(RequestDataToSign requestDataToSign, String appKey) {\n // find private key for this app\n final String secretKey = keyStore.getPrivateKey(appKey);\n if (secretKey == null) {\n LOG.error(\"Unknown application key: {}\", appKey);\n throw new PrivateKeyNotFoundException();\n }\n\n // sign\n return super.buildSignature(requestDataToSign, secretKey);\n }", "java.lang.String getSignatureText();", "public boolean verifySignature() {\r\n\t\t\r\n\t\tString data;\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\t\r\n\t\t\tdata = StringUtil.getStringFromKey(creator) + name +\r\n\t\t\t\t\tdescription + begin + end+end_subscription+\r\n\t\t\t\t\tlocation+min_capacity+max_capacity;\r\n\t\t\treturn StringUtil.verifyECDSASig(creator, data, signature);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdata = StringUtil.getStringFromKey(subscriber)+id_event;\r\n\t\t\treturn StringUtil.verifyECDSASig(subscriber, data, signature);\r\n\t\t}\r\n//\t\tSystem.out.println(\"signature \"+signature);\r\n\t\t\r\n\t}", "public static native String getSignature(long[] msgArgs);", "@Override\n public boolean verifySignature(byte[] signature) {\n try {\n Element[] sig = derDecode(signature);\n CL04SignPublicPairingKeySerParameter pk = (CL04SignPublicPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(pairingKeySerParameter.getParameters());\n Element a = sig[0];\n Element b = sig[1];\n Element c = sig[2];\n List<Element> A = IntStream.range(3, 3 + messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n List<Element> B = IntStream.range(3 + messages.size(), 3 + 2 * messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n return aFormedCorrectly(pairing, a, A, pk) && bFormedCorrectly(pairing, a, b, A, B, pk) && cFormedCorrectly(pairing, a, b, c, B, pk);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return false;\n\n }", "public String getSignature()\r\n {\r\n return signature;\r\n }", "public boolean isSignatureRequired() {\n\t\treturn false;\n\t}", "boolean verifySignature(byte[] message, byte[] signature, PublicKey publicKey) throws IOException;", "private void generateSignature(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t/*\r\n\t\t * IMPORTANT: in all other APDUs the previous APDU type gets overwritten\r\n\t\t * in process() function; this is not the case here because the\r\n\t\t * information is needed when processing to verify the security\r\n\t\t * condition for non repudiation signature\r\n\t\t * \r\n\t\t * the previous APDU type has to be overwritten in every possible exit\r\n\t\t * path out of this function; therefore we check the security conditions\r\n\t\t * of the non repudiation signature as early as possible, but we have to\r\n\t\t * overwrite the previous APDU type in the 2 possible exceptions before\r\n\t\t */\r\n\t\tJCSystem.beginTransaction();\r\n\t\t////@ open valid(); // auto\r\n\t\t// check P1 and P2\t\t\r\n\t\tif (buffer[ISO7816.OFFSET_P1] != (byte) 0x9E || buffer[ISO7816.OFFSET_P2] != (byte) 0x9A) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t}\r\n\t\t// generate signature without prepare signature results:\r\n\t\t// \"conditions of use not satisfied\"\r\n\t\tif (getSignatureType() == NO_SIGNATURE) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t\t}\r\n\t\t/*\r\n\t\t * verify authentication information throw\r\n\t\t * \"security condition not satisfied\" if something is wrong\r\n\t\t */\r\n\t\t// check if previous APDU did a cardholder PIN verification\r\n\t\tif ((getSignatureType() == NON_REPUDIATION) && (getPreviousApduType() != VERIFY_CARDHOLDER_PIN)) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t}\r\n\t\t// overwrite previous ADPU type as soon as possible\r\n\t\tsetPreviousApduType(OTHER);\r\n\r\n\t\t// it is impossible to generate basic signatures with this command\r\n\t\tif (getSignatureType() == BASIC)\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// check if cardholder PIN was entered correctly\r\n\t\tif (!cardholderPin.isValidated())\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\tswitch (signatureAlgorithm) {\r\n\t\tcase ALG_MD5_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Md5Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\tcase ALG_SHA1_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Sha1Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\tcase ALG_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t\t// if T=1, store signature in sigBuffer so that it can latter be sent\r\n\t\tif (APDU.getProtocol() == APDU.PROTOCOL_T1) {\r\n\t\t\tJCSystem.beginTransaction();\r\n\t\t\t//@ open valid(); // todo (???)\r\n\t\t\tUtil.arrayCopy(buffer, (short) 0, responseBuffer, (short) 0, (short) 128);\r\n\t\t\t////@ close valid(); // auto\r\n\t\t\tJCSystem.commitTransaction();\r\n\t\t\t\r\n\t\t\t// in case T=0 protocol, send the signature immediately in a\r\n\t\t\t// response APDU\r\n\t\t} else {\r\n\t\t\t// send first 128 bytes (= 1024 bit) of buffer\r\n\t\t\tapdu.setOutgoingAndSend((short) 0, (short) 128);\r\n\t\t}\r\n\t}", "public interface SignatureObject {\n}", "@Test\n public void testValidSig() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1 with Bob's kp, which is incorrect\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n\n // Sign for tx1 with Alice's kp, which is now correct\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig2);\n tx1.finalize();\n\n assertTrue(txHandler.isValidTx(tx1));\n }", "com.google.protobuf.ByteString getArtifactSignature();", "public Signer getPDFSigner();", "public abstract String getSigAlgOID();", "public static void main(String[] args) {\n\n\t\tif (args.length != 5) {\n\t\t System.out.println(\"Usage: GenSig nameOfFileToSign keystore password sign publicKey\");\n\n\t\t }\n\t\telse try{\n\n\t\t KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t ks.load(new FileInputStream(args[1]), args[2].toCharArray());\n\t\t \n\t\t String alias = (String)ks.aliases().nextElement();\n\t\t PrivateKey privateKey = (PrivateKey) ks.getKey(alias, args[2].toCharArray());\n\n\t\t Certificate cert = ks.getCertificate(alias);\n\n\t\t // Get public key\t\n\t\t PublicKey publicKey = cert.getPublicKey();\n\n\t\t /* Create a Signature object and initialize it with the private key */\n\n\t\t Signature rsa = Signature.getInstance(\"SHA256withRSA\");\t\n\t\n\n\t\t rsa.initSign(privateKey);\n\n\t\t /* Update and sign the data */\n\n \t String hexString = readFile(args[0]).trim();\n\t\t byte[] decodedBytes = DatatypeConverter.parseHexBinary(hexString);\t\n\t\t InputStream bufin = new ByteArrayInputStream(decodedBytes);\n\n\n\t\t byte[] buffer = new byte[1024];\n\t\t int len;\n\t\t while (bufin.available() != 0) {\n\t\t\tlen = bufin.read(buffer);\n\t\t\trsa.update(buffer, 0, len);\n\t\t };\n\n\t\t bufin.close();\n\n\t\t /* Now that all the data to be signed has been read in, \n\t\t\t generate a signature for it */\n\n\t\t byte[] realSig = rsa.sign();\n\n\t\t \n\t\t /* Save the signature in a file */\n\n\t\t File file = new File(args[3]);\n\t\t PrintWriter out = new PrintWriter(file);\n\n\t\t\t// if file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\n\t\t out.println(DatatypeConverter.printBase64Binary(realSig));\n\t\t out.close();\n\n\n\t\t /* Save the public key in a file */\n\t\t byte[] key = publicKey.getEncoded();\n\t\t FileOutputStream keyfos = new FileOutputStream(args[4]);\n\t\t keyfos.write(key);\n\n\t\t keyfos.close();\n\n\t\t} catch (Exception e) {\n\t\t System.err.println(\"Caught exception \" + e.toString());\n\t\t}\n\n\t}", "com.microsoft.schemas.office.x2006.digsig.STSignatureType xgetSignatureType();", "int getSignatureProviderDetails();", "public Builder setSignatureBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n signature_ = value;\n onChanged();\n return this;\n }", "public Builder setSignatureBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n signature_ = value;\n onChanged();\n return this;\n }", "SignatureSource createSignatureSource();", "public byte[] getSignature()\n {\n return Arrays.clone(signature);\n }", "public Signator.Signers getUsedPDFSignerLibrary();", "String componentSignature();", "void setSignature(String signature) {\n this.signature = signature;\n }", "org.apache.xmlbeans.XmlBase64Binary xgetSignatureImage();", "public io.lightcone.data.types.EdDSASignatureOrBuilder getSigOrBuilder() {\n return getSig();\n }", "BlsPoint sign(BigInteger privateKey, byte[] data);", "public interface SignatureFactory \n{\n /** \n * initializes the implementation class \n */\n public void init()\n throws SignedDocException;\n \n /**\n * Method returns an array of strings representing the \n * list of available token names.\n * @return an array of available token names.\n * @throws SignedDocException if reading the token information fails.\n */\n public String[] getAvailableTokenNames()\n throws SignedDocException;\n \n /**\n * Method returns a digital signature. It finds the RSA private \n * key object from the active token and\n * then signs the given data with this key and RSA mechanism.\n * @param digest digest of the data to be signed.\n * @param token token index\n * @param pin users pin code\n * @return an array of bytes containing digital signature.\n * @throws SignedDocException if signing the data fails.\n */\n public byte[] sign(byte[] digest, int token, String pin) \n throws SignedDocException;\n \n /**\n * Method returns a X.509 certificate object readed \n * from the active token and representing an\n * user public key certificate value.\n * @return X.509 certificate object.\n * @throws SignedDocException if getting X.509 public key certificate \n * fails or the requested certificate type X.509 is not available in \n * the default provider package\n */\n public X509Certificate getCertificate(int token, String pin)\n throws SignedDocException;\n \n /**\n * Resets the previous session\n * and other selected values\n */\n public void reset() \n throws SignedDocException;\n \n\t/**\n\t * Method decrypts the data with the RSA private key\n\t * corresponding to this certificate (which was used\n\t * to encrypt it). Decryption will be done on the card.\n\t * This operation closes the possibly opened previous\n\t * session with signature token and opens a new one with\n\t * authentication token if necessary\n\t * @param data data to be decrypted.\n\t * @param token index of authentication token\n\t * @param pin PIN code\n\t * @return decrypted data.\n\t * @throws SignedDocException for all decryption errors\n\t */\n\tpublic byte[] decrypt(byte[] data, int token, String pin) \n\t\tthrows SignedDocException;\n\t\t\t\t\n}", "public String getSignature() {\n return signature;\n }", "public String getSignature() {\n return signature;\n }", "public String getSignature() {\n return signature;\n }", "public byte[] signData(String fitxer, PrivateKey priv) {\n byte[] signature = null;\n FileInputStream datafis;\n BufferedInputStream bufin = null;\n byte[] buffer = new byte[1024];\n int len;\n \n try {\n Signature signer = Signature.getInstance(\"SHA256withRSA\");\n signer.initSign(priv); //Inicialitzem la firma digital a partirde l’algorisme utilitzat\n \n datafis = new FileInputStream(fitxer);\n bufin = new BufferedInputStream(datafis);\n \n while (bufin.available() != 0) {\n len = bufin.read(buffer);\n signer.update(buffer, 0, len);//Li assignem a l’objecte firma les dades afirmar digitalment\n } \n\n bufin.close();\n signature = signer.sign();//Finalment generem la firma\n } catch (Exception ex) {\n System.err.println(\"Error signant les dades: \" + ex);\n }\n return signature;\n }", "private byte getSignatureType() \r\n \t //@ requires [?f]signatureType |-> ?theSignatureType &*& theSignatureType != null &*& theSignatureType.length == 1 &*& is_transient_byte_array(theSignatureType) == true &*& transient_byte_arrays(?ta) &*& foreachp(ta, transient_byte_array);\r\n \t //@ ensures [f]signatureType |-> theSignatureType &*& transient_byte_arrays(ta) &*& foreachp(ta, transient_byte_array);\r\n\t{\r\n\t\t//@ transient_byte_arrays_mem(theSignatureType);\r\n\t\t//@ foreachp_remove(theSignatureType, ta);\r\n\t\t//@ open transient_byte_array(theSignatureType);\r\n\t\treturn signatureType[0];\r\n\t\t//@ close transient_byte_array(theSignatureType);\r\n\t\t//@ foreachp_unremove(theSignatureType, ta);\r\n\t}", "public\nSIGRecord(Name name, int dclass, long ttl, int covered, int alg, int origttl,\n\t Date expire, Date timeSigned, int footprint, Name signer,\n\t byte [] signature)\n{\n\tthis(name, dclass, ttl);\n\tType.check(covered);\n\tcheckU8(\"alg\", alg);\n\tcheckU8(\"labels\", labels);\n\tTTL.check(origttl);\n\tcheckU16(\"footprint\", footprint);\n\tthis.covered = covered;\n\tthis.alg = alg;\n\tthis.labels = name.labels();\n\tthis.origttl = origttl;\n\tthis.expire = expire;\n\tthis.timeSigned = timeSigned;\n\tthis.footprint = footprint;\n\tif (!signer.isAbsolute())\n\t\tthrow new RelativeNameException(signer);\n\tthis.signer = signer;\n\tthis.signature = signature;\n}", "ReleaseFile parseWithSignature( InputStream is, InputStream signStream, InputStream keyStream ) throws IOException;", "public void setSignature(String signature) {\n\t\tthis.signature = signature;\n\t}", "Result_SignDecodeErrorZ read_chan_signer(byte[] reader);", "public interface PublicKey {\n\n /**\n * Returns id of the public key.\n *\n * @return id of key\n */\n String getId();\n\n /**\n * Returns ids from gpg sub keys.\n *\n * @return sub key ids\n * @since 2.19.0\n */\n default Set<String> getSubkeys() {\n return Collections.emptySet();\n }\n\n /**\n * Returns the username of the owner or an empty optional.\n *\n * @return owner or empty optional\n */\n Optional<String> getOwner();\n\n /**\n * Returns raw of the public key.\n *\n * @return raw of key\n */\n String getRaw();\n\n /**\n * Returns the contacts of the publickey.\n *\n * @return owner or empty optional\n */\n Set<Person> getContacts();\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param stream stream of data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n boolean verify(InputStream stream, byte[] signature);\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param data data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n default boolean verify(byte[] data, byte[] signature) {\n return verify(new ByteArrayInputStream(data), signature);\n }\n}", "ISModifySignature createISModifySignature();", "@Override\n public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public byte[] sign(byte[] digest, int token, String pin) \n throws SignedDocException;", "boolean readSignature(Integer[] sig) {\n Scales.sendByte((byte) 's');\n\t /* Get actual signature */\n sig[2] = Scales.getByte();\n sig[1] = Scales.getByte();\n sig[0] = Scales.getByte();\n return true;\n }", "public org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder() {\n if (signatureBuilder_ != null) {\n return signatureBuilder_.getMessageOrBuilder();\n } else {\n return signature_ == null ?\n org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance() : signature_;\n }\n }", "private void validateFermatPacketSignature(FermatPacket fermatPacketReceive){\n\n System.out.println(\" WsCommunicationVPNClient - validateFermatPacketSignature\");\n\n /*\n * Validate the signature\n */\n boolean isValid = AsymmectricCryptography.verifyMessageSignature(fermatPacketReceive.getSignature(), fermatPacketReceive.getMessageContent(), vpnServerIdentity);\n\n System.out.println(\" WsCommunicationVPNClient - isValid = \" + isValid);\n\n /*\n * if not valid signature\n */\n if (!isValid){\n throw new RuntimeException(\"Fermat Packet received has not a valid signature, go to close this connection maybe is compromise\");\n }\n\n }", "public String getSignature() {\n\t\treturn signature;\n\t}", "public byte[] generateSignature()\n {\n if (!forSigning)\n {\n throw new IllegalStateException(\"PairingDigestSigner not initialised for signature generation.\");\n }\n\n byte[] hash = new byte[digest.getDigestSize()];\n digest.doFinal(hash, 0);\n\n Element[] sig = pairingSigner.generateSignature(hash);\n\n try {\n return pairingSigner.derEncode(sig);\n } catch (IOException e) {\n throw new IllegalStateException(\"unable to encode signature\");\n }\n }", "public static byte[] SignWithPrivateKey(byte[] buf,PrivateKey pkey) throws Exception{\r\n\t\tSecureRandom secureRandom = new SecureRandom();\r\n\t\tSignature signature = Signature.getInstance(\"SHA1WithECDSA\");\r\n\t\tsignature.initSign(pkey,secureRandom);\r\n\t\tsignature.update(buf);\r\n\t\tbyte[] digitalSignature = signature.sign();\r\n\t\treturn digitalSignature;\r\n\t\t\r\n\t}", "public void setSignature(String Signature) {\n this.Signature = Signature;\n }", "public org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder() {\n return getSignature();\n }", "public ISignature getSignature() {\n return _signature;\n }", "public String getSignature() {\n return this.Signature;\n }", "@SuppressWarnings(\"all\")\n public static void main(String...args) throws Exception {\n FileInputStream pubKFile = new FileInputStream(\"C:\\\\Demo\\\\publicKey\");\n byte[] encKey = new byte[pubKFile.available()];\n pubKFile.read(encKey);\n pubKFile.close();\n\n // 2. decode the public key\n X509EncodedKeySpec spec = new X509EncodedKeySpec(encKey);\n PublicKey publicKey = KeyFactory.getInstance(\"DSA\").generatePublic(spec);\n\n // 3. read the signature\n FileInputStream signatureFile = new FileInputStream(\"C:\\\\Demo\\\\signature\");\n byte[] sigByte = new byte[signatureFile.available()];\n signatureFile.read(sigByte);\n signatureFile.close();\n\n // 4. generate the signature\n Signature signature = Signature.getInstance(\"SHA1withDSA\");\n signature.initVerify(publicKey);\n\n // 5. supply the data\n FileInputStream dataFile = new FileInputStream(\"C:\\\\Demo\\\\code\");\n BufferedInputStream dataStream = new BufferedInputStream(dataFile);\n byte[] tmpBuf = new byte[dataStream.available()];\n int len;\n while ((len = dataStream.read(tmpBuf)) >= 0) {\n signature.update(tmpBuf, 0, len);\n }\n dataStream.close();\n\n // 6. verify\n boolean result = signature.verify(sigByte);\n System.out.println(\"Result:\" + result);\n }", "public static void main(String[] args) {\n\n String pfx = \"E:\\\\PDFFileTest\\\\1.pfx\";\n String tmpPath = \"E:\\\\PDFFileTest\\\\1562570792439.pdf\";\n String expPath = \"E:\\\\PDFFileTest\\\\11.11\\\\h83.pdf\";\n String gif = \"E:\\\\PDFFileTest\\\\1.gif\";\n String password = \"111111\";\n try {\n sign(pfx, tmpPath, expPath, gif, password);\n System.out.println(\"success\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public byte[] sign() throws XMLSignatureException {\n/* 177 */ return this.signatureAlgorithm.engineSign();\n/* */ }", "private void generatePkcs1Md5Signature(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t// receive the data that needs to be signed\r\n\t\tshort byteRead = apdu.setIncomingAndReceive();\r\n\t\t// check Lc\r\n\t\tshort lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);\r\n\t\tif ((lc != 16) || (byteRead != 16))\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\t// use the correct key\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t\r\n\t\tif (getSignatureType() == NON_REPUDIATION) {\t\t\r\n\t\t\tcipher.init((RSAPrivateCrtKey)nonRepKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\tif (getSignatureType() == AUTHENTICATION) {\r\n\t\t\tcipher.init((RSAPrivateCrtKey)authKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t}\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t\tJCSystem.beginTransaction();\r\n\t\t\r\n\t\t////@ open valid(); // todo\r\n\t\t\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as);\r\n\t\t//@ foreachp_remove(messageBuffer, as);\r\n\t\t////@ open transient_byte_array(messageBuffer); // auto\r\n\t\t\r\n\t\t// prepare the message buffer to the PKCS#1 (v1.5) structure\r\n\t\t////@ open [1/2]valid();\r\n\t\tpreparePkcs1ClearText(messageBuffer, ALG_MD5_PKCS1, lc);\r\n\t\t// copy the MD5 hash from the APDU to the message buffer\r\n\t\tUtil.arrayCopy(buffer, (short) (ISO7816.OFFSET_CDATA), messageBuffer, (short) (128 - lc), lc);\r\n\r\n\t\t//@ close transient_byte_array(messageBuffer);\r\n\t\t//@ foreachp_unremove(messageBuffer, as);\r\n\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t// generate signature\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as1);\r\n\t\t//@ foreachp_remove(messageBuffer, as1);\r\n\t\t//@ open transient_byte_array(messageBuffer);\r\n\t\tcipher.doFinal(messageBuffer, (short) 0, (short) 128, buffer, (short) 0);\r\n\t\t//@ close transient_byte_array(messageBuffer);\r\n\t\t//@ foreachp_unremove(messageBuffer, as1);\r\n\r\n\t\t////@ close [1/2]valid(); // auto\r\n\r\n\r\n\t}", "boolean hasSig();", "boolean checkSignature(long sig0, long sig1, long sig2) throws Exception {\n Integer[] sig = new Integer[3];\n\t /* Get signature */\n readSignature(sig);\n\t /* Compare signature */\n if (sig[0] != sig0 || sig[1] != sig1 || sig[2] != sig2) {\n throw new Exception(\"Signature does not match selected device! \");\n }\n return true; // Indicate supported command.\n }", "void setSignatureImage(byte[] signatureImage);", "public boolean signRequired() {\n\t\treturn false;\n\t}", "protected byte[] getSignature() {\n return signatureImpl.calculate(content, null);\n }", "dkk mo4509g();", "SignatureSink createSignatureSink();", "@Override\n public byte[] generateSignature() throws CryptoException, DataLengthException {\n if (!forSigning) {\n throw new IllegalStateException(\"CL04 Signer not initialised for signature generation.\");\n }\n\n try {\n CL04SignSecretPairingKeySerParameter sk = (CL04SignSecretPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(sk.getParameters());\n final Element alpha = pairing.getZr().newRandomElement().getImmutable();\n final Element a = sk.getG().powZn(alpha);\n final List<Element> A = sk.getZ().stream().map(a::powZn).collect(Collectors.toCollection(ArrayList::new));\n final Element b = a.powZn(sk.getY()).getImmutable();\n final List<Element> B = A.stream().map(Ai -> Ai.powZn(sk.getY())).collect(Collectors.toCollection(ArrayList::new));\n final Element xTimesY = alpha.mul(sk.getX().mul(sk.getY()));\n final Element c = a.powZn(sk.getX()).mul(commitment.powZn(xTimesY)).getImmutable();\n\n Element[] signElements = new Element[3 + 2 * messages.size()];\n signElements[0] = a;\n signElements[1] = b;\n signElements[2] = c;\n for (int i = 0; i < messages.size(); i++) {\n signElements[3 + i] = A.get(i);\n signElements[3 + messages.size() + i] = B.get(i);\n }\n return derEncode(signElements);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void testDoubleX509SignatureThumb() throws Exception {\n WSSecSignature builder = new WSSecSignature();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n // builder.setUserInfo(\"john\", \"keypass\");\n builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER); \n Document doc = unsignedEnvelope.getAsDocument();\n \n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc);\n\n Document signedDoc = builder.build(doc, crypto, secHeader);\n Document signedDoc1 = builder.build(signedDoc, crypto, secHeader);\n verify(signedDoc1);\n }", "public static byte[] sign(String stringPrivateKey,String plaintext){\r\n\t\ttry {\r\n\t\t\tPKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(Base64.getDecoder().decode(stringPrivateKey));\r\n\t\t\tKeyFactory kf = KeyFactory.getInstance(\"EC\");\r\n\t\t\tPrivateKey privateKey= kf.generatePrivate(privateKeySpec);\r\n\t\t\tSignature sig = Signature.getInstance(\"SHA256withECDSA\");\r\n\t\t\tsig.initSign(privateKey);\r\n\t\t\tsig.update(plaintext.getBytes(\"UTF-8\"));\r\n\t\t\tbyte[] signature = sig.sign();\r\n\t\t\tSystem.out.println(\"Bytes:\"+signature.length);\r\n\t\t\treturn signature;\r\n\t\t} catch (InvalidKeyException | SignatureException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeySpecException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args)\n throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, UnsupportedEncodingException {\n final String text = \"We would like to provide data integrity.\";\n\n /**\n * STEP 1.\n * We create a public-private key pair.\n * Standard Algorithm Names\n * http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html\n */\n final KeyPair key = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n /**\n * Alice creates Signature object defining Signature algorithm.\n */\n final Signature signatureAlg = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We initialize the signature object with\n * - Operation modes (SIGN) and\n * - provides appropriate ***Private*** Key\n */\n signatureAlg.initSign(key.getPrivate());\n\n // Finally, we load the message into the signature object and sign it\n signatureAlg.update(text.getBytes(\"UTF-8\"));\n final byte[] signedText = signatureAlg.sign();\n System.out.println(\"Signature: \" + DatatypeConverter.printHexBinary(signedText));\n\n /**\n * To verify the signature, we create another signature object\n * and specify its algorithm\n */\n final Signature signatureAlg2 = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We have to initialize it with the mode. But to verify the algorithm,\n * we only need the public key of the original signee\n */\n signatureAlg2.initVerify(key.getPublic());\n\n //Finally, we can check whether the signature is valid\n signatureAlg2.update(text.getBytes(\"UTF-8\"));\n\n if (signatureAlg2.verify(signedText))\n System.out.println(\"Valid signature.\");\n else\n System.err.println(\"Invalid signature.\");\n }", "public void affiche3(BigInteger signe){\n System.out.println(\"La signature est :\"+signe);\n }", "com.microsoft.schemas.office.x2006.digsig.STSignatureText xgetSignatureText();" ]
[ "0.73976135", "0.70210266", "0.6921052", "0.6921052", "0.6921052", "0.6833218", "0.68208843", "0.66571474", "0.65837884", "0.6580073", "0.6580073", "0.6549985", "0.65176594", "0.6499652", "0.6490479", "0.64046055", "0.63172966", "0.6307634", "0.6307634", "0.62898576", "0.6273093", "0.6249798", "0.62436706", "0.62151176", "0.6214869", "0.6214243", "0.6184172", "0.6180248", "0.61655164", "0.6113408", "0.61041343", "0.6092459", "0.6082781", "0.6056683", "0.60500777", "0.5998656", "0.59978396", "0.5959772", "0.593669", "0.59344125", "0.5918469", "0.5916969", "0.5910817", "0.58813316", "0.5864352", "0.58635926", "0.58560973", "0.58560973", "0.58557546", "0.5852426", "0.58436865", "0.5841626", "0.58226836", "0.5803321", "0.5799519", "0.5798923", "0.57931036", "0.57903373", "0.57903373", "0.57903373", "0.5785939", "0.57843107", "0.5747793", "0.5738761", "0.57264227", "0.5724643", "0.5718272", "0.5717422", "0.57154185", "0.57154185", "0.5714451", "0.5714451", "0.5710953", "0.5694987", "0.56920105", "0.5681027", "0.56799185", "0.56781644", "0.5672383", "0.56646734", "0.56491727", "0.5647587", "0.5643544", "0.5643239", "0.5640683", "0.56399196", "0.5639839", "0.5630529", "0.5627866", "0.561977", "0.56098723", "0.56039405", "0.5592808", "0.5580254", "0.55797774", "0.5576713", "0.5566575", "0.5559037", "0.5537511", "0.55128556" ]
0.704309
1