@zkp2p/providers 2.0.0-rc1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/providers.json +1 -4
- package/mercadopago/transfer_mercado_pago.json +0 -120
package/package.json
CHANGED
package/providers.json
CHANGED
|
@@ -6,10 +6,7 @@
|
|
|
6
6
|
{ "id": "citi", "files": ["citi/transfer_zelle.json"] },
|
|
7
7
|
{ "id": "idfc", "files": ["idfc/transfer_idfc.json"] },
|
|
8
8
|
{ "id": "luxon", "files": ["luxon/transfer_luxon.json"] },
|
|
9
|
-
{ "id": "mercadopago", "files": [
|
|
10
|
-
"mercadopago/transfer_mercado_pago.json",
|
|
11
|
-
"mercadopago/transfer_mercadopago.json"
|
|
12
|
-
] },
|
|
9
|
+
{ "id": "mercadopago", "files": ["mercadopago/transfer_mercadopago.json"] },
|
|
13
10
|
{ "id": "monzo", "files": ["monzo/transfer_monzo.json"] },
|
|
14
11
|
{ "id": "paypal", "files": ["paypal/transfer_paypal.json"] },
|
|
15
12
|
{ "id": "revolut", "files": ["revolut/transfer_revolut.json"] },
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"actionType": "transfer_mercado_pago",
|
|
3
|
-
"authLink": "https://www.mercadopago.com.ar/home",
|
|
4
|
-
"url": "https://www.mercadopago.com.ar/activities/detail/{{PAYMENT_ID}}?from={{URL_PARAMS_FROM}}",
|
|
5
|
-
"method": "GET",
|
|
6
|
-
"body": "",
|
|
7
|
-
"metadata": {
|
|
8
|
-
"platform": "mercadopago",
|
|
9
|
-
"urlRegex": "https://www.mercadopago.com.ar/home",
|
|
10
|
-
"method": "GET",
|
|
11
|
-
"fallbackUrlRegex": "",
|
|
12
|
-
"fallbackMethod": "",
|
|
13
|
-
"preprocessRegex": "<script\\s+[^>]*id=[\"']__PRELOADED_STATE__[\"'][^>]*>([\\s\\S]*?)</script>",
|
|
14
|
-
"transactionsExtraction": {
|
|
15
|
-
"transactionJsonPathListSelector": "$.pageState.mpHome.result.sections.activities.content.activities_container.results",
|
|
16
|
-
"transactionJsonPathSelectors": {
|
|
17
|
-
"recipient": "$.title",
|
|
18
|
-
"amount": "$.amount.fraction",
|
|
19
|
-
"date": "$.creationDate",
|
|
20
|
-
"paymentId": "$.id",
|
|
21
|
-
"currency": "$.amount.currency_id"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"proofMetadataSelectors": [
|
|
25
|
-
{
|
|
26
|
-
"type": "jsonPath",
|
|
27
|
-
"value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].title"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"type": "jsonPath",
|
|
31
|
-
"value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].amount.fraction"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"type": "jsonPath",
|
|
35
|
-
"value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].id"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
"paramNames": [
|
|
40
|
-
"PAYMENT_ID",
|
|
41
|
-
"URL_PARAMS_FROM"
|
|
42
|
-
],
|
|
43
|
-
"paramSelectors": [
|
|
44
|
-
{
|
|
45
|
-
"type": "jsonPath",
|
|
46
|
-
"value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].id"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"type": "regex",
|
|
50
|
-
"value": "(mp-home)"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"skipRequestHeaders": [
|
|
54
|
-
"Cookie",
|
|
55
|
-
"Accept-Encoding"
|
|
56
|
-
],
|
|
57
|
-
"secretHeaders": [
|
|
58
|
-
"Cookie"
|
|
59
|
-
],
|
|
60
|
-
"responseMatches": [
|
|
61
|
-
{
|
|
62
|
-
"type": "regex",
|
|
63
|
-
"value": "v2__detail\">(.*?)CVU: (?<recipientId>[0-9]+)</li>"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"type": "regex",
|
|
67
|
-
"value": "<span class=\"andes-money-amount__fraction\" aria-hidden=\"true\">(?<amt>[0-9.]+)</span><span aria-hidden=\"true\">,</span><span class=\"andes-money-amount__cents\" aria-hidden=\"true\">(?<cents>[0-9]+)</span>"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "regex",
|
|
71
|
-
"value": "Total\",\"amount\":{\"currency_id\":\"(?<curr>[^\"]+)\""
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "regex",
|
|
75
|
-
"value": ",\"date\":\"(?<date>[^\"]+)\",\"sections\""
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"type": "regex",
|
|
79
|
-
"value": "\"operationId\":(?<paymentId>[^,]+),\"activityName\":\"(?<paymentType>[^\"]+)\",\"activityStatus\":\"(?<paymentStatus>[^\"]+)\","
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
"responseRedactions": [
|
|
83
|
-
{
|
|
84
|
-
"jsonPath": "",
|
|
85
|
-
"xPath": "",
|
|
86
|
-
"regex": "v2__detail\">(.*?)CVU: (.*?)</li>"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"jsonPath": "",
|
|
90
|
-
"xPath": "",
|
|
91
|
-
"regex": "<span class=\"andes-money-amount__fraction\" aria-hidden=\"true\">(.*?)<\/span><span aria-hidden=\"true\">,<\/span><span class=\"andes-money-amount__cents\" aria-hidden=\"true\">(.*?)<\/span>"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"jsonPath": "",
|
|
95
|
-
"xPath": "",
|
|
96
|
-
"regex": "\"Total\",\"amount\":{\"currency_id\":\"(.*?)\""
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"jsonPath": "",
|
|
100
|
-
"xPath": "",
|
|
101
|
-
"regex": ",\"date\":\"(.*)\",\"sections\""
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"jsonPath": "",
|
|
105
|
-
"xPath": "",
|
|
106
|
-
"regex": "\"operationId\":(.*?),\"activityName\":\"(.*?)\",\"activityStatus\":\"(.*?),"
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"mobile": {
|
|
110
|
-
"includeAdditionalCookieDomains": [
|
|
111
|
-
"mercadolibre.com",
|
|
112
|
-
"www.mercadolibre.com"
|
|
113
|
-
],
|
|
114
|
-
"internal": {
|
|
115
|
-
"actionLink": "https://www.mercadopago.com.ar/money-out/transfer/",
|
|
116
|
-
"actionCompletedUrlRegex": "https://www.mercadopago.com.ar/money-out/transfer/congrats\\?data=\\S+",
|
|
117
|
-
"injectedJavaScript": "(function(){const style=document.createElement('style');style.textContent='.zkp2p-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:24px;height:24px;background:#007AFF;border-radius:4px;cursor:pointer;z-index:9999;display:flex;align-items:center;justify-content:center;color:white;font-weight:bold;font-size:12px;}.zkp2p-dropdown{position:absolute;background:#FFF;border:1px solid #E0E0E0;border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,0.15);z-index:99999;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;font-size:14px;color:#333;width:auto;min-width:250px;}.zkp2p-dropdown-item{padding:12px 16px;cursor:pointer;}.zkp2p-dropdown-item:hover{background:#F5F5F5;}.zkp2p-dropdown-item:active{background:#E8E8E8;}.zkp2p-dropdown-label{color:#666;font-size:12px;margin-bottom:4px;}.zkp2p-dropdown-value{font-weight:500;color:#333;font-size:16px;}.zkp2p-toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#333;color:white;padding:10px 20px;border-radius:6px;z-index:999999;font-family:system-ui;}';document.head.appendChild(style);const copyToClipboard=function(text){const textArea=document.createElement('textarea');textArea.value=text;textArea.style.position='fixed';textArea.style.top='-9999px';document.body.appendChild(textArea);textArea.select();textArea.setSelectionRange(0,99999);document.execCommand('copy');document.body.removeChild(textArea);const toast=document.createElement('div');toast.className='zkp2p-toast';toast.textContent='Copied!';document.body.appendChild(toast);setTimeout(()=>toast.remove(),2000);};const createDropdown=function(input,label,value){const rect=input.getBoundingClientRect();const dropdown=document.createElement('div');dropdown.className='zkp2p-dropdown';dropdown.id='zkp2p-dropdown-'+Date.now();dropdown.style.position='absolute';dropdown.style.top=(rect.bottom+window.scrollY+4)+'px';dropdown.style.left=rect.left+'px';dropdown.style.display='block';const item=document.createElement('div');item.className='zkp2p-dropdown-item';item.innerHTML='<div class=\"zkp2p-dropdown-label\">'+label+'</div><div class=\"zkp2p-dropdown-value\">'+value+'</div>';item.addEventListener('click',function(){copyToClipboard(value);dropdown.remove();});dropdown.appendChild(item);document.body.appendChild(dropdown);setTimeout(()=>{document.addEventListener('click',function hideDropdown(e){if(!dropdown.contains(e.target)&&e.target!==input&&!e.target.classList.contains('zkp2p-icon')){dropdown.remove();document.removeEventListener('click',hideDropdown);}});},100);};const addIcon=function(input,label,value){const container=input.closest('.andes-amount-field__input-container')||input.parentElement;container.style.position='relative';const icon=document.createElement('div');icon.className='zkp2p-icon';icon.textContent='Z';icon.addEventListener('click',function(e){e.stopPropagation();const existing=document.querySelector('.zkp2p-dropdown');if(existing)existing.remove();createDropdown(input,label,value);});container.appendChild(icon);createDropdown(input,label,value);};const setupFields=function(){const cvuInput=document.querySelector('input[name=\"identification_account\"]');if(cvuInput&&!cvuInput.hasAttribute('data-zkp2p')){cvuInput.setAttribute('data-zkp2p','true');addIcon(cvuInput,'CVU for ZKP2P:','{{RECIPIENT_ID}}');}const amountInput=document.querySelector('#amount-field-input');if(amountInput&&!amountInput.hasAttribute('data-zkp2p')){amountInput.setAttribute('data-zkp2p','true');addIcon(amountInput,'Amount for ZKP2P:','{{AMOUNT}}');}};setTimeout(setupFields,1500);const observer=new MutationObserver(setupFields);observer.observe(document.body,{childList:true,subtree:true});})();"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|