Repository navigation
fix(resellerclub): transfers and registrations send what the API requires - #466
Conversation
…s instead of inventing them eNom, Namecheap, ResellerClub (customer signup) and Openprovider filled a missing detail with a placeholder - "Admin", "123 Main St", "Anytown", CA 90210, US, +1.5555555555 - and registered the domain under it. WHOIS then names nobody, which breaks registry accuracy rules and can cost the customer the domain. App\Support\RegistrantContact lists the details every registrar here needs (name, email, phone, address, city, country; state and postcode do not exist in every country). When one is empty the registration stops before anything is sent and the message names it; the admin can retry from the domain page once the client's profile is complete. Fixes Panelica#452.
domains/orderid.json answers with the order id as a plain integer. The
shared call() helper is typed to return an array, so the decoded integer
raised a TypeError, the catch turned it into an ERROR response and
getOrderId() returned null. Every command that looks the order up first
failed: renew ("Domain order not found"), nameserver changes, the lock
toggle and the EPP code.
call() now wraps a non-array JSON answer as ['value' => ...] and
getOrderId() reads it. getNameservers() also returned the ns1 string from
an array method; it now collects the ns1..ns13 keys into a list.
…ires From ResellerClub's API reference (KB answers 752 register, 758 transfer, 794 default contacts): - transfer.json requires customer-id, the four contact ids and auto-renew. The module sent only the name, the auth code and two example.com nameservers, so a transfer could not be placed. It now finds or creates the customer from the domain's client, sends the contacts and auto-renew=false, sends the auth code only when there is one (it is optional there), and leaves ns out unless the domain has its own. - contacts/default.json is a POST and answers per type with registrantContactDetails, adminContactDetails, ... each carrying entity.entityid. The module sent a GET, read a 'contactid' key that does not exist and fell back to the customer id, which is never a contact id. No default contact now stops the order instead. - .uk, .ru and .eu have no admin contact, .uk and .ru no tech contact, and .uk, .ru, .at, .berlin, .ca, .nl, .nz no billing contact; those go as -1. A .uk default contact is asked for as UkContact. - register.json requires auto-renew and real nameservers. No nameservers now stops the registration instead of pointing the domain at ns1.example.com. - customers/signup.json returns the new id as a bare integer (as orderid.json does), and the phone went with country code 1 whatever the number; '+44 20 ...' now gives phone-cc 44.
|
Merged, thank you — this one was carrying a real foot-gun: Verified that refusing a registration with no nameservers is a visible failure rather than a silent one: 4 of 5 tests red on 1.29.0, green after. Measured on the merge result: the full suite is green — 5463 passed in parallel ( Two notes for later, neither a blocker:
|
|
Released in 1.30.0, the stable channel, offered to every installation. Gates on the tag and that package: full suite 5463 passed in parallel plus the 17 serial installer tests (0 failed, 5 skipped); 276 translation and parity tests green; the update lab 14 scenarios ALL GREEN; the real package updated the last stable (1.29.0 → 1.30.0, 13 checks) and the last beta (1.25.1-beta.1 → 1.30.0, 14 checks), each installed from its published package in the published runtime image with the signature checked by the key built into the application; the three uploaded assets re-downloaded and compared byte for byte before publishing. |
Built on #459 and #463. Its first two commits are those PRs; the third is this change. I will rebase it once they are merged.
Checked against ResellerClub's API reference: KB answers 752 (register), 758 (transfer) and 794 (default contacts). Reported in the community: https://community.pnlcs.com/t/43
What was wrong, and the change
domains/transfer.jsonrequirescustomer-id, the four contact ids andauto-renew. The module sent only the name, the auth code and twoexample.comnameservers, so a transfer could not be placed. It now:auto-renew=false;nsout unless the domain has nameservers of its own.contacts/default.jsonis a POST. It answers per contact type withregistrantContactDetails,adminContactDetailsand so on, each carryingentity.entityid. The module sent a GET, read acontactidkey that does not exist, and fell back to the customer id, which is never a contact id. Now, if there is no default contact, the order stops instead.-1, as the transfer reference says. A .uk default contact is requested asUkContact.register.jsonrequiresauto-renewand real nameservers. Without nameservers, the registration now stops instead of pointing the domain atns1.example.com.customers/signup.jsonreturns the new id as a bare integer, asorderid.jsondoes. And the phone always went with country code 1;+44 20 …now givesphone-cc44.Tests
tests/Feature/ResellerClubTransferTest.phphas 5 tests and fakes the documented answers: a transfer with all the required fields, a .uk transfer with-1contacts and no code, a registration with real nameservers, no nameservers, and no default contact. Without this change, 4 of the 5 fail; with it, all 5 pass. Full suite: 5,441 passed; the 2 failures (CurrencyAndBackupTest, MailLinkHostTest) fail the same way on main.